activesupport 6.1.1 → 6.1.2

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: 3d215240c46e0de60027e61d480a945128c8c07823224325caa07011fd404054
4
- data.tar.gz: c141c31282b64aa0cb097498b73706811f5de6fb287c90fef4975fb000e6d157
3
+ metadata.gz: 6326314394101143f281211cb89d1042e569d7426be263d1f8e69c596ccf366a
4
+ data.tar.gz: 36b3d5e51a648b00293158f83101d18d5783a67c315c90532692543645438b25
5
5
  SHA512:
6
- metadata.gz: 9f4ac84a1eda835f117fc1c275d87772abf989cd9b51f724f373a8b148f1001135e0687262affaf3cbc4ebf82b4800e089c8c81138f538f92b654c81cd58df8a
7
- data.tar.gz: 7209b244dccaa86cf99de2281316a12a0b308db6f4dd8b65113244fd1e879ee516d81d9ed75ab4ea7936d833e41019c6df95a2389033a5a542276c11602707ea
6
+ metadata.gz: 37d0490abe7cb3e02522a1f4d7b73044cd2bc97767a9bff3981da6abd2ba8f426ee9d09bbabf25489c07b676dbf3ac6e31535ac72a15723bf8aaf1db3ba3f2ed
7
+ data.tar.gz: d2bc56dfb71130dbd367c93d24decc7a41c6154630755a35cca489b9246c65e19dd740d8509384a7db58f255a483c99ed8abfb22d3bec248b05328e849826eca
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## Rails 6.1.2 (February 09, 2021) ##
2
+
3
+ * `ActiveSupport::Cache::MemCacheStore` now accepts an explicit `nil` for its `addresses` argument.
4
+
5
+ ```ruby
6
+ config.cache_store = :mem_cache_store, nil
7
+
8
+ # is now equivalent to
9
+
10
+ config.cache_store = :mem_cache_store
11
+
12
+ # and is also equivalent to
13
+
14
+ config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211"
15
+
16
+ # which is the fallback behavior of Dalli
17
+ ```
18
+
19
+ This helps those migrating from `:dalli_store`, where an explicit `nil` was permitted.
20
+
21
+ *Michael Overmeyer*
22
+
23
+
1
24
  ## Rails 6.1.1 (January 07, 2021) ##
2
25
 
3
26
  * Change `IPAddr#to_json` to match the behavior of the json gem returning the string representation
data/README.rdoc CHANGED
@@ -15,7 +15,7 @@ The latest version of Active Support can be installed with RubyGems:
15
15
 
16
16
  Source code can be downloaded as part of the Rails project on GitHub:
17
17
 
18
- * https://github.com/rails/rails/tree/master/activesupport
18
+ * https://github.com/rails/rails/tree/main/activesupport
19
19
 
20
20
 
21
21
  == License
@@ -64,7 +64,7 @@ module ActiveSupport
64
64
  def self.build_mem_cache(*addresses) # :nodoc:
65
65
  addresses = addresses.flatten
66
66
  options = addresses.extract_options!
67
- addresses = nil if addresses.empty?
67
+ addresses = nil if addresses.compact.empty?
68
68
  pool_options = retrieve_pool_options(options)
69
69
 
70
70
  if pool_options.empty?
@@ -185,10 +185,14 @@ module ActiveSupport
185
185
  # before applying the regular expression to ensure we are escaping all
186
186
  # characters properly.
187
187
  def normalize_key(key, options)
188
- key = super.dup
189
- key = key.force_encoding(Encoding::ASCII_8BIT)
190
- key = key.gsub(ESCAPE_KEY_CHARS) { |match| "%#{match.getbyte(0).to_s(16).upcase}" }
191
- key = "#{key[0, 213]}:md5:#{ActiveSupport::Digest.hexdigest(key)}" if key.size > 250
188
+ key = super
189
+
190
+ if key
191
+ key = key.dup.force_encoding(Encoding::ASCII_8BIT)
192
+ key = key.gsub(ESCAPE_KEY_CHARS) { |match| "%#{match.getbyte(0).to_s(16).upcase}" }
193
+ key = "#{key[0, 213]}:md5:#{ActiveSupport::Digest.hexdigest(key)}" if key.size > 250
194
+ end
195
+
192
196
  key
193
197
  end
194
198
 
@@ -42,8 +42,14 @@ class Time
42
42
 
43
43
  # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime
44
44
  # instances can be used when called with a single argument
45
- def at_with_coercion(*args)
46
- return at_without_coercion(*args) if args.size != 1
45
+ def at_with_coercion(*args, **kwargs)
46
+ if args.size != 1
47
+ if kwargs.empty?
48
+ return at_without_coercion(*args)
49
+ else
50
+ return at_without_coercion(*args, **kwargs)
51
+ end
52
+ end
47
53
 
48
54
  # Time.at can be called with a time or numerical value
49
55
  time_or_number = args.first
@@ -9,7 +9,7 @@ module ActiveSupport
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
- TINY = 1
12
+ TINY = 2
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
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: 6.1.1
4
+ version: 6.1.2
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: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -357,10 +357,10 @@ licenses:
357
357
  - MIT
358
358
  metadata:
359
359
  bug_tracker_uri: https://github.com/rails/rails/issues
360
- changelog_uri: https://github.com/rails/rails/blob/v6.1.1/activesupport/CHANGELOG.md
361
- documentation_uri: https://api.rubyonrails.org/v6.1.1/
360
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.2/activesupport/CHANGELOG.md
361
+ documentation_uri: https://api.rubyonrails.org/v6.1.2/
362
362
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
363
- source_code_uri: https://github.com/rails/rails/tree/v6.1.1/activesupport
363
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.2/activesupport
364
364
  post_install_message:
365
365
  rdoc_options:
366
366
  - "--encoding"