Voteline is a real-time voting application that shows voting history as a function of time.
Voteline was developed on Ruby v2.1 and Rails v4.1. Several gems were utilized to make development easier:
gem 'devise'
gem 'draper'
gem 'lazy_high_charts'
gem 'bootstrap-sass'
gem 'font-awesome-rails'
-
Clone the repository.
-
Create a
/config/secrets.yml
file with with your private keys for development and test. Make sure your private keys for your production environment are stored in environment variables.development: secret_key_base: 3acf07 devise_secret_key: 3ef655 test: secret_key_base: 6035fd devise_sceret_key: 8701cb production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> devise_secret_key: <%= ENV["DEVISE_SECRET_KEY"] %>
-
If deploying to Heroku, add your production keys to your environment variables:
$ heroku config:set SECRET_KEY_BASE=1234abcd
-
If deploying to Heroku, pick an email provider. Sendgrid is easy:
$ heroku addons:add sendgrid:starter
-
Copy the following mailer settings to your
config/environment.rb
file:ActionMailer::Base.smtp_settings = { :address => 'smtp.sendgrid.net', :port => '587', :authentication => :plain, :user_name => ENV['SENDGRID_USERNAME'], :password => ENV['SENDGRID_PASSWORD'], :domain => 'heroku.com', :enable_starttls_auto => true }
-
Add the sendgrid username/password details in environment variables:
$ heroku config:set SENDGRID_USERNAME=<sendgrid_username> $ heroku config:set SENDGRID_PASSWORD=<sendgrid_password>
-
Deploy.
$ git push heroku master
.
- Poll admins
Realtime updating (websockets perhaps?)
Voteline is the product of Ryan Ringler. It was developed largerly as a pet project to continue to learn and better understand rails.
Voteline is licensed under the MIT License. Please see the LICENSE file for additional details.