activesupport 6.1.0 → 6.1.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: 89f141c86a0ef71902f1230ba93a5f91793d87815800871ec2ea1c71a2ad8d2a
4
- data.tar.gz: d3e98c9579e71177d76562012bdc4480311b828bb95787478cc968e8efe93bb9
3
+ metadata.gz: 3d215240c46e0de60027e61d480a945128c8c07823224325caa07011fd404054
4
+ data.tar.gz: c141c31282b64aa0cb097498b73706811f5de6fb287c90fef4975fb000e6d157
5
5
  SHA512:
6
- metadata.gz: ffc37bacd14d2786f7c5cf287040c1e8a5e39a362badf48f85edd8dd6067dbaa4a69252d21900ea91e34f66c69f6c03817f211c30891b9e8a0d0ee4cf7e36290
7
- data.tar.gz: 68172692e1dc857e587dbc2a2351b61d26e1957185bf74791109ffcf6b20ac3561884d5bc00b8f5a1a62430bd3fb57195c73d6ed7486d1b7c3b61b58bcf3e92a
6
+ metadata.gz: 9f4ac84a1eda835f117fc1c275d87772abf989cd9b51f724f373a8b148f1001135e0687262affaf3cbc4ebf82b4800e089c8c81138f538f92b654c81cd58df8a
7
+ data.tar.gz: 7209b244dccaa86cf99de2281316a12a0b308db6f4dd8b65113244fd1e879ee516d81d9ed75ab4ea7936d833e41019c6df95a2389033a5a542276c11602707ea
@@ -1,3 +1,23 @@
1
+ ## Rails 6.1.1 (January 07, 2021) ##
2
+
3
+ * Change `IPAddr#to_json` to match the behavior of the json gem returning the string representation
4
+ instead of the instance variables of the object.
5
+
6
+ Before:
7
+
8
+ ```ruby
9
+ IPAddr.new("127.0.0.1").to_json
10
+ # => "{\"addr\":2130706433,\"family\":2,\"mask_addr\":4294967295}"
11
+ ```
12
+
13
+ After:
14
+
15
+ ```ruby
16
+ IPAddr.new("127.0.0.1").to_json
17
+ # => "\"127.0.0.1\""
18
+ ```
19
+
20
+
1
21
  ## Rails 6.1.0 (December 09, 2020) ##
2
22
 
3
23
  * Ensure `MemoryStore` disables compression by default. Reverts behavior of
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Dir.glob(File.expand_path("core_ext/*.rb", __dir__)).each do |path|
3
+ Dir.glob(File.expand_path("core_ext/*.rb", __dir__)).sort.each do |path|
4
4
  require path
5
5
  end
@@ -3,6 +3,7 @@
3
3
  # Hack to load json gem first so we can overwrite its to_json.
4
4
  require "json"
5
5
  require "bigdecimal"
6
+ require "ipaddr"
6
7
  require "uri/generic"
7
8
  require "pathname"
8
9
  require "active_support/core_ext/big_decimal/conversions" # for #to_s
@@ -219,6 +220,12 @@ class Pathname #:nodoc:
219
220
  end
220
221
  end
221
222
 
223
+ class IPAddr # :nodoc:
224
+ def as_json(options = nil)
225
+ to_s
226
+ end
227
+ end
228
+
222
229
  class Process::Status #:nodoc:
223
230
  def as_json(options = nil)
224
231
  { exitstatus: exitstatus, pid: pid }
@@ -84,7 +84,7 @@ class ERB
84
84
  # use inside HTML attributes.
85
85
  #
86
86
  # If your JSON is being used downstream for insertion into the DOM, be aware of
87
- # whether or not it is being inserted via +html()+. Most jQuery plugins do this.
87
+ # whether or not it is being inserted via <tt>html()</tt>. Most jQuery plugins do this.
88
88
  # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated
89
89
  # content returned by your JSON.
90
90
  #
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "time"
3
4
  require "active_support/inflector/methods"
4
5
  require "active_support/values/time_zone"
5
6
 
@@ -9,7 +9,7 @@ module ActiveSupport
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
- TINY = 0
12
+ TINY = 1
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -14,12 +14,12 @@ module ActiveSupport
14
14
  end
15
15
 
16
16
  module ClassMethods
17
- # Rescue exceptions raised in controller actions.
17
+ # Registers exception classes with a handler to be called by <tt>rescue_with_handler</tt>.
18
18
  #
19
19
  # <tt>rescue_from</tt> receives a series of exception classes or class
20
- # names, and a trailing <tt>:with</tt> option with the name of a method
21
- # or a Proc object to be called to handle them. Alternatively a block can
22
- # be given.
20
+ # names, and an exception handler specified by a trailing <tt>:with</tt>
21
+ # option containing the name of a method or a Proc object. Alternatively, a block
22
+ # can be given as the handler.
23
23
  #
24
24
  # Handlers that take one argument will be called with the exception, so
25
25
  # that the exception can be inspected when dealing with it.
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.0
4
+ version: 6.1.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: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -357,11 +357,11 @@ 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.0/activesupport/CHANGELOG.md
361
- documentation_uri: https://api.rubyonrails.org/v6.1.0/
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/
362
362
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
363
- source_code_uri: https://github.com/rails/rails/tree/v6.1.0/activesupport
364
- post_install_message:
363
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.1/activesupport
364
+ post_install_message:
365
365
  rdoc_options:
366
366
  - "--encoding"
367
367
  - UTF-8
@@ -378,8 +378,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
378
378
  - !ruby/object:Gem::Version
379
379
  version: '0'
380
380
  requirements: []
381
- rubygems_version: 3.1.4
382
- signing_key:
381
+ rubygems_version: 3.2.3
382
+ signing_key:
383
383
  specification_version: 4
384
384
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
385
385
  Rails framework.