This is simple Direct Democracy software.
- Get the code
- Verify you have installed all prerequisite software
- Bundle install
- Rake test
- Rails server
We need your help. Please, see the list below and feel free to get excited
I will write here stuff i know needs to be written better.
Index and Show post/put requests are full requests. Should be ajax
and json. Needs some frontend library plans perhaps.
Most permission checks are missing.
For example at:
User#vote
Should install search engine for efficient searches, for example solr
https://github.com/sunspot/sunspot
Some factories could be more complex.
see: factories/vote.rb
Too many queries. Should have SQL query to include all related data in one query.
Validation of the vote count is too heavy (user_can_have_only_one_vote_per_proposal)
Only few tests written.. should have more
User can be anonymous, signed up but unverified or verified. Verification is done with checkout.fi API. Verified user must succesfully use web bank mmoney transfer.
A record that can be voted.
A vote for one proposal.
Vote proposal can be generic or it can have a group. Vote proposals in groups are accessible only users who are members of the groups.
Vote proposals are added to the system through group of people, "talking circle". This means that multiple people will be involved to create content and multiple people must accept the final proposal to make it votable.
Ruby 2.4
Yarn: install: https://yarnpkg.com/en/docs/install
Chromedriver for mobile tests: https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver
$ rake test
With "single_test" gem spesific tests can be ran easily
$ rake test:user (model) $ rake test:user:should (model test with regexp) $ rake test:vote:proposals (functional)
https://github.com/nerdman/direct_democracy
- Joni Töyrylä - Initial work, version 1.0 - Nerdman
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone who's code was used
- Inspiration
- etc
This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...