Skip to content

Commit e677d7e

Browse files
committed
update app to Rails 3.1
1 parent 229ac8d commit e677d7e

27 files changed

+233
-464
lines changed

Gemfile

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
source 'http://rubygems.org'
2-
gem 'rails', '3.0.8.rc2'
2+
gem 'rails', '3.1.0.rc1'
33
gem 'sqlite3'
4-
gem "rspec-rails", "2.6.1", :group => [:development, :test]
5-
gem "factory_girl_rails", "1.1.beta1", :group => :test
6-
gem "cucumber-rails", "0.5.1", :group => :test
7-
gem "capybara", "1.0.0.beta1", :group => :test
8-
gem "database_cleaner", "0.6.7", :group => :test
9-
gem "launchy", "0.4.0", :group => :test
10-
gem "devise", "1.3.4"
4+
gem 'sass'
5+
gem 'coffee-script'
6+
gem 'uglifier'
7+
gem 'jquery-rails'
8+
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
9+
gem "factory_girl_rails", ">= 1.1.beta1", :group => :test
10+
gem "cucumber-rails", ">= 0.5.1", :group => :test
11+
gem "capybara", ">= 1.0.0.beta1", :group => :test
12+
gem "database_cleaner", ">= 0.6.7", :group => :test
13+
gem "launchy", ">= 0.4.0", :group => :test
14+
gem "devise", ">= 1.3.4"

Gemfile.lock

+87-57
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4-
abstract (1.0.0)
5-
actionmailer (3.0.8.rc2)
6-
actionpack (= 3.0.8.rc2)
7-
mail (~> 2.2.19)
8-
actionpack (3.0.8.rc2)
9-
activemodel (= 3.0.8.rc2)
10-
activesupport (= 3.0.8.rc2)
11-
builder (~> 2.1.2)
12-
erubis (~> 2.6.6)
13-
i18n (~> 0.5.0)
14-
rack (~> 1.2.1)
15-
rack-mount (~> 0.6.14)
16-
rack-test (~> 0.5.7)
17-
tzinfo (~> 0.3.23)
18-
activemodel (3.0.8.rc2)
19-
activesupport (= 3.0.8.rc2)
20-
builder (~> 2.1.2)
21-
i18n (~> 0.5.0)
22-
activerecord (3.0.8.rc2)
23-
activemodel (= 3.0.8.rc2)
24-
activesupport (= 3.0.8.rc2)
25-
arel (~> 2.0.10)
26-
tzinfo (~> 0.3.23)
27-
activeresource (3.0.8.rc2)
28-
activemodel (= 3.0.8.rc2)
29-
activesupport (= 3.0.8.rc2)
30-
activesupport (3.0.8.rc2)
31-
arel (2.0.10)
4+
actionmailer (3.1.0.rc1)
5+
actionpack (= 3.1.0.rc1)
6+
mail (~> 2.3.0)
7+
actionpack (3.1.0.rc1)
8+
activemodel (= 3.1.0.rc1)
9+
activesupport (= 3.1.0.rc1)
10+
builder (~> 3.0.0)
11+
erubis (~> 2.7.0)
12+
i18n (~> 0.6.0beta1)
13+
rack (~> 1.3.0.beta2)
14+
rack-cache (~> 1.0.1)
15+
rack-mount (~> 0.8.1)
16+
rack-test (~> 0.6.0)
17+
sprockets (~> 2.0.0.beta.5)
18+
tzinfo (~> 0.3.27)
19+
activemodel (3.1.0.rc1)
20+
activesupport (= 3.1.0.rc1)
21+
bcrypt-ruby (~> 2.1.4)
22+
builder (~> 3.0.0)
23+
i18n (~> 0.6.0beta1)
24+
activerecord (3.1.0.rc1)
25+
activemodel (= 3.1.0.rc1)
26+
activesupport (= 3.1.0.rc1)
27+
arel (~> 2.1.1)
28+
tzinfo (~> 0.3.27)
29+
activeresource (3.1.0.rc1)
30+
activemodel (= 3.1.0.rc1)
31+
activesupport (= 3.1.0.rc1)
32+
activesupport (3.1.0.rc1)
33+
multi_json (~> 1.0)
34+
arel (2.1.1)
3235
bcrypt-ruby (2.1.4)
33-
builder (2.1.2)
36+
builder (3.0.0)
3437
capybara (1.0.0.beta1)
3538
mime-types (>= 1.16)
3639
nokogiri (>= 1.3.3)
@@ -40,6 +43,10 @@ GEM
4043
xpath (~> 0.1.4)
4144
childprocess (0.1.9)
4245
ffi (~> 1.0.6)
46+
coffee-script (2.2.0)
47+
coffee-script-source
48+
execjs
49+
coffee-script-source (1.1.1)
4350
configuration (1.2.0)
4451
cucumber (0.10.3)
4552
builder (>= 2.1.2)
@@ -58,48 +65,58 @@ GEM
5865
orm_adapter (~> 0.0.3)
5966
warden (~> 1.0.3)
6067
diff-lcs (1.1.2)
61-
erubis (2.6.6)
62-
abstract (>= 1.0.0)
68+
erubis (2.7.0)
69+
execjs (1.0.0)
70+
multi_json (~> 1.0)
6371
factory_girl (2.0.0.beta2)
6472
factory_girl_rails (1.1.beta1)
6573
factory_girl (~> 2.0.0.beta)
6674
rails (>= 3.0.0)
6775
ffi (1.0.9)
68-
gherkin (2.3.9)
76+
gherkin (2.3.10)
6977
json (>= 1.4.6)
70-
i18n (0.5.0)
78+
hike (1.0.0)
79+
i18n (0.6.0)
80+
jquery-rails (1.0.9)
81+
railties (~> 3.0)
82+
thor (~> 0.14)
7183
json (1.5.1)
7284
json_pure (1.5.1)
7385
launchy (0.4.0)
7486
configuration (>= 0.0.5)
7587
rake (>= 0.8.1)
76-
mail (2.2.19)
77-
activesupport (>= 2.3.6)
88+
mail (2.3.0)
7889
i18n (>= 0.4.0)
7990
mime-types (~> 1.16)
8091
treetop (~> 1.4.8)
8192
mime-types (1.16)
93+
multi_json (1.0.3)
8294
nokogiri (1.4.4)
8395
orm_adapter (0.0.5)
8496
polyglot (0.3.1)
85-
rack (1.2.3)
86-
rack-mount (0.6.14)
97+
rack (1.3.0)
98+
rack-cache (1.0.2)
99+
rack (>= 0.4)
100+
rack-mount (0.8.1)
87101
rack (>= 1.0.0)
88-
rack-test (0.5.7)
102+
rack-ssl (1.3.2)
103+
rack
104+
rack-test (0.6.0)
89105
rack (>= 1.0)
90-
rails (3.0.8.rc2)
91-
actionmailer (= 3.0.8.rc2)
92-
actionpack (= 3.0.8.rc2)
93-
activerecord (= 3.0.8.rc2)
94-
activeresource (= 3.0.8.rc2)
95-
activesupport (= 3.0.8.rc2)
106+
rails (3.1.0.rc1)
107+
actionmailer (= 3.1.0.rc1)
108+
actionpack (= 3.1.0.rc1)
109+
activerecord (= 3.1.0.rc1)
110+
activeresource (= 3.1.0.rc1)
111+
activesupport (= 3.1.0.rc1)
96112
bundler (~> 1.0)
97-
railties (= 3.0.8.rc2)
98-
railties (3.0.8.rc2)
99-
actionpack (= 3.0.8.rc2)
100-
activesupport (= 3.0.8.rc2)
113+
railties (= 3.1.0.rc1)
114+
railties (3.1.0.rc1)
115+
actionpack (= 3.1.0.rc1)
116+
activesupport (= 3.1.0.rc1)
117+
rack-ssl (~> 1.3.2)
101118
rake (>= 0.8.7)
102-
thor (~> 0.14.4)
119+
thor (~> 0.14.6)
103120
rake (0.9.0)
104121
rspec (2.6.0)
105122
rspec-core (~> 2.6.0)
@@ -115,17 +132,26 @@ GEM
115132
railties (~> 3.0)
116133
rspec (~> 2.6.0)
117134
rubyzip (0.9.4)
135+
sass (3.1.1)
118136
selenium-webdriver (0.2.0)
119137
childprocess (>= 0.1.7)
120138
ffi (>= 1.0.7)
121139
json_pure
122140
rubyzip
141+
sprockets (2.0.0.beta.8)
142+
hike (~> 1.0)
143+
rack (~> 1.0)
144+
tilt (!= 1.3.0, ~> 1.1)
123145
sqlite3 (1.3.3)
124146
term-ansicolor (1.0.5)
125147
thor (0.14.6)
148+
tilt (1.3.2)
126149
treetop (1.4.9)
127150
polyglot (>= 0.3.1)
128151
tzinfo (0.3.27)
152+
uglifier (0.5.4)
153+
execjs (>= 0.3.0)
154+
multi_json (>= 1.0.2)
129155
warden (1.0.4)
130156
rack (>= 1.0)
131157
xpath (0.1.4)
@@ -135,12 +161,16 @@ PLATFORMS
135161
ruby
136162

137163
DEPENDENCIES
138-
capybara (= 1.0.0.beta1)
139-
cucumber-rails (= 0.5.1)
140-
database_cleaner (= 0.6.7)
141-
devise (= 1.3.4)
142-
factory_girl_rails (= 1.1.beta1)
143-
launchy (= 0.4.0)
144-
rails (= 3.0.8.rc2)
145-
rspec-rails (= 2.6.1)
164+
capybara (>= 1.0.0.beta1)
165+
coffee-script
166+
cucumber-rails (>= 0.5.1)
167+
database_cleaner (>= 0.6.7)
168+
devise (>= 1.3.4)
169+
factory_girl_rails (>= 1.1.beta1)
170+
jquery-rails
171+
launchy (>= 0.4.0)
172+
rails (= 3.1.0.rc1)
173+
rspec-rails (>= 2.6.1)
174+
sass
146175
sqlite3
176+
uglifier

README.textile

+23-20
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ h1. Rails 3 + Devise + RSpec + Cucumber
22

33
This is an example application for Rails 3.1 that shows how to use "Devise":http://github.com/plataformatec/devise with "RSpec":http://rspec.info/ and "Cucumber":http://cukes.info/. Devise gives you ready-made authentication and user management. RSpec is a popular alternative to the Test::Unit testing framework. Cucumber is often used with RSpec for Behaviour Driven Development.
44

5-
Best of all, there's a "detailed tutorial":https://github.com/railsapps/rails3-devise-rspec-cucumber/wiki/Tutorial (walk-through) to show how it's built.
5+
Best of all, there's a "detailed tutorial":https://github.com/RailsApps/rails3-devise-rspec-cucumber/wiki/Tutorial (walk-through) to show how it's built.
66

77
You can clone this app or generate a new Rails application using this app as a template.
88

9-
Any issues? Please create a "GitHub issue":http://github.com/railsapps/rails3-devise-rspec-cucumber/issues.
9+
Any issues? Please create a "GitHub issue":http://github.com/RailsApps/rails3-devise-rspec-cucumber/issues.
1010

1111
h2. !http://twitter-badges.s3.amazonaws.com/t_logo-a.png(Follow on Twitter)!:http://www.twitter.com/rails_apps Follow on Twitter !http://railsapps.github.com/images/mailing-list-icon.jpg(Join the Mailing List)!:http://eepurl.com/dQx3o Join the Mailing List
1212

13-
Follow the project on Twitter: "rails_apps":http://twitter.com/rails_apps. Please tweet some praise if you like what you've found.
13+
Follow the project on Twitter: "@rails_apps":http://twitter.com/rails_apps. Please tweet some praise if you like what you've found.
1414

1515
<a href="http://eepurl.com/dQx3o">Join the email list</a> (low volume, announcements only) for project updates and my tips about Rails resources.
1616

1717
h2. !http://railsapps.github.com/images/rails-36x36.jpg(Tutorial)! Tutorial
1818

1919
A complete walkthrough tutorial for Rails 3.1 is available on the GitHub wiki:
2020

21-
h4. "View the Tutorial":https://github.com/railsapps/rails3-devise-rspec-cucumber/wiki/Tutorial
21+
h4. "View the Tutorial":https://github.com/RailsApps/rails3-devise-rspec-cucumber/wiki/Tutorial
2222

2323
The tutorial documents each step to follow to create the application. Every step is documented concisely, so a complete beginner can create this application without any additional knowledge. However, no explanation is offered for any of the steps, so if you are a beginner, you’re advised to look for an introduction to Rails elsewhere. See a list of "recommended books and online resources for learning Rails":http://railsapps.github.com/best-recommended-learning-rails-books-resources.html.
2424

@@ -30,20 +30,24 @@ This is a demonstration application that allows you to visit a home page and see
3030

3131
h4. Similar Examples and Tutorials
3232

33-
If you'd like to use the Mongoid ORM with the MongoDB datastore instead of ActiveRecord and a SQLite database, see the "rails3-mongoid-devise":https://github.com/railsapps/rails3-mongoid-devise example app and tutorial. Mongoid makes development quicker without schemas or migrations. The "rails3-mongoid-devise":https://github.com/railsapps/rails3-mongoid-devise example app and tutorial shows how to set up Devise and Mongoid with RSpec and Cucumber.
33+
If you'd like to use the Mongoid ORM with the MongoDB datastore instead of ActiveRecord and a SQLite database, see the "rails3-mongoid-devise":https://github.com/RailsApps/rails3-mongoid-devise example app and tutorial. Mongoid makes development quicker without schemas or migrations. The "rails3-mongoid-devise":https://github.com/RailsApps/rails3-mongoid-devise example app and tutorial shows how to set up Devise and Mongoid with RSpec and Cucumber.
3434

3535
See an expanded list of more "Rails examples, tutorials, and starter apps":http://railsapps.github.com/rails-examples-tutorials.html.
3636

3737
h2. Dependencies
3838

39-
Before running this app, you need to install
39+
Before generating your application, you will need:
4040

4141
* The Ruby language (version 1.9.2)
42+
** @$ ruby -v@
4243
* Rails 3.1
44+
** @$ rails -v@
45+
* Rake 0.9.0
46+
** @$ rake --version@
4347

44-
This repository also contains branches for earlier version of Rails.
48+
You must update the standard Ruby installation from Rake 0.8.7 to Rake 0.9.0 before using the application templates to generate a new Rails app.
4549

46-
See "Managing Rails Versions and Gems":http://railsapps.github.com/managing-rails-versions-gems.html for detailed instructions and advice.
50+
See "Installing Rails 3.1":http://railsapps.github.com/installing-rails-3-1.html and "Managing Rails Versions and Gems":http://railsapps.github.com/managing-rails-versions-gems.html for detailed instructions and advice.
4751

4852
h2. Getting the Application
4953

@@ -84,7 +88,7 @@ The application generator template will ask you for your preferences:
8488

8589
h4. Use "Recipes" to Customize an Application Template
8690

87-
The "tutorial":https://github.com/railsapps/rails3-devise-rspec-cucumber/wiki/Tutorial shows how a customized application template can be assembled from "recipes." The application template was created using the "Rails Apps Composer":https://github.com/RailsApps/rails_apps_composer gem which provides a convenient way to assemble a reusable application template by selecting various "recipes" for popular Rails development packages.
91+
The "tutorial":https://github.com/RailsApps/rails3-devise-rspec-cucumber/wiki/Tutorial shows how a customized application template can be assembled from "recipes." The application template was created using the "Rails Apps Composer":https://github.com/RailsApps/rails_apps_composer gem which provides a convenient way to assemble a reusable application template by selecting various "recipes" for popular Rails development packages.
8892

8993
h4. Please Remember: Edit the README
9094

@@ -96,13 +100,13 @@ h4. About Required Gems
96100

97101
The application uses the following gems:
98102

99-
* rails
100-
* rspec-rails
101-
* database_cleaner
102-
* factory_girl_rails
103-
* cucumber-rails
104-
* capybara
105-
* devise
103+
* "rails":http://rubygems.org/gems/rails
104+
* "rspec-rails":http://rubygems.org/gems/rspec-rails
105+
* "database_cleaner":http://rubygems.org/gems/database_cleaner
106+
* "factory_girl_rails":http://rubygems.org/gems/factory_girl_rails
107+
* "cucumber-rails":http://rubygems.org/gems/cucumber-rails
108+
* "capybara":http://rubygems.org/gems/capybara
109+
* "devise":http://rubygems.org/gems/devise
106110

107111
See an example "Rails 3.1 Gemfile":http://railsapps.github.com/rails-3-1-example-gemfile.html.
108112

@@ -207,22 +211,21 @@ For a Devise introduction, Ryan Bates offers a "Railscast on Devise":http://rail
207211

208212
h4. Issues
209213

210-
Please create a "GitHub issue":http://github.com/railsapps/rails3-devise-rspec-cucumber/issues if you identify any problems or have suggestions for improvements.
214+
Please create a "GitHub issue":http://github.com/RailsApps/rails3-devise-rspec-cucumber/issues if you identify any problems or have suggestions for improvements.
211215

212216
h2. Contributing
213217

214218
If you make improvements to this application, please share with others.
215219

216-
Send the author a message, create an "issue":http://github.com/railsapps/rails3-devise-rspec-cucumber/issues, or fork the project and submit a pull request.
220+
Send the author a message, create an "issue":http://github.com/RailsApps/rails3-devise-rspec-cucumber/issues, or fork the project and submit a pull request.
217221

218222
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.
219223

220224
h2. Credits
221225

222226
Daniel Kehoe ("http://danielkehoe.com/":http://danielkehoe.com/) implemented the application and wrote the tutorial.
223227

224-
Is the app useful to you? Follow the project on Twitter:
225-
"rails_apps":http://twitter.com/rails_apps
228+
Is the app useful to you? Follow the project on Twitter: "@rails_apps":http://twitter.com/rails_apps
226229
and tweet some praise. I'd love to know you were helped out by what I've put together.
227230

228231
h2. License

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
#!/usr/bin/env rake
12
# Add your own tasks in files placed in lib/tasks ending in .rake,
23
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
34

45
require File.expand_path('../config/application', __FILE__)
5-
require 'rake'
66

77
Rails3DeviseRspecCucumber::Application.load_tasks

app/assets/images/rails.png

6.49 KB
Loading

app/assets/javascripts/application.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This is a manifest file that'll be compiled into including all the files listed below.
2+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3+
// be included in the compiled file accessible from http://example.com/assets/application.js
4+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5+
// the compiled file.
6+
//
7+
//= require jquery
8+
//= require jquery_ujs
9+
//= require_tree .

app/assets/javascripts/home.js.coffee

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Place all the behaviors and hooks related to the matching controller here.
2+
# All this logic will automatically be available in application.js.
3+
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Place all the behaviors and hooks related to the matching controller here.
2+
# All this logic will automatically be available in application.js.
3+
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

0 commit comments

Comments
 (0)