Skip to content

Commit

Permalink
update app to Rails 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuity committed Jun 1, 2011
1 parent ec00f4f commit 36ac2d7
Show file tree
Hide file tree
Showing 25 changed files with 211 additions and 451 deletions.
26 changes: 15 additions & 11 deletions Gemfile
@@ -1,12 +1,16 @@
source 'http://rubygems.org'
gem 'rails', '3.0.8.rc2'
gem "rspec-rails", "2.6.1", :group => [:development, :test]
gem "database_cleaner", "0.6.7", :group => :test
gem "mongoid-rspec", "1.4.2", :group => :test
gem "factory_girl_rails", "1.1.beta1", :group => :test
gem "cucumber-rails", "0.5.1", :group => :test
gem "capybara", "1.0.0.beta1", :group => :test
gem "launchy", "0.4.0", :group => :test
gem "bson_ext", "1.3.1"
gem "mongoid", "2.0.2"
gem "devise", "1.3.4"
gem 'rails', '3.1.0.rc1'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.2", :group => :test
gem "factory_girl_rails", ">= 1.1.beta1", :group => :test
gem "cucumber-rails", ">= 0.5.1", :group => :test
gem "capybara", ">= 1.0.0.beta1", :group => :test
gem "launchy", ">= 0.4.0", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.0.2"
gem "devise", ">= 1.3.4"
154 changes: 92 additions & 62 deletions Gemfile.lock
@@ -1,38 +1,41 @@
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.8.rc2)
actionpack (= 3.0.8.rc2)
mail (~> 2.2.19)
actionpack (3.0.8.rc2)
activemodel (= 3.0.8.rc2)
activesupport (= 3.0.8.rc2)
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.8.rc2)
activesupport (= 3.0.8.rc2)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.8.rc2)
activemodel (= 3.0.8.rc2)
activesupport (= 3.0.8.rc2)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.8.rc2)
activemodel (= 3.0.8.rc2)
activesupport (= 3.0.8.rc2)
activesupport (3.0.8.rc2)
arel (2.0.10)
actionmailer (3.1.0.rc1)
actionpack (= 3.1.0.rc1)
mail (~> 2.3.0)
actionpack (3.1.0.rc1)
activemodel (= 3.1.0.rc1)
activesupport (= 3.1.0.rc1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6.0beta1)
rack (~> 1.3.0.beta2)
rack-cache (~> 1.0.1)
rack-mount (~> 0.8.1)
rack-test (~> 0.6.0)
sprockets (~> 2.0.0.beta.5)
tzinfo (~> 0.3.27)
activemodel (3.1.0.rc1)
activesupport (= 3.1.0.rc1)
bcrypt-ruby (~> 2.1.4)
builder (~> 3.0.0)
i18n (~> 0.6.0beta1)
activerecord (3.1.0.rc1)
activemodel (= 3.1.0.rc1)
activesupport (= 3.1.0.rc1)
arel (~> 2.1.1)
tzinfo (~> 0.3.27)
activeresource (3.1.0.rc1)
activemodel (= 3.1.0.rc1)
activesupport (= 3.1.0.rc1)
activesupport (3.1.0.rc1)
multi_json (~> 1.0)
arel (2.1.1)
bcrypt-ruby (2.1.4)
bson (1.3.1)
bson_ext (1.3.1)
builder (2.1.2)
builder (3.0.0)
capybara (1.0.0.beta1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
Expand All @@ -42,6 +45,10 @@ GEM
xpath (~> 0.1.4)
childprocess (0.1.9)
ffi (~> 1.0.6)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.1)
configuration (1.2.0)
cucumber (0.10.3)
builder (>= 2.1.2)
Expand All @@ -60,23 +67,27 @@ GEM
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
erubis (2.7.0)
execjs (1.0.0)
multi_json (~> 1.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.9)
gherkin (2.3.9)
gherkin (2.3.10)
json (>= 1.4.6)
i18n (0.5.0)
hike (1.0.0)
i18n (0.6.0)
jquery-rails (1.0.9)
railties (~> 3.0)
thor (~> 0.14)
json (1.5.1)
json_pure (1.5.1)
launchy (0.4.0)
configuration (>= 0.0.5)
rake (>= 0.8.1)
mail (2.2.19)
activesupport (>= 2.3.6)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
Expand All @@ -90,28 +101,34 @@ GEM
mongoid-rspec (1.4.2)
mongoid (~> 2.0)
rspec (~> 2)
multi_json (1.0.3)
nokogiri (1.4.4)
orm_adapter (0.0.5)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack (1.3.0)
rack-cache (1.0.2)
rack (>= 0.4)
rack-mount (0.8.1)
rack (>= 1.0.0)
rack-test (0.5.7)
rack-ssl (1.3.2)
rack
rack-test (0.6.0)
rack (>= 1.0)
rails (3.0.8.rc2)
actionmailer (= 3.0.8.rc2)
actionpack (= 3.0.8.rc2)
activerecord (= 3.0.8.rc2)
activeresource (= 3.0.8.rc2)
activesupport (= 3.0.8.rc2)
rails (3.1.0.rc1)
actionmailer (= 3.1.0.rc1)
actionpack (= 3.1.0.rc1)
activerecord (= 3.1.0.rc1)
activeresource (= 3.1.0.rc1)
activesupport (= 3.1.0.rc1)
bundler (~> 1.0)
railties (= 3.0.8.rc2)
railties (3.0.8.rc2)
actionpack (= 3.0.8.rc2)
activesupport (= 3.0.8.rc2)
railties (= 3.1.0.rc1)
railties (3.1.0.rc1)
actionpack (= 3.1.0.rc1)
activesupport (= 3.1.0.rc1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.9.0)
thor (~> 0.14.6)
rake (0.9.1)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
Expand All @@ -126,16 +143,25 @@ GEM
railties (~> 3.0)
rspec (~> 2.6.0)
rubyzip (0.9.4)
selenium-webdriver (0.2.0)
sass (3.1.2)
selenium-webdriver (0.2.1)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
rubyzip
sprockets (2.0.0.beta.9)
hike (~> 1.0)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
term-ansicolor (1.0.5)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.27)
uglifier (0.5.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.4)
rack (>= 1.0)
xpath (0.1.4)
Expand All @@ -145,14 +171,18 @@ PLATFORMS
ruby

DEPENDENCIES
bson_ext (= 1.3.1)
capybara (= 1.0.0.beta1)
cucumber-rails (= 0.5.1)
database_cleaner (= 0.6.7)
devise (= 1.3.4)
factory_girl_rails (= 1.1.beta1)
launchy (= 0.4.0)
mongoid (= 2.0.2)
mongoid-rspec (= 1.4.2)
rails (= 3.0.8.rc2)
rspec-rails (= 2.6.1)
bson_ext (>= 1.3.1)
capybara (>= 1.0.0.beta1)
coffee-script
cucumber-rails (>= 0.5.1)
database_cleaner (>= 0.6.7)
devise (>= 1.3.4)
factory_girl_rails (>= 1.1.beta1)
jquery-rails
launchy (>= 0.4.0)
mongoid (>= 2.0.2)
mongoid-rspec (>= 1.4.2)
rails (= 3.1.0.rc1)
rspec-rails (>= 2.6.1)
sass
uglifier
Binary file added app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
3 changes: 3 additions & 0 deletions app/assets/javascripts/home.js.coffee
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/users.js.coffee
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
28 changes: 28 additions & 0 deletions app/assets/stylesheets/application.css
@@ -0,0 +1,28 @@
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
*/
ul.hmenu {
list-style: none;
margin: 0 0 2em;
padding: 0;
}
ul.hmenu li {
display: inline;
}
#flash_notice, #flash_alert {
padding: 5px 8px;
margin: 10px 0;
}
#flash_notice {
background-color: #CFC;
border: solid 1px #6C6;
}
#flash_alert {
background-color: #FCC;
border: solid 1px #C66;
}

5 changes: 5 additions & 0 deletions app/assets/stylesheets/home.css.scss
@@ -0,0 +1,5 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
You can use Sass (SCSS) here: http://sass-lang.com/
*/
5 changes: 5 additions & 0 deletions app/assets/stylesheets/users.css.scss
@@ -0,0 +1,5 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
You can use Sass (SCSS) here: http://sass-lang.com/
*/
File renamed without changes.
6 changes: 3 additions & 3 deletions app/views/layouts/application.html.erb
Expand Up @@ -2,9 +2,9 @@
<html>
<head>
<title>Rails3MongoidDevise</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<ul class="hmenu">
Expand Down
11 changes: 9 additions & 2 deletions config/application.rb
Expand Up @@ -5,7 +5,7 @@
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
# require "rails/test_unit/railtie"
# # require "rails/test_unit/railtie"

# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Expand Down Expand Up @@ -42,13 +42,20 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de

# Please note that JavaScript expansions are *ignored altogether* if the asset
# pipeline is enabled (see config.assets.enabled below). Put your defaults in
# app/assets/javascripts/application.js in that case.
#
# JavaScript files you want as :defaults (application.js is always included).
config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
# config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs)

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password, :password_confirmation]

# Enable the asset pipeline
config.assets.enabled = true
end
end
4 changes: 1 addition & 3 deletions config/environments/development.rb
Expand Up @@ -3,15 +3,14 @@

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false

# ActionMailer Config
Expand All @@ -29,4 +28,3 @@
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
end

0 comments on commit 36ac2d7

Please sign in to comment.