Skip to content
Browse files

Reconfigure assets for Rails 3.1.0.rc5

  • Loading branch information...
1 parent 86e4de4 commit a0bec294bf4019b6e614cad40d3a092af4cd7c9c @sferik sferik committed Jul 30, 2011
View
6 Gemfile
@@ -1,18 +1,20 @@
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc5'
-gem 'coffee-script'
gem 'devise'
gem 'geokit'
gem 'haml', '~> 3.2.0.alpha'
gem 'therubyracer', :platforms => :ruby
-gem 'uglifier'
platforms :jruby do
gem 'jruby-openssl'
gem 'therubyrhino'
end
+group :assets do
+ gem 'uglifier'
+end
+
group :development, :production do
gem 'pg'
end
View
5 Gemfile.lock
@@ -38,10 +38,6 @@ GEM
bcrypt-ruby (2.1.4-java)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
- coffee-script (2.2.0)
- coffee-script-source
- execjs
- coffee-script-source (1.1.1)
crack (0.1.8)
devise (1.4.2)
bcrypt-ruby (~> 2.1.2)
@@ -126,7 +122,6 @@ PLATFORMS
DEPENDENCIES
ZenTest
- coffee-script
devise
geokit
haml (~> 3.2.0.alpha)
View
23 config/application.rb
@@ -1,13 +1,11 @@
require File.expand_path('../boot', __FILE__)
-require "active_record/railtie"
-require "action_controller/railtie"
-require "action_mailer/railtie"
-require "rails/test_unit/railtie"
+require 'rails/all'
-# 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 you have a Gemfile, require the default gems, the ones in the
+# current environment and also include :assets gems if in development
+# or test environments.
+Bundler.require *Rails.groups(:assets) if defined?(Bundler)
module AdoptAHydrant
class Application < Rails::Application
@@ -33,23 +31,12 @@ 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"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
- # Enable IdentityMap for Active Record, to disable set to false or remove the line below.
- config.active_record.identity_map = true
-
# Enable the asset pipeline
config.assets.enabled = true
end
View
4 config/environments/development.rb
@@ -15,11 +15,13 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
- config.action_mailer.default_url_options = {:host => 'localhost:3000'}
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
+
+ # Do not compress assets
+ config.assets.compress = false
end
View
14 config/environments/production.rb
@@ -9,11 +9,10 @@
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
- config.serve_static_assets = true
+ 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
# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)
@@ -31,15 +30,14 @@
# Use a different cache store in production
# config.cache_store = :mem_cache_store
- # Enable serving of images, stylesheets, and javascripts from an asset server
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
- config.action_mailer.raise_delivery_errors = true
- config.action_mailer.delivery_method = :smtp
- config.action_mailer.default_url_options = {:host => 'adoptahydrant.org'}
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
View
1 config/environments/test.rb
@@ -28,7 +28,6 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
- config.action_mailer.default_url_options = {:host => 'localhost:3000'}
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
View
6 config/initializers/wrap_parameters.rb
@@ -1,9 +1,9 @@
# 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 empty array.
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActionController::Base.wrap_parameters :format => [:json]
# Disable root element in JSON by default.
View
0 lib/assets/.gitkeep
No changes.
View
2 test/performance/browsing_test.rb
@@ -5,7 +5,7 @@ class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
# :output => 'tmp/performance', :formats => [:flat] }
-
+
def test_homepage
get '/'
end

0 comments on commit a0bec29

Please sign in to comment.
Something went wrong with that request. Please try again.