activesupport 7.0.7.1 → 7.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/lib/active_support/cache/redis_cache_store.rb +9 -7
- data/lib/active_support/core_ext/date/deprecated_conversions.rb +6 -3
- data/lib/active_support/core_ext/date_time/deprecated_conversions.rb +6 -3
- data/lib/active_support/core_ext/range/deprecated_conversions.rb +6 -3
- data/lib/active_support/core_ext/time/deprecated_conversions.rb +43 -3
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/time_with_zone.rb +2 -28
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f54026bf0b86c232b4ce46a96f39aa94fe8acdad8eae5c0a194046f896dc0ff
|
4
|
+
data.tar.gz: 3762e1c4397383cb90c0fe6513e260194c1af0afa0292284842953d5153d621a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74194c0b535b0ae5b29e32c85f205bf45a7626200f9946582627c440fa19cd9a8547109f3b1e21d66086a64cae8d83248fb39848cf9bf6f47319fa224c11e538
|
7
|
+
data.tar.gz: 3cead0a36efa404c9d1b92b1b7330e797f0802b146a20f8a5468ca7ff4c401cab628aa4ee7578cef133298f4edf4da3b95a0df294a962c4de0ac997da1afc421
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## Rails 7.0.8 (September 09, 2023) ##
|
2
|
+
|
3
|
+
* Fix `TimeWithZone` still using deprecated `#to_s` when `ENV` or `config` to
|
4
|
+
disable it are set.
|
5
|
+
|
6
|
+
*Hartley McGuire*
|
7
|
+
|
8
|
+
* Fix CacheStore#write_multi when using a distributed Redis cache with a connection pool.
|
9
|
+
|
10
|
+
Fixes [#48938](https://github.com/rails/rails/issues/48938).
|
11
|
+
|
12
|
+
*Jonathan del Strother*
|
13
|
+
|
14
|
+
|
15
|
+
## Rails 7.0.7.2 (August 22, 2023) ##
|
16
|
+
|
17
|
+
* No changes.
|
18
|
+
|
19
|
+
|
1
20
|
## Rails 7.0.7.1 (August 22, 2023) ##
|
2
21
|
|
3
22
|
* Use a temporary file for storing unencrypted files while editing
|
@@ -313,13 +313,15 @@ module ActiveSupport
|
|
313
313
|
|
314
314
|
private
|
315
315
|
def set_redis_capabilities
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
@@ -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
|
213
|
-
|
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.
|
4
|
+
version: 7.0.8
|
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-
|
11
|
+
date: 2023-09-09 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.
|
363
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
362
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.8/activesupport/CHANGELOG.md
|
363
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.8/
|
364
364
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
365
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
365
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.8/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.
|
384
|
+
rubygems_version: 3.4.18
|
385
385
|
signing_key:
|
386
386
|
specification_version: 4
|
387
387
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|