User submits her email. System sends out a confirmation email. User visits the confirmation link sent in the email. Once confirmed, the user is then sent a new quote every day.
- Ruby 2.2.2
- Postgressql 9.4.1
- Nginx ( Passenger will install this for you, see "Starting and running the server" section below
- For other dependecies, check out Gemfile
- Ruby 2.2.2
- Rails 4.2.4
- Postgressql 9.4.1
- Twitter Bootstrap Sass for styling
- Stock image from http://thestocks.im/
- Qotd from free qotd servers listed here: https://en.wikipedia.org/wiki/QOTD
- Rspec for testing
- Sidekiq for async jobs
- Clone the repo, and
cd
into the repo - Run
bundle install
rake db:create
rake db:migrate
( ORrake db:schema:load
depending on your preference )
rake db:migrate RAILS_ENV=test
bundle exec rspec
to run the test-suite- Project uses Rubocop to conform to community accepted style guide. Some exceptions are made based on personal preferences. Check out the
.rubocop.yml
file for these exceptions.
bundle exec passenger start
( At this point, passenger may install a few missing dependencies )bundle exec sidekiq -c 5
to start the Sidekiq worker process- Navigate to
http://localhost:3000
rake publish
This publishes the newest edition of the newsletter. Following things happen:
- Gets a fresh, random quote from a pre-configured QOTD server.
- Checks for eligible subscriptions
- Sends out email to them
- This task is idempotent, and can be safely run multiple times.
- Add different types of pseudo-random sources ( Images, Music, Books, Videos etc )
- Add profile edit and other social media features
- Add Facebook, Twitter integration and "Share" functionality
- Add permalinks and "view in browser" feature for emails