railties 4.2.0.rc3 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88874438743eb9e5522e5331297d6c94bc06e141
4
- data.tar.gz: 15f485dbfedcf89849b0c8b3a22a29c39da7e1c0
3
+ metadata.gz: 55baacf9acdd0d42344c849d3b057fbc89ac979d
4
+ data.tar.gz: 9ade7f6a3318f7aad6227abcc28c18bece50ebb1
5
5
  SHA512:
6
- metadata.gz: 9bd2a6f33ffceb1f5dad6d8ba92dc87ebebb3841e0d171a9539add1544ac5e8548daddb6505f4bb076cca9edff4f4a52ab2c1f76fae374888b818bf5aad5af86
7
- data.tar.gz: de8253f7d0311d9929889893376e781728701ba4a91136c8b361b6e47413bc13f079b1c2669271a427caf336d3488d7632e9e29d3be16c52e1e39289a9cb9ca9
6
+ metadata.gz: eae7ddad125a425b93487bd646b65c1fa058d73ee993cdd1729a7bc631d61a1ed6466a7ef5bad146e9bf27d5f7afd02af2c4dc27d5a93590ce27f0e9c5ec569d
7
+ data.tar.gz: 23e2210d29927128d38510c7c6ccc73d3c199d2aaed0e8eaa8a4233a3e14d128a70eba2ecf1b28c39b0310aa2c6908953b19781286aa206d6c57c199bed2ab35
@@ -1,3 +1,14 @@
1
+ * Deprecate `config.serve_static_assets` in favor of `config.serve_static_files`
2
+ to clarify that the option is unrelated to the asset pipeline.
3
+
4
+ *Godfrey Chan*
5
+
6
+ * `config.serve_static_files` can now be set from an environment variable in
7
+ production mode. The feature remains off by default, but can be enabled by
8
+ setting `RAILS_SERVE_STATIC_FILES` to a non-empty string at boot time.
9
+
10
+ *Richard Schneeman*, *Godfrey Chan*
11
+
1
12
  * Generated migrations add the appropriate foreign key constraints to
2
13
  references.
3
14
 
@@ -1,5 +1,7 @@
1
1
  require 'active_support/core_ext/kernel/reporting'
2
+ require 'active_support/core_ext/string/filters'
2
3
  require 'active_support/file_update_checker'
4
+ require 'active_support/deprecation'
3
5
  require 'rails/engine/configuration'
4
6
  require 'rails/source_annotation_extractor'
5
7
 
@@ -11,7 +13,7 @@ module Rails
11
13
  :eager_load, :exceptions_app, :file_watcher, :filter_parameters,
12
14
  :force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags,
13
15
  :railties_order, :relative_url_root, :secret_key_base, :secret_token,
14
- :serve_static_assets, :ssl_options, :static_cache_control, :session_options,
16
+ :serve_static_files, :ssl_options, :static_cache_control, :session_options,
15
17
  :time_zone, :reload_classes_only_on_change,
16
18
  :beginning_of_week, :filter_redirect, :x
17
19
 
@@ -25,7 +27,7 @@ module Rails
25
27
  @filter_parameters = []
26
28
  @filter_redirect = []
27
29
  @helpers_paths = []
28
- @serve_static_assets = true
30
+ @serve_static_files = true
29
31
  @static_cache_control = nil
30
32
  @force_ssl = false
31
33
  @ssl_options = {}
@@ -139,6 +141,25 @@ module Rails
139
141
  self.generators.colorize_logging = val
140
142
  end
141
143
 
144
+ # :nodoc:
145
+ SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE = <<-MSG.squish
146
+ The configuration option `config.serve_static_assets` has been renamed
147
+ to `config.serve_static_files` to clarify its role (it merely enables
148
+ serving everything in the `public` folder and is unrelated to the asset
149
+ pipeline). The `serve_static_assets` alias will be removed in Rails 5.0.
150
+ Please migrate your configuration files accordingly.
151
+ MSG
152
+
153
+ def serve_static_assets
154
+ ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE
155
+ serve_static_files
156
+ end
157
+
158
+ def serve_static_assets=(value)
159
+ ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE
160
+ self.serve_static_files = value
161
+ end
162
+
142
163
  def session_store(*args)
143
164
  if args.empty?
144
165
  case @session_store
@@ -17,7 +17,7 @@ module Rails
17
17
 
18
18
  middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
19
19
 
20
- if config.serve_static_assets
20
+ if config.serve_static_files
21
21
  middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control
22
22
  end
23
23
 
@@ -8,7 +8,7 @@ module Rails
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 0
11
- PRE = "rc3"
11
+ PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -20,8 +20,9 @@ Rails.application.configure do
20
20
  # NGINX, varnish or squid.
21
21
  # config.action_dispatch.rack_cache = true
22
22
 
23
- # Disable Rails's static asset server (Apache or NGINX will already do this).
24
- config.serve_static_assets = false
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
26
 
26
27
  <%- unless options.skip_sprockets? -%>
27
28
  # Compress JavaScripts and CSS.
@@ -12,8 +12,8 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
17
  config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.rc3
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-13 00:00:00.000000000 Z
11
+ date: 2014-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0.rc3
19
+ version: 4.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0.rc3
26
+ version: 4.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0.rc3
33
+ version: 4.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0.rc3
40
+ version: 4.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - '='
80
80
  - !ruby/object:Gem::Version
81
- version: 4.2.0.rc3
81
+ version: 4.2.0
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 4.2.0.rc3
88
+ version: 4.2.0
89
89
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
90
90
  email: david@loudthinking.com
91
91
  executables:
@@ -352,9 +352,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
352
352
  version: 1.9.3
353
353
  required_rubygems_version: !ruby/object:Gem::Requirement
354
354
  requirements:
355
- - - ">"
355
+ - - ">="
356
356
  - !ruby/object:Gem::Version
357
- version: 1.3.1
357
+ version: '0'
358
358
  requirements: []
359
359
  rubyforge_project:
360
360
  rubygems_version: 2.2.2