https://github.com/yuri-val/voting-analysis-api
Dev Challenge 11 | QUALIFICATION
https://github.com/yuri-val/voting-analysis-api
api-rails devchallenge devchallenge11 rails rb ror ror-api ruby
Last synced: about 2 months ago
JSON representation
Dev Challenge 11 | QUALIFICATION
- Host: GitHub
- URL: https://github.com/yuri-val/voting-analysis-api
- Owner: yuri-val
- Created: 2017-07-18T13:29:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T14:29:49.000Z (over 8 years ago)
- Last Synced: 2025-01-19T00:52:42.756Z (about 1 year ago)
- Topics: api-rails, devchallenge, devchallenge11, rails, rb, ror, ror-api, ruby
- Language: Ruby
- Homepage: http://devchallenge.it/
- Size: 5.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Run with docker:
- docker-compose build
- docker-compose run web rake db:drop db:create db:migrate
- docker-compose run web rake example:make default_data:load parser:run
- docker-compose up
If you need, you may use not PG DB. Just rename file "database.yml.mysql_example"
or "database.yml.sqlite_example" to "database.yml".
Also you have to change db parameters for MySQL and PG in database.yml".
Direct run (ruby >= 2.3.x):
- bundle install
- rake db:drop db:create db:migrate
- rake example:make default_data:load parser:run
- rails s
Go to root application url (127.0.0.1:3000) for more info about routes.
If you want to load new pdf-files to application put them into "public/pdfs"
and run "rake parser:run"
Routes:
- /v1/deputies/{:id} -- list of all deputies in db or deputy by {:id}
- /v1/votings/{:id} -- list of all votings (headers in pdf-file above the table)
Nested routes:
- /v1/votings/:voting_id/voting_rows/{:id} -- voting table of voting by voting_id
- /v1/deputies/:deputy_id/votings/ -- all votings filtered by deputy
- /v1/deputies/:deputy_id/zones -- Zones of influence of deputy