activesupport 7.0.5.1 → 7.0.6

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: 87d108732dc49cf014c3bc1d0d792dbd3c82a5b64bde2261236a5d28eaccf7c5
4
- data.tar.gz: baae63628a0b21790baa214e29395c3f552f420656f40cef982a45d87cf4bc7a
3
+ metadata.gz: 817ceee259b12be4eff5b6dce8d0a471f80a6e103e9fa3ddb7846889f617df14
4
+ data.tar.gz: f6cac911c197763c9244a04fcf77e6065b778c607e1ec4e132fd21f2f07a114d
5
5
  SHA512:
6
- metadata.gz: 50d31a16339a92e9ac8f77696ec91239831e3ff41ec7db7f156d966b92962b0d80f98295fa72ebd261103a8f7e5cd72c781863b9d0c45bb48f5d8f3a077d9759
7
- data.tar.gz: 2fe143a1e688083b58f993ccd77f7e9be4fc171440140d06f7420cdddd90c9a421b8e6f1db47589722e7b1a0c2cdca6dea26e4cce3ca63df49ec41687a25c841
6
+ metadata.gz: 6b65a232e1c6e638092aaf4953fa6e876199568367922159498cdc46b2ebad6456e2ab78d81bbfcad8a9e4f6e4303ff797a1efacf98c3994b710bb25ffeff391
7
+ data.tar.gz: 1d3d4c10c667ea3ce71033128ba6634347cdcaf30d8141fa1888d76978754187ec0d0e3a33c6a506da7669e99d030e1a0553f77a36e537d427fd223d478278e7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## Rails 7.0.6 (June 29, 2023) ##
2
+
3
+ * Fix `EncryptedConfiguration` returning incorrect values for some `Hash`
4
+ methods
5
+
6
+ *Hartley McGuire*
7
+
8
+ * Fix arguments being destructed `Enumerable#many?` with block.
9
+
10
+ *Andrew Novoselac*
11
+
12
+ * Fix humanize for strings ending with id.
13
+
14
+ *fatkodima*
15
+
16
+
1
17
  ## Rails 7.0.5.1 (June 26, 2023) ##
2
18
 
3
19
  * No changes.
data/README.rdoc CHANGED
@@ -13,7 +13,7 @@ The latest version of Active Support can be installed with RubyGems:
13
13
 
14
14
  $ gem install activesupport
15
15
 
16
- Source code can be downloaded as part of the Rails project on GitHub:
16
+ Source code can be downloaded as part of the \Rails project on GitHub:
17
17
 
18
18
  * https://github.com/rails/rails/tree/main/activesupport
19
19
 
@@ -31,7 +31,7 @@ API documentation is at:
31
31
 
32
32
  * https://api.rubyonrails.org
33
33
 
34
- Bug reports for the Ruby on Rails project can be filed here:
34
+ Bug reports for the Ruby on \Rails project can be filed here:
35
35
 
36
36
  * https://github.com/rails/rails/issues
37
37
 
@@ -144,8 +144,8 @@ module Enumerable
144
144
  def many?
145
145
  cnt = 0
146
146
  if block_given?
147
- any? do |element, *args|
148
- cnt += 1 if yield element, *args
147
+ any? do |*args|
148
+ cnt += 1 if yield(*args)
149
149
  cnt > 1
150
150
  end
151
151
  else
@@ -245,7 +245,7 @@ module Enumerable
245
245
  # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored.
246
246
  # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result.
247
247
  def in_order_of(key, series)
248
- group_by(&key).values_at(*series).flatten.compact
248
+ group_by(&key).values_at(*series).flatten(1).compact
249
249
  end
250
250
 
251
251
  # Returns the sole item in the enumerable. If there are no items, or more
@@ -72,8 +72,6 @@ class Hash
72
72
  #
73
73
  # The string pairs "key=value" that conform the query string
74
74
  # are sorted lexicographically in ascending order.
75
- #
76
- # This method is also aliased as +to_param+.
77
75
  def to_query(namespace = nil)
78
76
  query = filter_map do |key, value|
79
77
  unless (value.is_a?(Hash) || value.is_a?(Array)) && value.empty?
@@ -97,8 +97,6 @@ class String
97
97
  # 'active_record/errors'.camelize # => "ActiveRecord::Errors"
98
98
  # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors"
99
99
  #
100
- # +camelize+ is also aliased as +camelcase+.
101
- #
102
100
  # See ActiveSupport::Inflector.camelize.
103
101
  def camelize(first_letter = :upper)
104
102
  case first_letter
@@ -124,8 +122,6 @@ class String
124
122
  # 'x-men: the last stand'.titleize # => "X Men: The Last Stand"
125
123
  # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id"
126
124
  #
127
- # +titleize+ is also aliased as +titlecase+.
128
- #
129
125
  # See ActiveSupport::Inflector.titleize.
130
126
  def titleize(keep_id_suffix: false)
131
127
  ActiveSupport::Inflector.titleize(self, keep_id_suffix: keep_id_suffix)
@@ -76,7 +76,7 @@ module ActiveSupport
76
76
  end
77
77
 
78
78
  def options
79
- @options ||= ActiveSupport::InheritableOptions.new(deep_transform(config))
79
+ @options ||= deep_transform(config)
80
80
  end
81
81
 
82
82
  def deserialize(config)
@@ -43,6 +43,10 @@ module ActiveSupport
43
43
  ObjectSpace.define_finalizer(self, @core.finalizer)
44
44
  end
45
45
 
46
+ def inspect
47
+ "#<ActiveSupport::EventedFileUpdateChecker:#{object_id} @files=#{@core.files.to_a.inspect}"
48
+ end
49
+
46
50
  def updated?
47
51
  if @core.restart?
48
52
  @core.thread_safely(&:restart)
@@ -66,7 +70,7 @@ module ActiveSupport
66
70
  end
67
71
 
68
72
  class Core
69
- attr_reader :updated
73
+ attr_reader :updated, :files
70
74
 
71
75
  def initialize(files, dirs)
72
76
  @files = files.map { |file| Pathname(file).expand_path }.to_set
@@ -84,6 +88,10 @@ module ActiveSupport
84
88
  @mutex = Mutex.new
85
89
 
86
90
  start
91
+ # inotify / FSEvents file descriptors are inherited on fork, so
92
+ # we need to reopen them otherwise only the parent or the child
93
+ # will be notified.
94
+ # FIXME: this callback is keeping a reference on the instance
87
95
  @after_fork = ActiveSupport::ForkTracker.after_fork { start }
88
96
  end
89
97
 
@@ -105,6 +113,11 @@ module ActiveSupport
105
113
  @dtw, @missing = [*@dtw, *@missing].partition(&:exist?)
106
114
  @listener = @dtw.any? ? Listen.to(*@dtw, &method(:changed)) : nil
107
115
  @listener&.start
116
+
117
+ # Wait for the listener to be ready to avoid race conditions
118
+ # Unfortunately this isn't quite enough on macOS because the Darwin backend
119
+ # has an extra private thread we can't wait on.
120
+ @listener&.wait_for_state(:processing_events)
108
121
  end
109
122
 
110
123
  def stop
@@ -9,8 +9,8 @@ module ActiveSupport
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 5
13
- PRE = "1"
12
+ TINY = 6
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -136,7 +136,7 @@ module ActiveSupport
136
136
 
137
137
  result.tr!("_", " ")
138
138
  result.lstrip!
139
- unless keep_id_suffix
139
+ if !keep_id_suffix && lower_case_and_underscored_word.end_with?("_id")
140
140
  result.delete_suffix!(" id")
141
141
  end
142
142
 
@@ -172,8 +172,6 @@ module ActiveSupport
172
172
  # optional parameter +keep_id_suffix+ to true.
173
173
  # By default, this parameter is false.
174
174
  #
175
- # +titleize+ is also aliased as +titlecase+.
176
- #
177
175
  # titleize('man from the boondocks') # => "Man From The Boondocks"
178
176
  # titleize('x-men: the last stand') # => "X Men: The Last Stand"
179
177
  # titleize('TheManWithoutAPast') # => "The Man Without A Past"
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.5.1
4
+ version: 7.0.6
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: 2023-06-26 00:00:00.000000000 Z
11
+ date: 2023-06-29 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.5.1/activesupport/CHANGELOG.md
363
- documentation_uri: https://api.rubyonrails.org/v7.0.5.1/
362
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.6/activesupport/CHANGELOG.md
363
+ documentation_uri: https://api.rubyonrails.org/v7.0.6/
364
364
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
365
- source_code_uri: https://github.com/rails/rails/tree/v7.0.5.1/activesupport
365
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.6/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.3.3
385
- signing_key:
384
+ rubygems_version: 3.4.13
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.