Permalink
Browse files

new Rails app generated by rails3_devise_wizard

  • Loading branch information...
fortuity committed Apr 23, 2011
0 parents commit 06ad230060f782cbcb33dcdacac92904c994fb12
Showing with 2,236 additions and 0 deletions.
  1. +63 −0 .gitignore
  2. +10 −0 Gemfile
  3. +150 −0 Gemfile.lock
  4. +8 −0 README
  5. +59 −0 README.textile
  6. +7 −0 Rakefile
  7. +3 −0 app/controllers/application_controller.rb
  8. +5 −0 app/controllers/home_controller.rb
  9. +9 −0 app/controllers/users_controller.rb
  10. +2 −0 app/helpers/application_helper.rb
  11. +2 −0 app/helpers/home_helper.rb
  12. +2 −0 app/helpers/users_helper.rb
  13. +9 −0 app/models/user.rb
  14. +12 −0 app/views/devise/confirmations/new.html.erb
  15. +5 −0 app/views/devise/mailer/confirmation_instructions.html.erb
  16. +8 −0 app/views/devise/mailer/reset_password_instructions.html.erb
  17. +7 −0 app/views/devise/mailer/unlock_instructions.html.erb
  18. +9 −0 app/views/devise/menu/_login_items.html.erb
  19. +9 −0 app/views/devise/menu/_registration_items.html.erb
  20. +16 −0 app/views/devise/passwords/edit.html.erb
  21. +12 −0 app/views/devise/passwords/new.html.erb
  22. +27 −0 app/views/devise/registrations/edit.html.erb
  23. +20 −0 app/views/devise/registrations/new.html.erb
  24. +17 −0 app/views/devise/sessions/new.html.erb
  25. +25 −0 app/views/devise/shared/_links.erb
  26. +12 −0 app/views/devise/unlocks/new.html.erb
  27. +4 −0 app/views/home/index.html.erb
  28. +21 −0 app/views/layouts/application.html.erb
  29. +3 −0 app/views/users/show.html.erb
  30. +4 −0 config.ru
  31. +42 −0 config/application.rb
  32. +6 −0 config/boot.rb
  33. +8 −0 config/cucumber.yml
  34. +5 −0 config/environment.rb
  35. +32 −0 config/environments/development.rb
  36. +58 −0 config/environments/production.rb
  37. +35 −0 config/environments/test.rb
  38. +7 −0 config/initializers/backtrace_silencers.rb
  39. +194 −0 config/initializers/devise.rb
  40. +2 −0 config/initializers/generators.rb
  41. +10 −0 config/initializers/inflections.rb
  42. +5 −0 config/initializers/mime_types.rb
  43. +7 −0 config/initializers/secret_token.rb
  44. +8 −0 config/initializers/session_store.rb
  45. +50 −0 config/locales/devise.en.yml
  46. +5 −0 config/locales/en.yml
  47. +66 −0 config/routes.rb
  48. +28 −0 db/migrate/20110423013547_devise_create_users.rb
  49. +9 −0 db/migrate/20110423013550_add_name_to_users.rb
  50. +34 −0 db/schema.rb
  51. +10 −0 db/seeds.rb
  52. +71 −0 features/step_definitions/user_steps.rb
  53. +211 −0 features/step_definitions/web_steps.rb
  54. +39 −0 features/support/env.rb
  55. +39 −0 features/support/paths.rb
  56. +39 −0 features/support/selectors.rb
  57. +32 −0 features/users/sign_in.feature
  58. +13 −0 features/users/sign_out.feature
  59. +49 −0 features/users/sign_up.feature
  60. +15 −0 features/users/user_edit.feature
  61. +9 −0 features/users/user_show.feature
  62. 0 lib/tasks/.gitkeep
  63. +57 −0 lib/tasks/cucumber.rake
  64. +26 −0 public/404.html
  65. +26 −0 public/422.html
  66. +26 −0 public/500.html
  67. 0 public/favicon.ico
  68. 0 public/javascripts/.gitkeep
  69. 0 public/javascripts/application.js
  70. +16 −0 public/javascripts/jquery.js
  71. +291 −0 public/javascripts/rails.js
  72. +5 −0 public/robots.txt
  73. 0 public/stylesheets/.gitkeep
  74. +20 −0 public/stylesheets/application.css
  75. +10 −0 script/cucumber
  76. +6 −0 script/rails
  77. +12 −0 spec/controllers/home_controller_spec.rb
  78. +17 −0 spec/controllers/users_controller_spec.rb
  79. +8 −0 spec/factories.rb
  80. +8 −0 spec/models/user_spec.rb
  81. +27 −0 spec/spec_helper.rb
  82. +3 −0 spec/support/devise.rb
  83. 0 vendor/plugins/.gitkeep
@@ -0,0 +1,63 @@
+#----------------------------------------------------------------------------
+# Ignore these files when commiting to a git repository
+#
+# The original version of this file is found here:
+# https://github.com/fortuity/rails3-gitignore/raw/master/gitignore.txt
+#
+# Corrections? Improvements? Create a GitHub issue:
+# https://github.com/fortuity/rails3-gitignore/issues
+#----------------------------------------------------------------------------
+
+# bundler state
+/.bundle
+/vendor/bundle/
+
+# minimal Rails specific artifacts
+db/*.sqlite3
+/log/*
+tmp/*
+
+# various artifacts
+**.war
+*.rbc
+*.sassc
+.rspec
+.sass-cache
+/config/config.yml
+/config/database.yml
+/coverage.data
+/coverage/
+/db/*.javadb/
+/db/*.sqlite3-journal
+/doc/api/
+/doc/app/
+/doc/features.html
+/doc/specs.html
+/public/cache
+/public/stylesheets/compiled
+/public/system
+/spec/tmp/*
+/cache
+/capybara*
+/capybara-*.html
+/gems
+/rerun.txt
+/spec/requests
+/spec/routing
+/spec/views
+/specifications
+
+# scm revert files
+**.orig
+
+# Mac finder artifacts
+.DS_Store
+
+# Netbeans project directory
+/nbproject/
+
+# Textmate project files
+/*.tmpproj
+
+# vim artifacts
+**.swp
10 Gemfile
@@ -0,0 +1,10 @@
+source 'http://rubygems.org'
+gem 'rails', '3.0.6'
+gem 'sqlite3'
+gem "rspec-rails", ">= 2.5.0", :group => [:development, :test]
+gem "factory_girl_rails", ">= 1.1.beta1", :group => :test
+gem "cucumber-rails", ">= 0.4.1", :group => :test
+gem "capybara", ">= 0.4.1.2", :group => :test
+gem "database_cleaner", ">= 0.6.7", :group => :test
+gem "launchy", ">= 0.4.0", :group => :test
+gem "devise", ">= 1.3.3"
@@ -0,0 +1,150 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.6)
+ actionpack (= 3.0.6)
+ mail (~> 2.2.15)
+ actionpack (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.6)
+ activesupport (= 3.0.6)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ activesupport (3.0.6)
+ arel (2.0.9)
+ bcrypt-ruby (2.1.4)
+ builder (2.1.2)
+ capybara (0.4.1.2)
+ celerity (>= 0.7.9)
+ culerity (>= 0.2.4)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (>= 0.0.27)
+ xpath (~> 0.1.3)
+ celerity (0.8.9)
+ childprocess (0.1.8)
+ ffi (~> 1.0.6)
+ configuration (1.2.0)
+ cucumber (0.10.2)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (>= 2.3.5)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.5)
+ cucumber-rails (0.4.1)
+ cucumber (>= 0.10.1)
+ nokogiri (>= 1.4.4)
+ rack-test (>= 0.5.7)
+ culerity (0.2.15)
+ database_cleaner (0.6.7)
+ devise (1.3.3)
+ bcrypt-ruby (~> 2.1.2)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.0.3)
+ diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ factory_girl (2.0.0.beta2)
+ factory_girl_rails (1.1.beta1)
+ factory_girl (~> 2.0.0.beta)
+ rails (>= 3.0.0)
+ ffi (1.0.7)
+ rake (>= 0.8.7)
+ gherkin (2.3.6)
+ json (>= 1.4.6)
+ i18n (0.5.0)
+ json (1.5.1)
+ json_pure (1.5.1)
+ launchy (0.4.0)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mail (2.2.17)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ nokogiri (1.4.4)
+ orm_adapter (0.0.4)
+ polyglot (0.3.1)
+ rack (1.2.2)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.6)
+ actionmailer (= 3.0.6)
+ actionpack (= 3.0.6)
+ activerecord (= 3.0.6)
+ activeresource (= 3.0.6)
+ activesupport (= 3.0.6)
+ bundler (~> 1.0)
+ railties (= 3.0.6)
+ railties (3.0.6)
+ actionpack (= 3.0.6)
+ activesupport (= 3.0.6)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.8.7)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.1)
+ rspec-expectations (2.5.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.5.0)
+ rspec-rails (2.5.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.5.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.2.0)
+ childprocess (>= 0.1.7)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ sqlite3 (1.3.3)
+ term-ansicolor (1.0.5)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.26)
+ warden (1.0.3)
+ rack (>= 1.0.0)
+ xpath (0.1.3)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ capybara (>= 0.4.1.2)
+ cucumber-rails (>= 0.4.1)
+ database_cleaner (>= 0.6.7)
+ devise (>= 1.3.3)
+ factory_girl_rails (>= 1.1.beta1)
+ launchy (>= 0.4.0)
+ rails (= 3.0.6)
+ rspec-rails (>= 2.5.0)
+ sqlite3
8 README
@@ -0,0 +1,8 @@
+Rails3 Devise Rspec Cucumber
+========================
+
+
+________________________
+
+License
+
@@ -0,0 +1,59 @@
+h1. Rails3 Devise Rspec Cucumber
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. More Information
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Required Gems
+
+This application requires this gem:
+
+* "rails":http://rubygems.org/gems/rails
+
+h2. Dependencies
+
+To use this application, you will need:
+
+* The Ruby language (version 1.8.7 or 1.9.2)
+* Rails (version 3.0.4 or newer)
+
+h2. Installing the Application
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Getting Started
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Documentation and Support
+
+This is the only documentation.
+
+h4. Issues
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Similar Projects
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Contributing
+
+If you make improvements to this application, please share with others.
+
+* Fork the project on GitHub.
+* Make your feature addition or bug fix.
+* Commit with Git.
+* Send the author a pull request.
+
+If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I'll add a note to the README so that others can find your work.
+
+h2. Credits
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. License
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+Rails3DeviseRspecCucumber::Application.load_tasks
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
@@ -0,0 +1,5 @@
+class HomeController < ApplicationController
+ def index
+ @users = User.all
+ end
+end
@@ -0,0 +1,9 @@
+class UsersController < ApplicationController
+ before_filter :authenticate_user!
+
+ def show
+ @user = User.find(params[:id])
+
+ end
+
+end
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
@@ -0,0 +1,2 @@
+module HomeHelper
+end
@@ -0,0 +1,2 @@
+module UsersHelper
+end
@@ -0,0 +1,9 @@
+class User < ActiveRecord::Base
+ # Include default devise modules. Others available are:
+ # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
+ devise :database_authenticatable, :registerable,
+ :recoverable, :rememberable, :trackable, :validatable
+
+ # Setup accessible (or protected) attributes for your model
+ attr_accessible :name, :email, :password, :password_confirmation, :remember_me
+end
@@ -0,0 +1,12 @@
+<h2>Resend confirmation instructions</h2>
+
+<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
+ <%= devise_error_messages! %>
+
+ <p><%= f.label :email %><br />
+ <%= f.email_field :email %></p>
+
+ <p><%= f.submit "Resend confirmation instructions" %></p>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,5 @@
+<p>Welcome <%= @resource.email %>!</p>
+
+<p>You can confirm your account through the link below:</p>
+
+<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
+
+<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
+
+<p>If you didn't request this, please ignore this email.</p>
+<p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
+
+<p>Click the link below to unlock your account:</p>
+
+<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,9 @@
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Logout', destroy_user_session_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Login', new_user_session_path) %>
+ </li>
+<% end %>
@@ -0,0 +1,9 @@
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Edit account', edit_user_registration_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Sign up', new_user_registration_path) %>
+ </li>
+<% end %>
Oops, something went wrong.

0 comments on commit 06ad230

Please sign in to comment.