activesupport 5.1.4 → 5.1.5.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 +5 -5
- data/CHANGELOG.md +5 -0
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +17 -0
- data/lib/active_support/core_ext/hash/keys.rb +2 -2
- data/lib/active_support/dependencies.rb +1 -0
- data/lib/active_support/deprecation/method_wrappers.rb +7 -0
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/testing/isolation.rb +4 -2
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7cdb2dd57779f31c994c0133bffd9848f8a4426344ffdb16001445bb557dc4f8
|
4
|
+
data.tar.gz: 1031f3f34d581ffe3b8e25074d231fe7a48ab9e5eb6e8fe92a774d78ce62d4a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc26a667f0bc6e54b4c8127f42b6052a226c00998ad548c66b598bc7746b8f588d37f4f7af15cb803e4374c30b9dea5f9187fdb3c5926cdf2aee5e5de33accae
|
7
|
+
data.tar.gz: 4a236b647f3b8dbe1138723313fe02578c08e9f25643177520468499a01bb83381d5cef5f6d5adcec3cc0434d3ddef7563d7b36525164e6a8ecd7ad4ca2b3c3b
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "monitor"
|
4
|
+
|
5
|
+
module ActiveSupport
|
6
|
+
module Concurrency
|
7
|
+
# A monitor that will permit dependency loading while blocked waiting for
|
8
|
+
# the lock.
|
9
|
+
class LoadInterlockAwareMonitor < Monitor
|
10
|
+
# Enters an exclusive section, but allows dependency loading while blocked
|
11
|
+
def mon_enter
|
12
|
+
mon_try_enter ||
|
13
|
+
ActiveSupport::Dependencies.interlock.permit_concurrent_loads { super }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -16,7 +16,7 @@ class Hash
|
|
16
16
|
result[yield(key)] = self[key]
|
17
17
|
end
|
18
18
|
result
|
19
|
-
end
|
19
|
+
end unless method_defined? :transform_keys
|
20
20
|
|
21
21
|
# Destructively converts all keys using the +block+ operations.
|
22
22
|
# Same as +transform_keys+ but modifies +self+.
|
@@ -26,7 +26,7 @@ class Hash
|
|
26
26
|
self[yield(key)] = delete(key)
|
27
27
|
end
|
28
28
|
self
|
29
|
-
end
|
29
|
+
end unless method_defined? :transform_keys!
|
30
30
|
|
31
31
|
# Returns a new hash with all keys converted to strings.
|
32
32
|
#
|
@@ -60,6 +60,13 @@ module ActiveSupport
|
|
60
60
|
deprecator.deprecation_warning(method_name, options[method_name])
|
61
61
|
super(*args, &block)
|
62
62
|
end
|
63
|
+
|
64
|
+
case
|
65
|
+
when target_module.protected_method_defined?(method_name)
|
66
|
+
protected method_name
|
67
|
+
when target_module.private_method_defined?(method_name)
|
68
|
+
private method_name
|
69
|
+
end
|
63
70
|
end
|
64
71
|
end
|
65
72
|
|
@@ -43,7 +43,8 @@ module ActiveSupport
|
|
43
43
|
end
|
44
44
|
}
|
45
45
|
end
|
46
|
-
|
46
|
+
test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
|
47
|
+
result = Marshal.dump(test_result)
|
47
48
|
end
|
48
49
|
|
49
50
|
write.puts [result].pack("m")
|
@@ -67,8 +68,9 @@ module ActiveSupport
|
|
67
68
|
|
68
69
|
if ENV["ISOLATION_TEST"]
|
69
70
|
yield
|
71
|
+
test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
|
70
72
|
File.open(ENV["ISOLATION_OUTPUT"], "w") do |file|
|
71
|
-
file.puts [Marshal.dump(
|
73
|
+
file.puts [Marshal.dump(test_result)].pack("m")
|
72
74
|
end
|
73
75
|
exit!
|
74
76
|
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.1.
|
4
|
+
version: 5.1.5.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:
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
99
99
|
- lib/active_support/callbacks.rb
|
100
100
|
- lib/active_support/concern.rb
|
101
|
+
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
101
102
|
- lib/active_support/concurrency/share_lock.rb
|
102
103
|
- lib/active_support/configurable.rb
|
103
104
|
- lib/active_support/core_ext.rb
|
@@ -313,7 +314,9 @@ files:
|
|
313
314
|
homepage: http://rubyonrails.org
|
314
315
|
licenses:
|
315
316
|
- MIT
|
316
|
-
metadata:
|
317
|
+
metadata:
|
318
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.1.5.rc1/activesupport
|
319
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.1.5.rc1/activesupport/CHANGELOG.md
|
317
320
|
post_install_message:
|
318
321
|
rdoc_options:
|
319
322
|
- "--encoding"
|
@@ -327,12 +330,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
327
330
|
version: 2.2.2
|
328
331
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
329
332
|
requirements:
|
330
|
-
- - "
|
333
|
+
- - ">"
|
331
334
|
- !ruby/object:Gem::Version
|
332
|
-
version:
|
335
|
+
version: 1.3.1
|
333
336
|
requirements: []
|
334
337
|
rubyforge_project:
|
335
|
-
rubygems_version: 2.
|
338
|
+
rubygems_version: 2.7.3
|
336
339
|
signing_key:
|
337
340
|
specification_version: 4
|
338
341
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|