Skip to content

Commit

Permalink
Upgrade to Rails 3.1, I think.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Hamill committed Sep 14, 2011
1 parent 3cb639f commit 03b7259
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 91 deletions.
16 changes: 12 additions & 4 deletions Gemfile
@@ -1,18 +1,26 @@
source 'http://rubygems.org'

gem 'rails', '3.1.0rc4'
gem 'rails', '3.1.0'

gem 'pg'
gem 'thin'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end

gem 'devise'
gem 'slim'
gem 'sass'
gem 'coffee-script'
gem 'jquery-rails'
gem 'uglifier'

group :development, :test do
gem 'pry'
gem 'heroku'
gem 'rspec-rails'
# Pretty printed test output
gem 'turn', :require => false
end
159 changes: 94 additions & 65 deletions Gemfile.lock
@@ -1,99 +1,113 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0.rc4)
actionpack (= 3.1.0.rc4)
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0.rc4)
activemodel (= 3.1.0.rc4)
activesupport (= 3.1.0.rc4)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.0)
rack-cache (~> 1.0.1)
rack-mount (~> 0.8.1)
rack-test (~> 0.6.0)
sprockets (~> 2.0.0.beta.10)
tzinfo (~> 0.3.27)
activemodel (3.1.0.rc4)
activesupport (= 3.1.0.rc4)
bcrypt-ruby (~> 2.1.4)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0.rc4)
activemodel (= 3.1.0.rc4)
activesupport (= 3.1.0.rc4)
arel (~> 2.1.1)
tzinfo (~> 0.3.27)
activeresource (3.1.0.rc4)
activemodel (= 3.1.0.rc4)
activesupport (= 3.1.0.rc4)
activesupport (3.1.0.rc4)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
arel (2.1.3)
bcrypt-ruby (2.1.4)
addressable (2.2.6)
ansi (1.3.0)
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
coderay (0.9.8)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.1)
coffee-script-source (1.1.2)
daemons (1.1.4)
devise (1.4.2)
bcrypt-ruby (~> 2.1.2)
devise (1.4.5)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.2)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.0)
execjs (1.2.6)
multi_json (~> 1.0)
heroku (2.3.6)
heroku (2.7.0)
launchy (>= 0.3.2)
rest-client (~> 1.6.1)
rubyzip
term-ansicolor (~> 1.0.5)
hike (1.2.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.12)
jquery-rails (1.0.14)
railties (~> 3.0)
thor (~> 0.14)
launchy (2.0.3)
launchy (2.0.5)
addressable (~> 2.2.6)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.6.5)
ruby_parser (>= 2.0.5)
mime-types (1.16)
multi_json (1.0.3)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.1)
rack (1.3.1)
rack-cache (1.0.2)
polyglot (0.3.2)
pry (0.9.5)
coderay (>= 0.9.8)
method_source (>= 0.6.5)
ruby_parser (>= 2.0.5)
slop (~> 2.1.0)
rack (1.3.2)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.1)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.0)
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.0.rc4)
actionmailer (= 3.1.0.rc4)
actionpack (= 3.1.0.rc4)
activerecord (= 3.1.0.rc4)
activeresource (= 3.1.0.rc4)
activesupport (= 3.1.0.rc4)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0.rc4)
railties (3.1.0.rc4)
actionpack (= 3.1.0.rc4)
activesupport (= 3.1.0.rc4)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2)
rdoc (3.8)
rest-client (1.6.3)
rdoc (3.9.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.6.0)
rspec-core (~> 2.6.0)
Expand All @@ -108,43 +122,58 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
sass (3.1.4)
slim (0.9.4)
temple (~> 0.3.0)
tilt (~> 1.2)
sprockets (2.0.0.beta.10)
hike (~> 1.0)
ruby_parser (2.3.0)
sexp_processor (~> 3.0)
rubyzip (0.9.4)
sass (3.1.7)
sass-rails (3.1.1)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.4)
tilt (~> 1.3.2)
sexp_processor (3.0.6)
slim (1.0.2)
temple (~> 0.3.3)
tilt (~> 1.3.2)
slop (2.1.0)
sprockets (2.0.0)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
temple (0.3.2)
temple (0.3.4)
term-ansicolor (1.0.6)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.29)
uglifier (1.0.0)
uglifier (1.0.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.4)
warden (1.0.5)
rack (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
coffee-script
coffee-rails (~> 3.1.0)
devise
heroku
jquery-rails
pg
rails (= 3.1.0rc4)
pry
rails (= 3.1.0)
rspec-rails
sass
sass-rails (~> 3.1.0)
slim
thin
turn
uglifier
23 changes: 11 additions & 12 deletions config/application.rb
@@ -1,15 +1,18 @@
require File.expand_path('../boot', __FILE__)

# Pick the frameworks you want:
# require 'rails/all'
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
# require "rails/test_unit/railtie"
require "sprockets/railtie"

# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end

module BeerRun
class Application < Rails::Application
Expand All @@ -35,13 +38,6 @@ 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(prototype prototype_ujs)

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

Expand All @@ -50,5 +46,8 @@ class Application < Rails::Application

# Enable the asset pipeline
config.assets.enabled = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end
6 changes: 6 additions & 0 deletions config/environments/development.rb
Expand Up @@ -21,4 +21,10 @@

# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin

# Do not compress assets
config.assets.compress = false

# Expands the lines which load the assets
config.assets.debug = true
end
18 changes: 13 additions & 5 deletions config/environments/production.rb
Expand Up @@ -11,13 +11,21 @@
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false

# Compress both stylesheets and JavaScripts
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :scss
# Compress JavaScripts and CSS
config.assets.compress = true

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false

# Generate digests for assets URLs
config.assets.digest = true

# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH

# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
Expand Down
3 changes: 3 additions & 0 deletions config/environments/test.rb
Expand Up @@ -36,4 +36,7 @@

# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr

# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true
end
12 changes: 7 additions & 5 deletions config/initializers/wrap_parameters.rb
@@ -1,12 +1,14 @@
# Be sure to restart your server when you modify this file.
#
# This file contains the settings for ActionController::ParametersWrapper
# which will be enabled by default in the upcoming version of Ruby on Rails.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.

# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActionController::Base.wrap_parameters format: [:json]
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
end

# Disable root element in JSON by default.
if defined?(ActiveRecord)
ActiveRecord::Base.include_root_in_json = false
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
Empty file added lib/assets/.gitkeep
Empty file.

0 comments on commit 03b7259

Please sign in to comment.