activesupport 7.0.2 → 7.0.2.1

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: 7da227e95099973079d2282889ff40058c260d0366cef712e1d5190bd7ac4d38
4
- data.tar.gz: 1f8b5198b25668a2baa1d77168e27b821c6afccaa6117cadc5c50dba1b852f2d
3
+ metadata.gz: 6e70dc41bc4e591f21025665c88110be5fb573df096ff18a32c8eb03537cd912
4
+ data.tar.gz: 44a03ceb522ac0a8bcaa495d885c67275eb900009273bd112b1002a713839e8c
5
5
  SHA512:
6
- metadata.gz: 901dcaca03cc045ac9b284468f5a875d6db1aaa610f3aaaaf473199e766baae9bfccfd8372c6ce2ba6c496383338928ff584ad494b59dc901f530ceadd22df22
7
- data.tar.gz: fe4f98525e6453eb9e8e858092e11458fb4f35cd0883dde01826ebb96cf0d926c1fae323ad16ba153bc19ca13e2dfbd658bec49f31af75a50768b9f0a4eb248b
6
+ metadata.gz: f3892232fa94ad774164911956d1dde53e1e3a14fa5d9cffcb7df472f0e1a410c3570edc6d16ce4e84842896cccce6fae31ec6215d0b5afb899e5829348eb804
7
+ data.tar.gz: 417107f4d3fa176ccaea68b6e7384a4ed06a622821a2d08f78fd8051b76c5df78ada4007e7f2f58a843718c5d16083ad8fe710cd0cf0440c4f622dacd8143e8f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Rails 7.0.2.1 (February 11, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 7.0.2 (February 08, 2022) ##
2
7
 
3
8
  * Fix `ActiveSupport::EncryptedConfiguration` to be compatible with Psych 4
@@ -64,18 +64,21 @@ module ActiveSupport
64
64
  # after the work has been performed.
65
65
  #
66
66
  # Where possible, prefer +wrap+.
67
- def self.run!
68
- if active?
69
- Null
67
+ def self.run!(reset: false)
68
+ if reset
69
+ lost_instance = IsolatedExecutionState.delete(active_key)
70
+ lost_instance&.complete!
70
71
  else
71
- new.tap do |instance|
72
- success = nil
73
- begin
74
- instance.run!
75
- success = true
76
- ensure
77
- instance.complete! unless success
78
- end
72
+ return Null if active?
73
+ end
74
+
75
+ new.tap do |instance|
76
+ success = nil
77
+ begin
78
+ instance.run!
79
+ success = true
80
+ ensure
81
+ instance.complete! unless success
79
82
  end
80
83
  end
81
84
  end
@@ -105,27 +108,20 @@ module ActiveSupport
105
108
  end
106
109
  end
107
110
 
108
- class << self # :nodoc:
109
- attr_accessor :active
110
- end
111
-
112
111
  def self.error_reporter
113
112
  @error_reporter ||= ActiveSupport::ErrorReporter.new
114
113
  end
115
114
 
116
- def self.inherited(other) # :nodoc:
117
- super
118
- other.active = Concurrent::Hash.new
115
+ def self.active_key # :nodoc:
116
+ @active_key ||= :"active_execution_wrapper_#{object_id}"
119
117
  end
120
118
 
121
- self.active = Concurrent::Hash.new
122
-
123
119
  def self.active? # :nodoc:
124
- @active[IsolatedExecutionState.unique_id]
120
+ IsolatedExecutionState.key?(active_key)
125
121
  end
126
122
 
127
123
  def run! # :nodoc:
128
- self.class.active[IsolatedExecutionState.unique_id] = true
124
+ IsolatedExecutionState[self.class.active_key] = self
129
125
  run
130
126
  end
131
127
 
@@ -140,7 +136,7 @@ module ActiveSupport
140
136
  def complete!
141
137
  complete
142
138
  ensure
143
- self.class.active.delete(IsolatedExecutionState.unique_id)
139
+ IsolatedExecutionState.delete(self.class.active_key)
144
140
  end
145
141
 
146
142
  def complete # :nodoc:
@@ -10,7 +10,7 @@ module ActiveSupport
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
12
  TINY = 2
13
- PRE = nil
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -37,6 +37,14 @@ module ActiveSupport
37
37
  current[key] = value
38
38
  end
39
39
 
40
+ def key?(key)
41
+ state.key?(key)
42
+ end
43
+
44
+ def delete(key)
45
+ state.delete(key)
46
+ end
47
+
40
48
  def clear
41
49
  current.clear
42
50
  end
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: 7.0.2
4
+ version: 7.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -359,12 +359,12 @@ licenses:
359
359
  - MIT
360
360
  metadata:
361
361
  bug_tracker_uri: https://github.com/rails/rails/issues
362
- changelog_uri: https://github.com/rails/rails/blob/v7.0.2/activesupport/CHANGELOG.md
363
- documentation_uri: https://api.rubyonrails.org/v7.0.2/
362
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2.1/activesupport/CHANGELOG.md
363
+ documentation_uri: https://api.rubyonrails.org/v7.0.2.1/
364
364
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
365
- source_code_uri: https://github.com/rails/rails/tree/v7.0.2/activesupport
365
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2.1/activesupport
366
366
  rubygems_mfa_required: 'true'
367
- post_install_message:
367
+ post_install_message:
368
368
  rdoc_options:
369
369
  - "--encoding"
370
370
  - UTF-8
@@ -381,8 +381,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
381
  - !ruby/object:Gem::Version
382
382
  version: '0'
383
383
  requirements: []
384
- rubygems_version: 3.2.32
385
- signing_key:
384
+ rubygems_version: 3.2.22
385
+ signing_key:
386
386
  specification_version: 4
387
387
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
388
388
  Rails framework.