Skip to content

Commit fa60a10

Browse files
committed
Bumping to Rails 3.1. Syncing all the generated files with a fresh app.
1 parent c049515 commit fa60a10

File tree

16 files changed

+104
-73
lines changed

16 files changed

+104
-73
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.bundle
22
db/*.sqlite3
33
log/*.log
4-
tmp/**/*
4+
tmp/
5+
.sass-cache/
56
tmp/restart.txt
67
config/database.yml
78
public/.htaccess

Gemfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Edit this Gemfile to bundle your application's dependencies.
22
source 'http://rubygems.org'
33

4-
gem "rails", "3.1.0.rc6"
4+
gem "rails", "3.1.0"
55

66
# Gems used only for assets and not required
77
# in production environments by default.
88
group :assets do
9-
gem 'sass-rails', "~> 3.1.0.rc"
10-
gem 'coffee-rails', "~> 3.1.0.rc"
9+
gem 'sass-rails', "~> 3.1.0"
10+
gem 'coffee-rails', "~> 3.1.0"
1111
gem 'uglifier'
1212
end
1313

Gemfile.lock

+46-46
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4-
actionmailer (3.1.0.rc6)
5-
actionpack (= 3.1.0.rc6)
4+
actionmailer (3.1.0)
5+
actionpack (= 3.1.0)
66
mail (~> 2.3.0)
7-
actionpack (3.1.0.rc6)
8-
activemodel (= 3.1.0.rc6)
9-
activesupport (= 3.1.0.rc6)
7+
actionpack (3.1.0)
8+
activemodel (= 3.1.0)
9+
activesupport (= 3.1.0)
1010
builder (~> 3.0.0)
1111
erubis (~> 2.7.0)
1212
i18n (~> 0.6)
1313
rack (~> 1.3.2)
14-
rack-cache (~> 1.0.2)
15-
rack-mount (~> 0.8.1)
16-
rack-test (~> 0.6.0)
17-
sprockets (~> 2.0.0.beta.12)
18-
activemodel (3.1.0.rc6)
19-
activesupport (= 3.1.0.rc6)
20-
bcrypt-ruby (~> 2.1.4)
14+
rack-cache (~> 1.0.3)
15+
rack-mount (~> 0.8.2)
16+
rack-test (~> 0.6.1)
17+
sprockets (~> 2.0.0)
18+
activemodel (3.1.0)
19+
activesupport (= 3.1.0)
20+
bcrypt-ruby (~> 3.0.0)
2121
builder (~> 3.0.0)
2222
i18n (~> 0.6)
23-
activerecord (3.1.0.rc6)
24-
activemodel (= 3.1.0.rc6)
25-
activesupport (= 3.1.0.rc6)
23+
activerecord (3.1.0)
24+
activemodel (= 3.1.0)
25+
activesupport (= 3.1.0)
2626
arel (~> 2.2.1)
2727
tzinfo (~> 0.3.29)
28-
activeresource (3.1.0.rc6)
29-
activemodel (= 3.1.0.rc6)
30-
activesupport (= 3.1.0.rc6)
31-
activesupport (3.1.0.rc6)
28+
activeresource (3.1.0)
29+
activemodel (= 3.1.0)
30+
activesupport (= 3.1.0)
31+
activesupport (3.1.0)
3232
multi_json (~> 1.0)
3333
ansi (1.3.0)
3434
arel (2.2.1)
35-
bcrypt-ruby (2.1.4)
35+
bcrypt-ruby (3.0.0)
3636
builder (3.0.0)
3737
cancan (1.6.5)
38-
coffee-rails (3.1.0.rc.6)
38+
coffee-rails (3.1.0)
3939
coffee-script (>= 2.2.0)
4040
railties (~> 3.1.0.rc1)
4141
coffee-script (2.2.0)
4242
coffee-script-source
4343
execjs
4444
coffee-script-source (1.1.2)
45-
devise (1.4.2)
46-
bcrypt-ruby (~> 2.1.2)
45+
devise (1.4.3)
46+
bcrypt-ruby (~> 3.0)
4747
orm_adapter (~> 0.0.3)
4848
warden (~> 1.0.3)
4949
erubis (2.7.0)
@@ -63,51 +63,51 @@ GEM
6363
orm_adapter (0.0.5)
6464
polyglot (0.3.2)
6565
rack (1.3.2)
66-
rack-cache (1.0.2)
66+
rack-cache (1.0.3)
6767
rack (>= 0.4)
68-
rack-mount (0.8.2)
68+
rack-mount (0.8.3)
6969
rack (>= 1.0.0)
7070
rack-ssl (1.3.2)
7171
rack
7272
rack-test (0.6.1)
7373
rack (>= 1.0)
74-
rails (3.1.0.rc6)
75-
actionmailer (= 3.1.0.rc6)
76-
actionpack (= 3.1.0.rc6)
77-
activerecord (= 3.1.0.rc6)
78-
activeresource (= 3.1.0.rc6)
79-
activesupport (= 3.1.0.rc6)
74+
rails (3.1.0)
75+
actionmailer (= 3.1.0)
76+
actionpack (= 3.1.0)
77+
activerecord (= 3.1.0)
78+
activeresource (= 3.1.0)
79+
activesupport (= 3.1.0)
8080
bundler (~> 1.0)
81-
railties (= 3.1.0.rc6)
82-
railties (3.1.0.rc6)
83-
actionpack (= 3.1.0.rc6)
84-
activesupport (= 3.1.0.rc6)
81+
railties (= 3.1.0)
82+
railties (3.1.0)
83+
actionpack (= 3.1.0)
84+
activesupport (= 3.1.0)
8585
rack-ssl (~> 1.3.2)
8686
rake (>= 0.8.7)
8787
rdoc (~> 3.4)
8888
thor (~> 0.14.6)
8989
rake (0.9.2)
90-
rdoc (3.9.3)
90+
rdoc (3.9.4)
9191
rmagick (2.13.1)
9292
sass (3.1.7)
93-
sass-rails (3.1.0.rc.6)
94-
actionpack (~> 3.1.0.rc6)
95-
railties (~> 3.1.0.rc6)
93+
sass-rails (3.1.0)
94+
actionpack (~> 3.1.0)
95+
railties (~> 3.1.0)
9696
sass (>= 3.1.4)
97-
sprockets (2.0.0.beta.14)
97+
sprockets (2.0.0)
9898
hike (~> 1.2)
9999
rack (~> 1.0)
100-
tilt (~> 1.1, != 1.3.0)
100+
tilt (!= 1.3.0, ~> 1.1)
101101
sqlite3 (1.3.4)
102102
thor (0.14.6)
103-
tilt (1.3.2)
103+
tilt (1.3.3)
104104
treetop (1.4.10)
105105
polyglot
106106
polyglot (>= 0.3.1)
107107
turn (0.8.2)
108108
ansi (>= 1.2.2)
109109
tzinfo (0.3.29)
110-
uglifier (1.0.1)
110+
uglifier (1.0.2)
111111
execjs (>= 0.3.0)
112112
multi_json (>= 1.0.2)
113113
warden (1.0.5)
@@ -118,12 +118,12 @@ PLATFORMS
118118

119119
DEPENDENCIES
120120
cancan
121-
coffee-rails (~> 3.1.0.rc)
121+
coffee-rails (~> 3.1.0)
122122
devise
123123
jquery-rails
124-
rails (= 3.1.0.rc6)
124+
rails (= 3.1.0)
125125
rmagick (>= 2.12.2)
126-
sass-rails (~> 3.1.0.rc)
126+
sass-rails (~> 3.1.0)
127127
sqlite3
128128
turn
129129
uglifier

app/controllers/application_controller.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ class ApplicationController < ActionController::Base
33
before_filter :set_locale
44

55
def set_locale
6-
if user_signed_in? && current_user.locale != ""
7-
session[:locale] = current_user.locale
8-
end
9-
10-
I18n.locale = session[:locale] || I18n.default_locale
6+
if user_signed_in? && current_user.locale != ""
7+
session[:locale] = current_user.locale
8+
end
9+
10+
I18n.locale = session[:locale] || I18n.default_locale
1111
end
1212
end

app/mailers/.gitkeep

Whitespace-only changes.

app/views/layouts/application.html.erb

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
<html>
33
<head>
44
<title><%= controller.action_name.titleize %> - <%= controller.controller_name.titleize %> - Concerto Signage Panel</title>
5-
6-
<%#= stylesheet_link_tag 'base' %>
7-
<%#= stylesheet_link_tag 'jquery-ui-1.8.5.custom' %>
8-
<%#= stylesheet_link_tag 'datetime' %>
9-
5+
106
<%= stylesheet_link_tag "application" %>
117
<%= javascript_include_tag "application" %>
128

config/application.rb

+9-7
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
require 'rails/all'
44

5-
# If you have a Gemfile, require the default gems, the ones in the
6-
# current environment and also include :assets gems if in development
7-
# or test environments.
8-
Bundler.require *Rails.groups(:assets) if defined?(Bundler)
5+
if defined?(Bundler)
6+
# If you precompile assets before deploying to production, use this line
7+
Bundler.require *Rails.groups(:assets => %w(development test))
8+
# If you want your assets lazily compiled in production, use this line
9+
# Bundler.require(:default, :assets, Rails.env)
10+
end
911

1012
module Concerto
1113
class Application < Rails::Application
@@ -32,9 +34,6 @@ class Application < Rails::Application
3234
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
3335
config.i18n.default_locale = :en
3436

35-
# JavaScript files you want as :defaults (application.js is always included).
36-
# config.action_view.javascript_expansions[:defaults] = ['jquery-1.4.3', 'jquery-ujs/src/rails']
37-
3837
# Configure the default encoding used in templates for Ruby 1.9.
3938
config.encoding = "utf-8"
4039

@@ -43,5 +42,8 @@ class Application < Rails::Application
4342

4443
# Enable the asset pipeline
4544
config.assets.enabled = true
45+
46+
# Version of your assets, change this if you want to expire all your assets
47+
config.assets.version = '1.0'
4648
end
4749
end

config/environments/development.rb

+3
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@
2424

2525
# Do not compress assets
2626
config.assets.compress = false
27+
28+
# Expands the lines which load the assets
29+
config.assets.debug = true
2730
end

config/environments/production.rb

+11-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@
1414
# Compress JavaScripts and CSS
1515
config.assets.compress = true
1616

17+
# Don't fallback to assets pipeline if a precompiled asset is missed
18+
config.assets.compile = false
19+
20+
# Generate digests for assets URLs
21+
config.assets.digest = true
22+
23+
# Defaults to Rails.root.join("public/assets")
24+
# config.assets.manifest = YOUR_PATH
25+
1726
# Specifies the header that your server uses for sending files
18-
# (comment out if your front-end server doesn't support this)
19-
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
27+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
2029

2130
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
2231
# config.force_ssl = true

config/environments/test.rb

+3
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@
3636

3737
# Print deprecation notices to the stderr
3838
config.active_support.deprecation = :stderr
39+
40+
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
41+
config.assets.allow_debugging = true
3942
end

config/initializers/session_store.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
# Use the database for sessions instead of the cookie-based default,
66
# which shouldn't be used to store highly confidential information
7-
# (create the session table with "rake db:sessions:create")
7+
# (create the session table with "rails generate session_migration")
88
# Concerto::Application.config.session_store :active_record_store
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Be sure to restart your server when you modify this file.
2+
#
3+
# This file contains settings for ActionController::ParamsWrapper which
4+
# is enabled by default.
5+
6+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7+
ActiveSupport.on_load(:action_controller) do
8+
wrap_parameters :format => [:json]
9+
end
10+
11+
# Disable root element in JSON by default.
12+
ActiveSupport.on_load(:active_record) do
13+
self.include_root_in_json = false
14+
end

lib/assets/.gitkeep

Whitespace-only changes.

test/performance/browsing_test.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
require 'test_helper'
22
require 'rails/performance_test_help'
33

4-
# Profiling results for each test method are written to tmp/performance.
5-
class BrowsingTest < ActionController::PerformanceTest
4+
class BrowsingTest < ActionDispatch::PerformanceTest
5+
# Refer to the documentation for all available options
6+
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7+
# :output => 'tmp/performance', :formats => [:flat] }
8+
69
def test_homepage
710
get '/'
811
end

test/test_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ENV["RAILS_ENV"] = "test"
2-
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
2+
require File.expand_path('../../config/environment', __FILE__)
33
require 'rails/test_help'
44

55
class ActiveSupport::TestCase

vendor/assets/stylesheets/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)