diff options
Diffstat (limited to 'railties/lib')
6 files changed, 11 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index bbdd000ad9..21a2ae4e28 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -200,9 +200,11 @@ module Rails def assets_gemfile_entry <<-GEMFILE.strip_heredoc + # Gems used only for assets and not required + # in production environments by default. group :assets do - gem 'sass-rails', :git => 'git://github.com/rails/sass-rails' - gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails' + gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git' + gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git' gem 'uglifier' end GEMFILE diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 88eea40b1b..c83e7ddf80 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -7,10 +7,7 @@ source 'http://rubygems.org' <%= "gem 'jruby-openssl'\n" if defined?(JRUBY_VERSION) -%> <%= "gem 'json'\n" if RUBY_VERSION < "1.9.2" -%> -# Gems used only for assets and not required -# in production environments by default. <%= assets_gemfile_entry %> - <%= javascript_gemfile_entry %> # Use unicorn as the web server diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt index ee068b0202..80198cc21e 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt @@ -34,6 +34,11 @@ # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql + <%- unless options.skip_active_record? -%> + # Raise exception on mass assignment protection for ActiveRecord models + config.active_record.mass_assignment_sanitizer = :strict + <%- end -%> + # Print deprecation notices to the stderr config.active_support.deprecation = :stderr end diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 56b1587760..c46422437d 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -19,6 +19,7 @@ module Rails empty_directory_with_gitkeep "app/controllers" empty_directory_with_gitkeep "app/views" empty_directory_with_gitkeep "app/helpers" + empty_directory_with_gitkeep "app/mailers" empty_directory_with_gitkeep "app/assets/images/#{name}" end end diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/app/mailers/.empty_directory b/railties/lib/rails/generators/rails/plugin_new/templates/app/mailers/.empty_directory new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/railties/lib/rails/generators/rails/plugin_new/templates/app/mailers/.empty_directory diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index 833fcb6f72..8b4775d1d3 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -14,7 +14,7 @@ task :secret do end desc 'List versions of all Rails frameworks and the environment' -task :about do +task :about => :environment do puts Rails::Info end |