aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG.md5
-rw-r--r--railties/lib/rails/commands/server.rb1
-rw-r--r--railties/lib/rails/generators/named_base.rb4
-rw-r--r--railties/lib/rails/generators/rails/app/templates/Gemfile4
-rw-r--r--railties/test/generators/app_generator_test.rb4
5 files changed, 11 insertions, 7 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index ca07ff349c..c099ae2ec5 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Remove ContentLength middleware from the defaults. If you want it, just
+ add it as a middleware in your config.
+
+ *Egg McMuffin*
+
* Make it possible to customize the executable inside rerun snippets.
*Yves Senn*
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index 546d3725d8..c1bd4072ac 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -78,7 +78,6 @@ module Rails
def middleware
middlewares = []
- middlewares << [::Rack::ContentLength]
# FIXME: add Rack::Lock in the case people are using webrick.
# This is to remain backwards compatible for those who are
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb
index 01a8e2e9b4..7b527831b0 100644
--- a/railties/lib/rails/generators/named_base.rb
+++ b/railties/lib/rails/generators/named_base.rb
@@ -18,8 +18,8 @@ module Rails
parse_attributes! if respond_to?(:attributes)
end
- # Defines the template that would be used for the migration file.
- # The arguments include the source template file, the migration filename etc.
+ # Overrides <tt>Thor::Actions#template</tt> so it can tell if
+ # a template is currently being created.
no_tasks do
def template(source, *args, &block)
inside_template do
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile
index 606f1d4f96..b083381255 100644
--- a/railties/lib/rails/generators/rails/app/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -23,7 +23,7 @@ source 'https://rubygems.org'
<%- if options.api? -%>
# Use ActiveModelSerializers to serialize JSON responses
-gem 'active_model_serializers', '~> 0.10.0.rc1'
+gem 'active_model_serializers', '~> 0.10.0.rc2'
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'
@@ -38,7 +38,7 @@ end
group :development do
# Access an IRB console on exception pages or by using <%%= console %> in views
<%- if options.dev? || options.edge? -%>
- gem 'web-console', github: "rails/web-console"
+ gem 'web-console', github: 'rails/web-console'
<%- else -%>
gem 'web-console', '~> 2.0'
<%- end -%>
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index af1c05cab1..fc05127fb5 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -517,7 +517,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator [destination_root, "--dev"]
assert_file "Gemfile" do |content|
- assert_match(/gem 'web-console',\s+github: "rails\/web-console"/, content)
+ assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content)
assert_no_match(/gem 'web-console', '~> 2.0'/, content)
end
end
@@ -526,7 +526,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator [destination_root, "--edge"]
assert_file "Gemfile" do |content|
- assert_match(/gem 'web-console',\s+github: "rails\/web-console"/, content)
+ assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content)
assert_no_match(/gem 'web-console', '~> 2.0'/, content)
end
end