Skip to content

sploiber/rss_reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The RSS Reader is a small interview exercise which makes use of a variety of Ruby on Rails techniques and gems.

  1. Download the code from the Git repository

  2. rake db:migrate (uses MySQL)

  3. “rake spec” should pass - to test the unit tests

  4. “rake cucumber” should pass - to test the integration tests

  5. Run “mysql -u root -D <database> < load/profile_type.txt” to load the profile_type table.

  6. Start the Rails server on port 2100

  7. Test localhost:2100/ to confirm that the Home screen shows up.

These steps are provided if someone wishes to build a tutorial for this application.

  1. Run the command “rails new rss_reader –skip-unit-test –skip-prototype –skip-bundle -J -T”

  2. Add ‘therubyracer’ and ‘mysql2’ to bundle, and do bundle install.

  3. Edit config/database.yml, tailored for the specific database.

  4. add ‘devise’ to bundle and do ‘bundle install’

  5. rails generate devise:install (installs config/initializers/devise.rb and

localization file)

  1. Configure config.mailer_sender in config/initializers/devise.rb

  2. Add gem bootstrap-sass

  3. Add app/views/layouts/application.html.erb (based on Twitter Bootstrap)

  4. Add app/views/layouts/_messages.html.erb (Twitter Bootstrap)

  5. Add app/views/layouts/_navigation.html.erb (Twitter Bootstrap)

  6. Add app/assets/javascripts/application.js (Twitter Bootstrap)

  7. Add app/assets/stylesheets/application.css.scss (Twitter Bootstrap)

  8. Add app/assets/stylesheets/bootstrap_and_overrides.css.scss (Twitter Bootstrap)

  9. Add gems for JQuery UI (at this point there are no widgets in use)

  10. rake db:create

  11. rails generate devise User

  12. add password_confirmation to config/application.rb (filter_parameters)

  13. add simple_form gem

  14. list of devise modules: database_authenticatable; registerable; recoverable; rememberable; trackable; validatable; confirmable; omniauthable

  15. rake db:migrate

  16. Add gem omniauth

  17. rails generate migration AddFieldsToUsers first_name last_name login

  18. modify the migration to put required on the 3 fields

  19. gem rspec-rails, capybara, cucumber-rails, database_cleaner, email_spec, factory_girl_rails (for testing)

  20. rails generate rspec:install

  21. rails generate cucumber:install –capybara –rspec

  22. Add DatabaseCleaner blocks to spec/spec_helper.rb

  23. Add spec/factories/users.rb, to create users

  24. Add spec/support/devise.rb, for controller tests

  25. Add an email spec in spec/spec_helper.rb

  26. In config/application.rb, don’t generate RSpec tests for views and helpers

  27. rake -T confirms that cucumber and rspec are there

  28. Write Rspec tests for users_controller, home_controller, and user model. At this point “rake spec” won’t yet work.

  29. features/support/email_spec.rb (I have used email.rb)

  30. rails generate email_spec:steps

  31. add support/paths.rb, step_definitions/user_steps.rb, users tests

  32. rake cucumber will fail.

  33. modify config/environments/development.rb to set action_mailer for mailing, and modify test too

  34. modify model for presence and uniqueness checking

  35. rails generate devise:views (this is the registerable module)

  36. remove public/index.html

  37. rails generate controller home index –no-controller-specs

  38. Edit routes

  39. add first_name, last_name, login to app/views/devise/registrations/edit and new.

  40. Tweak Cucumber test for sign_out (get vs. delete)

  41. Add gems oauth2, omniauth-facebook, omniauth-twitter

  42. rails generate migration AddFields2ToUsers provider uid

  43. rake db:migrate

  44. add :provider and :uid to attr_accessible

  45. add to config/initializers/devise.rb

  46. add profile_type table

  47. add Kaminari gem for pagination of channels.

About

RSS Reader exercise - November 2012

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages