activesupport 7.0.7.2 → 7.0.8.1

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
  SHA256:
3
- metadata.gz: 04536a88c7cef8a70a74892d515e186b52035d5173af41840637b2ed9bad4d47
4
- data.tar.gz: 68814229938ebce3a9500a6dac0d5db7ad70ba1b9ff75bf784c1006a72f66fb3
3
+ metadata.gz: 26b2e6088edaa69c6c214e1a0732c7384624333999fe2039d5f8d8117be67b53
4
+ data.tar.gz: a04996749ad1966a5060eecc79869306b2be7eed6b860f4c657eebf3463f5cc7
5
5
  SHA512:
6
- metadata.gz: 6817bb1e03d8ff97bcfbc6dd933e622a1bb8c220de50c30d435e9e53f7f2dbb26f4bfa289fc3da8384d13d5bf7528539eff53299d28e0da83ce96500e2385e10
7
- data.tar.gz: 90a083d63440b72339b96cbd0aeade50b73907fc41157666fccf1b4bd02b86865972d98388f591c749f371c2d4a353c7e8d489cbefdc2f548a4da3030ace8b4e
6
+ metadata.gz: 132f90f3d6b992ba2311f6db5a6e5b5dc7f93a77020cdccc8885f60530948673550276fca31fc8e849c203ed59a72a9ca5b4939fadd8b15c5e040d55028eac27
7
+ data.tar.gz: 97e8654acb3c52acc8270a6e207eaa5bbf74295374420c86b97029072c673e2ce64ee74a022ec62f0020afb96c6b233d657d432a09451da98c18576becfdf547
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## Rails 7.0.8.1 (February 21, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.8 (September 09, 2023) ##
7
+
8
+ * Fix `TimeWithZone` still using deprecated `#to_s` when `ENV` or `config` to
9
+ disable it are set.
10
+
11
+ *Hartley McGuire*
12
+
13
+ * Fix CacheStore#write_multi when using a distributed Redis cache with a connection pool.
14
+
15
+ Fixes [#48938](https://github.com/rails/rails/issues/48938).
16
+
17
+ *Jonathan del Strother*
18
+
19
+
1
20
  ## Rails 7.0.7.2 (August 22, 2023) ##
2
21
 
3
22
  * No changes.
@@ -313,13 +313,15 @@ module ActiveSupport
313
313
 
314
314
  private
315
315
  def set_redis_capabilities
316
- case redis
317
- when Redis::Distributed
318
- @mget_capable = true
319
- @mset_capable = false
320
- else
321
- @mget_capable = true
322
- @mset_capable = true
316
+ redis.with do |c|
317
+ case c
318
+ when Redis::Distributed
319
+ @mget_capable = true
320
+ @mset_capable = false
321
+ else
322
+ @mget_capable = true
323
+ @mset_capable = true
324
+ end
323
325
  end
324
326
  end
325
327
 
@@ -16,9 +16,12 @@ class Date
16
16
  end
17
17
  elsif format == NOT_SET
18
18
  if formatter = DATE_FORMATS[:default]
19
- ActiveSupport::Deprecation.warn(
20
- "Using a :default format for Date#to_s is deprecated. Please use Date#to_fs instead."
21
- )
19
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
20
+ Using a :default format for Date#to_s is deprecated. Please use Date#to_fs instead. If you fixed all places
21
+ inside your application that you see this deprecation, you can set
22
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
23
+ the `Bundler.require` call to fix all the callers outside of your application.
24
+ MSG
22
25
  if formatter.respond_to?(:call)
23
26
  formatter.call(self).to_s
24
27
  else
@@ -12,9 +12,12 @@ class DateTime
12
12
  formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
13
13
  elsif format == NOT_SET
14
14
  if formatter = ::Time::DATE_FORMATS[:default]
15
- ActiveSupport::Deprecation.warn(
16
- "Using a :default format for DateTime#to_s is deprecated. Please use DateTime#to_fs instead."
17
- )
15
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
16
+ Using a :default format for DateTime#to_s is deprecated. Please use DateTime#to_fs instead. If you fixed all
17
+ places inside your application that you see this deprecation, you can set
18
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
19
+ the `Bundler.require` call to fix all the callers outside of your application.
20
+ MSG
18
21
  if formatter.respond_to?(:call)
19
22
  formatter.call(self).to_s
20
23
  else
@@ -11,9 +11,12 @@ module ActiveSupport
11
11
  formatter.call(first, last)
12
12
  elsif format == NOT_SET
13
13
  if formatter = RangeWithFormat::RANGE_FORMATS[:default]
14
- ActiveSupport::Deprecation.warn(
15
- "Using a :default format for Range#to_s is deprecated. Please use Range#to_fs instead."
16
- )
14
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
15
+ Using a :default format for Range#to_s is deprecated. Please use Range#to_fs instead. If you fixed all
16
+ places inside your application that you see this deprecation, you can set
17
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
18
+ the `Bundler.require` call to fix all the callers outside of your application.
19
+ MSG
17
20
  formatter.call(first, last)
18
21
  else
19
22
  super()
@@ -12,9 +12,12 @@ class Time
12
12
  formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
13
13
  elsif format == NOT_SET
14
14
  if formatter = ::Time::DATE_FORMATS[:default]
15
- ActiveSupport::Deprecation.warn(
16
- "Using a :default format for Time#to_s is deprecated. Please use Time#to_fs instead."
17
- )
15
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
16
+ Using a :default format for Time#to_s is deprecated. Please use Time#to_fs instead. If you fixed all places
17
+ inside your application that you see this deprecation, you can set
18
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
19
+ the `Bundler.require` call to fix all the callers outside of your application.
20
+ MSG
18
21
  if formatter.respond_to?(:call)
19
22
  formatter.call(self).to_s
20
23
  else
@@ -31,3 +34,40 @@ class Time
31
34
  end
32
35
  end
33
36
  end
37
+
38
+ module ActiveSupport
39
+ class TimeWithZone
40
+ NOT_SET = Object.new # :nodoc:
41
+
42
+ def to_s(format = NOT_SET) # :nodoc:
43
+ if format == :db
44
+ ActiveSupport::Deprecation.warn(
45
+ "TimeWithZone#to_s(:db) is deprecated. Please use TimeWithZone#to_fs(:db) instead."
46
+ )
47
+ utc.to_fs(format)
48
+ elsif formatter = ::Time::DATE_FORMATS[format]
49
+ ActiveSupport::Deprecation.warn(
50
+ "TimeWithZone#to_s(#{format.inspect}) is deprecated. Please use TimeWithZone#to_fs(#{format.inspect}) instead."
51
+ )
52
+ formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
53
+ elsif format == NOT_SET
54
+ if formatter = ::Time::DATE_FORMATS[:default]
55
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
56
+ Using a :default format for TimeWithZone#to_s is deprecated. Please use TimeWithZone#to_fs instead.
57
+ If you fixed all places inside your application that you see this deprecation, you can set
58
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
59
+ the `Bundler.require` call to fix all the callers outside of your application.
60
+ MSG
61
+ formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
62
+ else
63
+ "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
64
+ end
65
+ else
66
+ ActiveSupport::Deprecation.warn(
67
+ "TimeWithZone#to_s(#{format.inspect}) is deprecated. Please use TimeWithZone#to_fs(#{format.inspect}) instead."
68
+ )
69
+ "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
70
+ end
71
+ end
72
+ end
73
+ end
@@ -9,8 +9,8 @@ module ActiveSupport
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 7
13
- PRE = "2"
12
+ TINY = 8
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -206,35 +206,9 @@ module ActiveSupport
206
206
  end
207
207
  alias_method :rfc822, :rfc2822
208
208
 
209
- NOT_SET = Object.new # :nodoc:
210
-
211
209
  # Returns a string of the object's date and time.
212
- def to_s(format = NOT_SET)
213
- if format == :db
214
- ActiveSupport::Deprecation.warn(
215
- "TimeWithZone#to_s(:db) is deprecated. Please use TimeWithZone#to_fs(:db) instead."
216
- )
217
- utc.to_fs(format)
218
- elsif formatter = ::Time::DATE_FORMATS[format]
219
- ActiveSupport::Deprecation.warn(
220
- "TimeWithZone#to_s(#{format.inspect}) is deprecated. Please use TimeWithZone#to_fs(#{format.inspect}) instead."
221
- )
222
- formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
223
- elsif format == NOT_SET
224
- if formatter = ::Time::DATE_FORMATS[:default]
225
- ActiveSupport::Deprecation.warn(
226
- "Using a :default format for TimeWithZone#to_s is deprecated. Please use TimeWithZone#to_fs instead."
227
- )
228
- formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
229
- else
230
- "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
231
- end
232
- else
233
- ActiveSupport::Deprecation.warn(
234
- "TimeWithZone#to_s(#{format.inspect}) is deprecated. Please use TimeWithZone#to_fs(#{format.inspect}) instead."
235
- )
236
- "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
237
- end
210
+ def to_s
211
+ "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
238
212
  end
239
213
 
240
214
  # Returns a string of the object's date and time.
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.7.2
4
+ version: 7.0.8.1
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: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -359,10 +359,10 @@ 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.7.2/activesupport/CHANGELOG.md
363
- documentation_uri: https://api.rubyonrails.org/v7.0.7.2/
362
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.8.1/activesupport/CHANGELOG.md
363
+ documentation_uri: https://api.rubyonrails.org/v7.0.8.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.7.2/activesupport
365
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.8.1/activesupport
366
366
  rubygems_mfa_required: 'true'
367
367
  post_install_message:
368
368
  rdoc_options:
@@ -381,7 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
381
  - !ruby/object:Gem::Version
382
382
  version: '0'
383
383
  requirements: []
384
- rubygems_version: 3.3.3
384
+ rubygems_version: 3.2.22
385
385
  signing_key:
386
386
  specification_version: 4
387
387
  summary: A toolkit of support libraries and Ruby core extensions extracted from the