activesupport 5.2.3 → 5.2.4.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activesupport might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a801b37ff81c696e2748973cf33ddcb79bbe7354811736873a3c31cd42508d0
4
- data.tar.gz: 9a76f3a44e4e98c55dc08183cb705f9b8e2acaaff7c171f20b058a3f22e8ed4d
3
+ metadata.gz: 5d853ba27f61066e0915e21bb7598ddc70ab9a5b1443c1d233effe4cce1eb50a
4
+ data.tar.gz: 6da680370ec0f060f0c2beb7af1351ee35304266c825f81b019435bdb4d7334d
5
5
  SHA512:
6
- metadata.gz: 0544c56fce74db60e7e040ac929982c40ddc7e4679c727a789a7c1f057a3443b5d23eebf57a2a88bad4f990c9474441e5732d24f9314801bdb05d7d25d07de1d
7
- data.tar.gz: f57da506e5ff2a7c5f7a7c4aced880cca9f6bae45fab487a5af05e202c03c471f41101245799a9f4bf923e6fbaca655bd8e7e7be3cdede8926137c60a277c89d
6
+ metadata.gz: 9133f25d78d0937a15c299b7fd483da55511a4c863166a4ba49bc0736cde194c71af904e1cc261b2545fa12e744f5850b7fe500ad0000aafc96b7d09968ac567
7
+ data.tar.gz: 518ffc1ec69585329261dbb2cea5261355093bc4dca079d361ebcf99fae4bb89eabfe9b78ed487acf9564876140c71ba943de526e4fccc35ee203d0a5ee85e85
@@ -1,3 +1,38 @@
1
+ ## Rails 5.2.4.rc1 (November 22, 2019) ##
2
+
3
+ * Make ActiveSupport::Logger Fiber-safe. Fixes #36752.
4
+
5
+ Use `Fiber.current.__id__` in `ActiveSupport::Logger#local_level=` in order
6
+ to make log level local to Ruby Fibers in addition to Threads.
7
+
8
+ Example:
9
+
10
+ logger = ActiveSupport::Logger.new(STDOUT)
11
+ logger.level = 1
12
+ p "Main is debug? #{logger.debug?}"
13
+
14
+ Fiber.new {
15
+ logger.local_level = 0
16
+ p "Thread is debug? #{logger.debug?}"
17
+ }.resume
18
+
19
+ p "Main is debug? #{logger.debug?}"
20
+
21
+ Before:
22
+
23
+ Main is debug? false
24
+ Thread is debug? true
25
+ Main is debug? true
26
+
27
+ After:
28
+
29
+ Main is debug? false
30
+ Thread is debug? true
31
+ Main is debug? false
32
+
33
+ *Alexander Varnin*
34
+
35
+
1
36
  ## Rails 5.2.3 (March 27, 2019) ##
2
37
 
3
38
  * Add `ActiveSupport::HashWithIndifferentAccess#assoc`.
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/digest/uuid"
@@ -9,8 +9,8 @@ module ActiveSupport
9
9
  module VERSION
10
10
  MAJOR = 5
11
11
  MINOR = 2
12
- TINY = 3
13
- PRE = nil
12
+ TINY = 4
13
+ PRE = "rc1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support/concern"
4
+ require "fiber"
4
5
 
5
6
  module ActiveSupport
6
7
  module LoggerThreadSafeLevel # :nodoc:
@@ -11,7 +12,7 @@ module ActiveSupport
11
12
  end
12
13
 
13
14
  def local_log_id
14
- Thread.current.__id__
15
+ Fiber.current.__id__
15
16
  end
16
17
 
17
18
  def local_level
@@ -18,8 +18,8 @@ module ActiveSupport
18
18
  super
19
19
  end
20
20
 
21
- def subscribe(pattern = nil, block = Proc.new)
22
- subscriber = Subscribers.new pattern, block
21
+ def subscribe(pattern = nil, callable = nil, &block)
22
+ subscriber = Subscribers.new(pattern, callable || block)
23
23
  synchronize do
24
24
  @subscribers << subscriber
25
25
  @listeners_for.clear
@@ -39,7 +39,7 @@ module ActiveSupport
39
39
  end
40
40
 
41
41
  def method_missing(name, *args)
42
- name_string = name.to_s
42
+ name_string = name.to_s.dup
43
43
  if name_string.chomp!("=")
44
44
  self[name_string] = args.first
45
45
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.3
4
+ version: 5.2.4.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: 2019-03-28 00:00:00.000000000 Z
11
+ date: 2019-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -139,6 +139,7 @@ files:
139
139
  - lib/active_support/core_ext/date_time/calculations.rb
140
140
  - lib/active_support/core_ext/date_time/compatibility.rb
141
141
  - lib/active_support/core_ext/date_time/conversions.rb
142
+ - lib/active_support/core_ext/digest.rb
142
143
  - lib/active_support/core_ext/digest/uuid.rb
143
144
  - lib/active_support/core_ext/enumerable.rb
144
145
  - lib/active_support/core_ext/file.rb
@@ -332,8 +333,8 @@ homepage: http://rubyonrails.org
332
333
  licenses:
333
334
  - MIT
334
335
  metadata:
335
- source_code_uri: https://github.com/rails/rails/tree/v5.2.3/activesupport
336
- changelog_uri: https://github.com/rails/rails/blob/v5.2.3/activesupport/CHANGELOG.md
336
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.4.rc1/activesupport
337
+ changelog_uri: https://github.com/rails/rails/blob/v5.2.4.rc1/activesupport/CHANGELOG.md
337
338
  post_install_message:
338
339
  rdoc_options:
339
340
  - "--encoding"
@@ -347,11 +348,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
347
348
  version: 2.2.2
348
349
  required_rubygems_version: !ruby/object:Gem::Requirement
349
350
  requirements:
350
- - - ">="
351
+ - - ">"
351
352
  - !ruby/object:Gem::Version
352
- version: '0'
353
+ version: 1.3.1
353
354
  requirements: []
354
- rubygems_version: 3.0.1
355
+ rubygems_version: 3.0.3
355
356
  signing_key:
356
357
  specification_version: 4
357
358
  summary: A toolkit of support libraries and Ruby core extensions extracted from the