Re-run rails generator for 3.1.0 final
This commit is contained in:
parent
30dcf9d4ac
commit
8d14295ffc
|
@ -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 .
|
|
@ -9,7 +9,6 @@
|
|||
= 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 "application"
|
||||
= javascript_include_tag "analytics"
|
||||
= csrf_meta_tag
|
||||
%meta{:name => "viewport", :content => "initial-scale=1.0, user-scalable=no"}
|
||||
%body
|
||||
|
|
|
@ -2,10 +2,12 @@ require File.expand_path('../boot', __FILE__)
|
|||
|
||||
require 'rails/all'
|
||||
|
||||
# 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)
|
||||
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 AdoptAHydrant
|
||||
class Application < Rails::Application
|
||||
|
@ -39,5 +41,8 @@ module AdoptAHydrant
|
|||
|
||||
# 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
|
||||
|
|
|
@ -25,4 +25,7 @@ AdoptAHydrant::Application.configure do
|
|||
|
||||
# Do not compress assets
|
||||
config.assets.compress = false
|
||||
|
||||
# Expands the lines which load the assets
|
||||
config.assets.debug = true
|
||||
end
|
||||
|
|
|
@ -9,14 +9,23 @@ AdoptAHydrant::Application.configure do
|
|||
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 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 = nil # 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
|
||||
|
|
|
@ -37,4 +37,7 @@ AdoptAHydrant::Application.configure do
|
|||
|
||||
# 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
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
# 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
ENV["RAILS_ENV"] = "test"
|
||||
require 'simplecov'
|
||||
SimpleCov.start 'rails'
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
require 'webmock/test_unit'
|
||||
|
|
Loading…
Reference in New Issue