Stadtratmonitor – Frontend https://stadtratmonitor.leipzig.codefor.de
Find a file
2016-03-02 20:05:12 +01:00
app Add spec for search result pagination 2016-02-24 11:39:12 +01:00
bin Add rspec spring command 2016-02-18 07:14:53 +01:00
config Fix deprecation warning in test environment 2016-02-17 20:56:26 +01:00
db Add paper_searches table 2015-11-23 22:10:45 +01:00
lib Add rake task to rebuild paper index 2016-01-23 20:32:37 +01:00
log Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
public Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
spec added .travis.yml 2016-03-02 20:05:12 +01:00
test Move factories to spec dir and add helper module 2016-02-19 08:39:30 +01:00
vendor/assets Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
.dockerignore Add Dockerfile and docker-compose config 2016-01-23 20:33:02 +01:00
.gitignore gitignore .vagrant dir 2016-01-23 20:31:40 +01:00
.project added .travis.yml 2016-03-02 20:05:12 +01:00
.rspec add rspec config 2016-02-17 07:58:57 +01:00
.ruby-version Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
.travis.yml added .travis.yml 2016-03-02 20:05:12 +01:00
config.ru Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
docker-compose.yml Add Dockerfile and docker-compose config 2016-01-23 20:33:02 +01:00
Dockerfile Add Dockerfile and docker-compose config 2016-01-23 20:33:02 +01:00
Gemfile Disable guard notifier for now because !crossplatform 2016-02-24 19:16:48 +01:00
Gemfile.lock Disable guard notifier for now because !crossplatform 2016-02-24 19:16:48 +01:00
Guardfile Add guard file watcher 2016-02-18 08:41:45 +01:00
LICENSE Initial commit 2014-11-19 17:03:06 +01:00
Rakefile Start with a Rails app with authentication via Persona, Foundation CSS 2014-11-19 18:48:28 +01:00
README.md Fix link address of dockerhost in README 2016-01-25 19:52:52 +01:00

Stadtratmonitor

Setup

  1. Install Ruby, Bundler, Elasticsearch
  2. Start Elasticsearch: elasticsearch
  3. Setup Rails app: bundle && bundle exec rake db:setup
  4. Start Rails server: bundle exec rails s
  5. Visit http://localhost:3000

Using docker

  1. Install docker and docker-compose: https://docs.docker.com/compose/install/
  2. Start the app: docker-compose up
  3. TODO db:migrate, import data, setup index
  4. Get the address of the docker host: docker-machine ip default
  5. Point your browser to: 'http://<IP of docker host>:3000'

Adding a data source (web scraper)

Example scraper: https://morph.io/ahx/city_council_leipzig_recent_papers

Scrapers are stored inside the database (see "Importer" model). To Add a new scraper, you have to create a new Importer record and set it's url field to Morph.io's API URL field.

Adding a scraper manually:

  1. Start Rails console bundle exec rails console
  2. Import.create(url: "https://api.morph.io/[scraper]/data.json?key=[api_key]&query=[sql]")
  3. exit

Now import everything via bundle exec rake import_papers.