Re-run rails generator for 3.1.0 final

This commit is contained in:
Erik Michaels-Ober 2011-09-03 13:09:54 -07:00
parent 30dcf9d4ac
commit 8d14295ffc
8 changed files with 40 additions and 12 deletions

View File

@ -0,0 +1,7 @@
// 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_tree .

View File

@ -9,7 +9,6 @@
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js" = javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"
= javascript_include_tag "https://github.com/scottschiller/Snowstorm/raw/master/snowstorm-min.js" = javascript_include_tag "https://github.com/scottschiller/Snowstorm/raw/master/snowstorm-min.js"
= javascript_include_tag "application" = javascript_include_tag "application"
= javascript_include_tag "analytics"
= csrf_meta_tag = csrf_meta_tag
%meta{:name => "viewport", :content => "initial-scale=1.0, user-scalable=no"} %meta{:name => "viewport", :content => "initial-scale=1.0, user-scalable=no"}
%body %body

View File

@ -2,10 +2,12 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'
# If you have a Gemfile, require the default gems, the ones in the if defined?(Bundler)
# current environment and also include :assets gems if in development # If you precompile assets before deploying to production, use this line
# or test environments. Bundler.require *Rails.groups(:assets => %w(development test))
Bundler.require *Rails.groups(:assets) if defined?(Bundler) # If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module AdoptAHydrant module AdoptAHydrant
class Application < Rails::Application class Application < Rails::Application
@ -39,5 +41,8 @@ module AdoptAHydrant
# Enable the asset pipeline # Enable the asset pipeline
config.assets.enabled = true 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
end end

View File

@ -25,4 +25,7 @@ AdoptAHydrant::Application.configure do
# Do not compress assets # Do not compress assets
config.assets.compress = false config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end end

View File

@ -9,14 +9,23 @@ AdoptAHydrant::Application.configure do
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this) # Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true config.serve_static_assets = false
# Compress JavaScripts and CSS # Compress JavaScripts and CSS
config.assets.compress = true 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 # 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" # for apache
config.action_dispatch.x_sendfile_header = nil # Use 'X-Accel-Redirect' for nginx # 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. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true # config.force_ssl = true

View File

@ -37,4 +37,7 @@ AdoptAHydrant::Application.configure do
# Print deprecation notices to the stderr # Print deprecation notices to the stderr
config.active_support.deprecation = :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 end

View File

@ -4,9 +4,11 @@
# is enabled by default. # is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. # 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. # Disable root element in JSON by default.
if defined?(ActiveRecord) ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.include_root_in_json = false self.include_root_in_json = false
end end

View File

@ -1,6 +1,6 @@
ENV["RAILS_ENV"] = "test"
require 'simplecov' require 'simplecov'
SimpleCov.start 'rails' SimpleCov.start 'rails'
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__) require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help' require 'rails/test_help'
require 'webmock/test_unit' require 'webmock/test_unit'