railties 4.1.8 → 4.1.9.rc1

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: c87d4bc4b3dfc866e5a40c6d059797fcf7cf9f88
4
- data.tar.gz: 2f6f13736aa7bc41b81b9111a6b5caf11023add9
3
+ metadata.gz: d37744703482e5d978248672a1bea48de8a47166
4
+ data.tar.gz: e24b1a533c92259b83a75fc894c7ba23744dbcb3
5
5
  SHA512:
6
- metadata.gz: 5e266b6a5171755b37bb9ee22e389d398f992d8376553a96acdf811763df6fbfe8951971659f0aaed6f2642d6157969dc1ad2ac4f9964ada0e3c03d37dbf6c21
7
- data.tar.gz: fd6993327cae94bf4d1810ebd1152d0125942c0847ca14b1b6e9d356a6022e6ca5f720313cc11c1d2a04c022a9b04e9d5af71cf06daa57a6c6040102a12fed0c
6
+ metadata.gz: ef2373bf52f1285f1badb43bcb203773aebcd5575c19d4075b831d0f46c54ec024cb2650b762cc553747fd227cda339786819264735910328a439f8872c1e59f
7
+ data.tar.gz: 81253561789db495118287ca328bb292756953b52aa0399b65bff1fc410210db20eb19f4a0e73ff5622104a7355e72b5c55699ba9d4c51462e413d6edf02b33f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## Rails 4.1.8 (November 16, 2014) ##
2
+
3
+ * `secret_token` is now saved in `Rails.application.secrets.secret_token`
4
+ and it falls back to the value of `config.secret_token` when it is not
5
+ present in `config/secrets.yml`.
6
+
7
+ *Benjamin Fleischer*
8
+
1
9
  * Specify dummy app's db migrate path in plugin's test_helper.rb.
2
10
 
3
11
  Fixes #16877.
@@ -10,6 +18,16 @@
10
18
  *Yukio Mizuta*
11
19
 
12
20
 
21
+ ## Rails 4.1.7.1 (November 19, 2014) ##
22
+
23
+ * No changes.
24
+
25
+
26
+ ## Rails 4.1.7 (October 29, 2014) ##
27
+
28
+ * No changes.
29
+
30
+
13
31
  ## Rails 4.1.6 (September 11, 2014) ##
14
32
 
15
33
  * Scaffold generator `_form` partial adds `class="field"` for password
@@ -158,7 +158,7 @@ module Rails
158
158
  key_generator = ActiveSupport::KeyGenerator.new(secrets.secret_key_base, iterations: 1000)
159
159
  ActiveSupport::CachingKeyGenerator.new(key_generator)
160
160
  else
161
- ActiveSupport::LegacyKeyGenerator.new(config.secret_token)
161
+ ActiveSupport::LegacyKeyGenerator.new(secrets.secret_token)
162
162
  end
163
163
  end
164
164
  end
@@ -197,7 +197,7 @@ module Rails
197
197
  super.merge({
198
198
  "action_dispatch.parameter_filter" => config.filter_parameters,
199
199
  "action_dispatch.redirect_filter" => config.filter_redirect,
200
- "action_dispatch.secret_token" => config.secret_token,
200
+ "action_dispatch.secret_token" => secrets.secret_token,
201
201
  "action_dispatch.secret_key_base" => secrets.secret_key_base,
202
202
  "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions,
203
203
  "action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local,
@@ -316,7 +316,21 @@ module Rails
316
316
  @config = configuration
317
317
  end
318
318
 
319
- def secrets #:nodoc:
319
+ # Returns secrets added to config/secrets.yml.
320
+ #
321
+ # Example:
322
+ #
323
+ # development:
324
+ # secret_key_base: 836fa3665997a860728bcb9e9a1e704d427cfc920e79d847d79c8a9a907b9e965defa4154b2b86bdec6930adbe33f21364523a6f6ce363865724549fdfc08553
325
+ # test:
326
+ # secret_key_base: 5a37811464e7d378488b0f073e2193b093682e4e21f5d6f3ae0a4e1781e61a351fdc878a843424e81c73fb484a40d23f92c8dafac4870e74ede6e5e174423010
327
+ # production:
328
+ # secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
329
+ # namespace: my_app_production
330
+ #
331
+ # +Rails.application.secrets.namespace+ returns +my_app_production+ in the
332
+ # production environment.
333
+ def secrets
320
334
  @secrets ||= begin
321
335
  secrets = ActiveSupport::OrderedOptions.new
322
336
  yaml = config.paths["config/secrets"].first
@@ -329,6 +343,8 @@ module Rails
329
343
 
330
344
  # Fallback to config.secret_key_base if secrets.secret_key_base isn't set
331
345
  secrets.secret_key_base ||= config.secret_key_base
346
+ # Fallback to config.secret_token if secrets.secret_token isn't set
347
+ secrets.secret_token ||= config.secret_token
332
348
 
333
349
  secrets
334
350
  end
@@ -458,8 +474,13 @@ module Rails
458
474
  end
459
475
 
460
476
  def validate_secret_key_config! #:nodoc:
461
- if secrets.secret_key_base.blank? && config.secret_token.blank?
462
- raise "Missing `secret_key_base` for '#{Rails.env}' environment, set this value in `config/secrets.yml`"
477
+ if secrets.secret_key_base.blank?
478
+ ActiveSupport::Deprecation.warn "You didn't set `secret_key_base`. " +
479
+ "Read the upgrade documentation to learn more about this new config option."
480
+
481
+ if secrets.secret_token.blank?
482
+ raise "Missing `secret_token` and `secret_key_base` for '#{Rails.env}' environment, set these values in `config/secrets.yml`"
483
+ end
463
484
  end
464
485
  end
465
486
  end
data/lib/rails/engine.rb CHANGED
@@ -351,7 +351,7 @@ module Rails
351
351
 
352
352
  base.called_from = begin
353
353
  call_stack = if Kernel.respond_to?(:caller_locations)
354
- caller_locations.map(&:path)
354
+ caller_locations.map { |l| l.absolute_path || l.path }
355
355
  else
356
356
  # Remove the line number from backtraces making sure we don't leave anything behind
357
357
  caller.map { |p| p.sub(/:\d+.*/, '') }
@@ -567,10 +567,10 @@ module Rails
567
567
  end
568
568
 
569
569
  initializer :add_routing_paths do |app|
570
- paths = self.paths["config/routes.rb"].existent
570
+ routing_paths = self.paths["config/routes.rb"].existent
571
571
 
572
- if routes? || paths.any?
573
- app.routes_reloader.paths.unshift(*paths)
572
+ if routes? || routing_paths.any?
573
+ app.routes_reloader.paths.unshift(*routing_paths)
574
574
  app.routes_reloader.route_sets << routes
575
575
  end
576
576
  end
@@ -7,8 +7,8 @@ module Rails
7
7
  module VERSION
8
8
  MAJOR = 4
9
9
  MINOR = 1
10
- TINY = 8
11
- PRE = nil
10
+ TINY = 9
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -241,23 +241,14 @@ module Rails
241
241
  def assets_gemfile_entry
242
242
  return [] if options[:skip_sprockets]
243
243
 
244
- gems = []
245
- if options.dev? || options.edge?
246
- gems << GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails', '2-1-stable',
247
- 'Use latest 2.1 version of sprockets-rails')
248
- gems << GemfileEntry.github('sass-rails', 'rails/sass-rails', nil,
249
- 'Use SCSS for stylesheets')
250
- else
251
- gems << GemfileEntry.version('sass-rails',
252
- '~> 4.0.3',
253
- 'Use SCSS for stylesheets')
254
- end
255
-
256
- gems << GemfileEntry.version('uglifier',
257
- '>= 1.3.0',
258
- 'Use Uglifier as compressor for JavaScript assets')
259
-
260
- gems
244
+ [
245
+ GemfileEntry.version('sass-rails',
246
+ '~> 4.0.3',
247
+ 'Use SCSS for stylesheets'),
248
+ GemfileEntry.version('uglifier',
249
+ '>= 1.3.0',
250
+ 'Use Uglifier as compressor for JavaScript assets')
251
+ ]
261
252
  end
262
253
 
263
254
  def jbuilder_gemfile_entry
@@ -334,7 +334,7 @@ module Rails
334
334
  #
335
335
  # This class should be called before the AppGenerator is required and started
336
336
  # since it configures and mutates ARGV correctly.
337
- class ARGVScrubber # :nodoc
337
+ class ARGVScrubber # :nodoc:
338
338
  def initialize(argv = ARGV)
339
339
  @argv = argv
340
340
  end
@@ -10,7 +10,9 @@ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate',
10
10
  <% end -%>
11
11
  require "rails/test_help"
12
12
 
13
- Rails.backtrace_cleaner.remove_silencers!
13
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
14
+ # to be shown.
15
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
14
16
 
15
17
  # Load support files
16
18
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
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.1.8
4
+ version: 4.1.9.rc1
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-11-16 00:00:00.000000000 Z
11
+ date: 2015-01-02 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.1.8
19
+ version: 4.1.9.rc1
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.1.8
26
+ version: 4.1.9.rc1
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.1.8
33
+ version: 4.1.9.rc1
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.1.8
40
+ version: 4.1.9.rc1
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.1.8
81
+ version: 4.1.9.rc1
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.1.8
88
+ version: 4.1.9.rc1
89
89
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
90
90
  email: david@loudthinking.com
91
91
  executables:
@@ -349,12 +349,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
349
349
  version: 1.9.3
350
350
  required_rubygems_version: !ruby/object:Gem::Requirement
351
351
  requirements:
352
- - - ">="
352
+ - - ">"
353
353
  - !ruby/object:Gem::Version
354
- version: '0'
354
+ version: 1.3.1
355
355
  requirements: []
356
356
  rubyforge_project:
357
- rubygems_version: 2.4.2
357
+ rubygems_version: 2.4.5
358
358
  signing_key:
359
359
  specification_version: 4
360
360
  summary: Tools for creating, working with, and running Rails applications.