rails-rfc6570 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/rails/rfc6570/version.rb +2 -2
- data/rails-rfc6570.gemspec +1 -1
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.1.1/CHANGELOG.md +477 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.1.1/CHANGELOG.md +139 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.1.1/CHANGELOG.md +465 -0
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/CHANGELOG.md +55 -46
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/README.md +6 -6
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/addressable.gemspec +6 -6
- data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/README.md +299 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/json.gemspec +62 -0
- data/vendor/bundle/ruby/3.4.0/gems/{minitest-5.25.5 → minitest-5.26.2}/README.rdoc +10 -8
- data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/CHANGELOG.md +8 -0
- data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/README.md +38 -29
- data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/CHANGELOG.md +81 -14
- data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/README.md +8 -0
- data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/rake.gemspec +1 -1
- data/vendor/bundle/ruby/3.4.0/specifications/{actionpack-8.0.3.gemspec → actionpack-8.1.1.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{actionview-8.0.3.gemspec → actionview-8.1.1.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{activesupport-8.0.3.gemspec → activesupport-8.1.1.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{addressable-2.8.7.gemspec → addressable-2.8.8.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{bigdecimal-3.2.3.gemspec → bigdecimal-3.3.1.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/{connection_pool-2.5.4.gemspec → connection_pool-2.5.5.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/json-2.16.0.gemspec +0 -0
- data/vendor/bundle/ruby/3.4.0/specifications/{minitest-5.25.5.gemspec → minitest-5.26.2.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{public_suffix-6.0.2.gemspec → public_suffix-7.0.0.gemspec} +5 -5
- data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.1.gemspec → rack-3.2.4.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/{rake-13.3.0.gemspec → rake-13.3.1.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-3.13.1.gemspec → rspec-3.13.2.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-core-3.13.5.gemspec → rspec-core-3.13.6.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-mocks-3.13.5.gemspec → rspec-mocks-3.13.7.gemspec} +5 -5
- data/vendor/bundle/ruby/3.4.0/specifications/{uri-1.0.3.gemspec → uri-1.1.1.gemspec} +4 -4
- metadata +55 -55
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.3/CHANGELOG.md +0 -285
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.3/CHANGELOG.md +0 -129
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.3/CHANGELOG.md +0 -309
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/README.md +0 -138
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/benchmark.gemspec +0 -32
- data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.1.gemspec +0 -23
- /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/bigdecimal.gemspec +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/connection_pool.gemspec +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{uri-1.0.3 → uri-1.1.1}/README.md +0 -0
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
## Rails 8.0.3 (September 22, 2025) ##
|
|
2
|
-
|
|
3
|
-
* `ActiveSupport::FileUpdateChecker` does not depend on `Time.now` to prevent unnecessary reloads with time travel test helpers
|
|
4
|
-
|
|
5
|
-
*Jan Grodowski*
|
|
6
|
-
|
|
7
|
-
* Fix `ActiveSupport::BroadcastLogger` from executing a block argument for each logger (tagged, info, etc.).
|
|
8
|
-
|
|
9
|
-
*Jared Armstrong*
|
|
10
|
-
|
|
11
|
-
* Make `ActiveSupport::Logger` `#freeze`-friendly.
|
|
12
|
-
|
|
13
|
-
*Joshua Young*
|
|
14
|
-
|
|
15
|
-
* Fix `ActiveSupport::HashWithIndifferentAccess#transform_keys!` removing defaults.
|
|
16
|
-
|
|
17
|
-
*Hartley McGuire*
|
|
18
|
-
|
|
19
|
-
* Fix `ActiveSupport::HashWithIndifferentAccess#tranform_keys!` to handle collisions.
|
|
20
|
-
|
|
21
|
-
If the transformation would result in a key equal to another not yet transformed one,
|
|
22
|
-
it would result in keys being lost.
|
|
23
|
-
|
|
24
|
-
Before:
|
|
25
|
-
|
|
26
|
-
```ruby
|
|
27
|
-
>> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
|
|
28
|
-
=> {"c" => 1}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
After:
|
|
32
|
-
|
|
33
|
-
```ruby
|
|
34
|
-
>> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
|
|
35
|
-
=> {"c" => 1, "d" => 2}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
*Jason T Johnson*, *Jean Boussier*
|
|
39
|
-
|
|
40
|
-
* Fix `ActiveSupport::Cache::MemCacheStore#read_multi` to handle network errors.
|
|
41
|
-
|
|
42
|
-
This method specifically wasn't handling network errors like other codepaths.
|
|
43
|
-
|
|
44
|
-
*Alessandro Dal Grande*
|
|
45
|
-
|
|
46
|
-
* Fix configuring `RedisCacheStore` with `raw: true`.
|
|
47
|
-
|
|
48
|
-
*fatkodima*
|
|
49
|
-
|
|
50
|
-
* Fix `Enumerable#sole` for infinite collections.
|
|
51
|
-
|
|
52
|
-
*fatkodima*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## Rails 8.0.2.1 (August 13, 2025) ##
|
|
56
|
-
|
|
57
|
-
* No changes.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Rails 8.0.2 (March 12, 2025) ##
|
|
61
|
-
|
|
62
|
-
* Fix setting `to_time_preserves_timezone` from `new_framework_defaults_8_0.rb`.
|
|
63
|
-
|
|
64
|
-
*fatkodima*
|
|
65
|
-
|
|
66
|
-
* Fix Active Support Cache `fetch_multi` when local store is active.
|
|
67
|
-
|
|
68
|
-
`fetch_multi` now properly yield to the provided block for missing entries
|
|
69
|
-
that have been recorded as such in the local store.
|
|
70
|
-
|
|
71
|
-
*Jean Boussier*
|
|
72
|
-
|
|
73
|
-
* Fix execution wrapping to report all exceptions, including `Exception`.
|
|
74
|
-
|
|
75
|
-
If a more serious error like `SystemStackError` or `NoMemoryError` happens,
|
|
76
|
-
the error reporter should be able to report these kinds of exceptions.
|
|
77
|
-
|
|
78
|
-
*Gannon McGibbon*
|
|
79
|
-
|
|
80
|
-
* Fix `RedisCacheStore` and `MemCacheStore` to also handle connection pool related errors.
|
|
81
|
-
|
|
82
|
-
These errors are rescued and reported to `Rails.error`.
|
|
83
|
-
|
|
84
|
-
*Jean Boussier*
|
|
85
|
-
|
|
86
|
-
* Fix `ActiveSupport::Cache#read_multi` to respect version expiry when using local cache.
|
|
87
|
-
|
|
88
|
-
*zzak*
|
|
89
|
-
|
|
90
|
-
* Fix `ActiveSupport::MessageVerifier` and `ActiveSupport::MessageEncryptor` configuration of `on_rotation` callback.
|
|
91
|
-
|
|
92
|
-
```ruby
|
|
93
|
-
verifier.rotate(old_secret).on_rotation { ... }
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Now both work as documented.
|
|
97
|
-
|
|
98
|
-
*Jean Boussier*
|
|
99
|
-
|
|
100
|
-
* Fix `ActiveSupport::MessageVerifier` to always be able to verify both URL-safe and URL-unsafe payloads.
|
|
101
|
-
|
|
102
|
-
This is to allow transitioning seemlessly from either configuration without immediately invalidating
|
|
103
|
-
all previously generated signed messages.
|
|
104
|
-
|
|
105
|
-
*Jean Boussier*, *Florent Beaurain*, *Ali Sepehri*
|
|
106
|
-
|
|
107
|
-
* Fix `cache.fetch` to honor the provided expiry when `:race_condition_ttl` is used.
|
|
108
|
-
|
|
109
|
-
```ruby
|
|
110
|
-
cache.fetch("key", expires_in: 1.hour, race_condition_ttl: 5.second) do
|
|
111
|
-
"something"
|
|
112
|
-
end
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
In the above example, the final cache entry would have a 10 seconds TTL instead
|
|
116
|
-
of the requested 1 hour.
|
|
117
|
-
|
|
118
|
-
*Dhia*
|
|
119
|
-
|
|
120
|
-
* Better handle procs with splat arguments in `set_callback`.
|
|
121
|
-
|
|
122
|
-
*Radamés Roriz*
|
|
123
|
-
|
|
124
|
-
* Fix `String#mb_chars` to not mutate the receiver.
|
|
125
|
-
|
|
126
|
-
Previously it would call `force_encoding` on the receiver,
|
|
127
|
-
now it dups the receiver first.
|
|
128
|
-
|
|
129
|
-
*Jean Boussier*
|
|
130
|
-
|
|
131
|
-
* Improve `ErrorSubscriber` to also mark error causes as reported.
|
|
132
|
-
|
|
133
|
-
This avoid some cases of errors being reported twice, notably in views because of how
|
|
134
|
-
errors are wrapped in `ActionView::Template::Error`.
|
|
135
|
-
|
|
136
|
-
*Jean Boussier*
|
|
137
|
-
|
|
138
|
-
* Fix `Module#module_parent_name` to return the correct name after the module has been named.
|
|
139
|
-
|
|
140
|
-
When called on an anonymous module, the return value wouldn't change after the module was given a name
|
|
141
|
-
later by being assigned to a constant.
|
|
142
|
-
|
|
143
|
-
```ruby
|
|
144
|
-
mod = Module.new
|
|
145
|
-
mod.module_parent_name # => "Object"
|
|
146
|
-
MyModule::Something = mod
|
|
147
|
-
mod.module_parent_name # => "MyModule"
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
*Jean Boussier*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## Rails 8.0.1 (December 13, 2024) ##
|
|
154
|
-
|
|
155
|
-
* Fix a bug in `ERB::Util.tokenize` that causes incorrect tokenization when ERB tags are preceeded by multibyte characters.
|
|
156
|
-
|
|
157
|
-
*Martin Emde*
|
|
158
|
-
|
|
159
|
-
* Restore the ability to decorate methods generated by `class_attribute`.
|
|
160
|
-
|
|
161
|
-
It always has been complicated to use Module#prepend or an alias method chain
|
|
162
|
-
to decorate methods defined by `class_attribute`, but became even harder in 8.0.
|
|
163
|
-
|
|
164
|
-
This capability is now supported for both reader and writer methods.
|
|
165
|
-
|
|
166
|
-
*Jean Boussier*
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
## Rails 8.0.0.1 (December 10, 2024) ##
|
|
170
|
-
|
|
171
|
-
* No changes.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
## Rails 8.0.0 (November 07, 2024) ##
|
|
175
|
-
|
|
176
|
-
* No changes.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
## Rails 8.0.0.rc2 (October 30, 2024) ##
|
|
180
|
-
|
|
181
|
-
* No changes.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
## Rails 8.0.0.rc1 (October 19, 2024) ##
|
|
185
|
-
|
|
186
|
-
* Remove deprecated support to passing an array of strings to `ActiveSupport::Deprecation#warn`.
|
|
187
|
-
|
|
188
|
-
*Rafael Mendonça França*
|
|
189
|
-
|
|
190
|
-
* Remove deprecated support to setting `attr_internal_naming_format` with a `@` prefix.
|
|
191
|
-
|
|
192
|
-
*Rafael Mendonça França*
|
|
193
|
-
|
|
194
|
-
* Remove deprecated `ActiveSupport::ProxyObject`.
|
|
195
|
-
|
|
196
|
-
*Rafael Mendonça França*
|
|
197
|
-
|
|
198
|
-
* Don't execute i18n watcher on boot. It shouldn't catch any file changes initially,
|
|
199
|
-
and unnecessarily slows down boot of applications with lots of translations.
|
|
200
|
-
|
|
201
|
-
*Gannon McGibbon*, *David Stosik*
|
|
202
|
-
|
|
203
|
-
* Fix `ActiveSupport::HashWithIndifferentAccess#stringify_keys` to stringify all keys not just symbols.
|
|
204
|
-
|
|
205
|
-
Previously:
|
|
206
|
-
|
|
207
|
-
```ruby
|
|
208
|
-
{ 1 => 2 }.with_indifferent_access.stringify_keys[1] # => 2
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
After this change:
|
|
212
|
-
|
|
213
|
-
```ruby
|
|
214
|
-
{ 1 => 2 }.with_indifferent_access.stringify_keys["1"] # => 2
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
This change can be seen as a bug fix, but since it behaved like this for a very long time, we're deciding
|
|
218
|
-
to not backport the fix and to make the change in a major release.
|
|
219
|
-
|
|
220
|
-
*Jean Boussier*
|
|
221
|
-
|
|
222
|
-
## Rails 8.0.0.beta1 (September 26, 2024) ##
|
|
223
|
-
|
|
224
|
-
* Include options when instrumenting `ActiveSupport::Cache::Store#delete` and `ActiveSupport::Cache::Store#delete_multi`.
|
|
225
|
-
|
|
226
|
-
*Adam Renberg Tamm*
|
|
227
|
-
|
|
228
|
-
* Print test names when running `rails test -v` for parallel tests.
|
|
229
|
-
|
|
230
|
-
*John Hawthorn*, *Abeid Ahmed*
|
|
231
|
-
|
|
232
|
-
* Deprecate `Benchmark.ms` core extension.
|
|
233
|
-
|
|
234
|
-
The `benchmark` gem will become bundled in Ruby 3.5
|
|
235
|
-
|
|
236
|
-
*Earlopain*
|
|
237
|
-
|
|
238
|
-
* `ActiveSupport::TimeWithZone#inspect` now uses ISO 8601 style time like `Time#inspect`
|
|
239
|
-
|
|
240
|
-
*John Hawthorn*
|
|
241
|
-
|
|
242
|
-
* `ActiveSupport::ErrorReporter#report` now assigns a backtrace to unraised exceptions.
|
|
243
|
-
|
|
244
|
-
Previously reporting an un-raised exception would result in an error report without
|
|
245
|
-
a backtrace. Now it automatically generates one.
|
|
246
|
-
|
|
247
|
-
*Jean Boussier*
|
|
248
|
-
|
|
249
|
-
* Add `escape_html_entities` option to `ActiveSupport::JSON.encode`.
|
|
250
|
-
|
|
251
|
-
This allows for overriding the global configuration found at
|
|
252
|
-
`ActiveSupport.escape_html_entities_in_json` for specific calls to `to_json`.
|
|
253
|
-
|
|
254
|
-
This should be usable from controllers in the following manner:
|
|
255
|
-
```ruby
|
|
256
|
-
class MyController < ApplicationController
|
|
257
|
-
def index
|
|
258
|
-
render json: { hello: "world" }, escape_html_entities: false
|
|
259
|
-
end
|
|
260
|
-
end
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
*Nigel Baillie*
|
|
264
|
-
|
|
265
|
-
* Raise when using key which can't respond to `#to_sym` in `EncryptedConfiguration`.
|
|
266
|
-
|
|
267
|
-
As is the case when trying to use an Integer or Float as a key, which is unsupported.
|
|
268
|
-
|
|
269
|
-
*zzak*
|
|
270
|
-
|
|
271
|
-
* Deprecate addition and since between two `Time` and `ActiveSupport::TimeWithZone`.
|
|
272
|
-
|
|
273
|
-
Previously adding time instances together such as `10.days.ago + 10.days.ago` or `10.days.ago.since(10.days.ago)` produced a nonsensical future date. This behavior is deprecated and will be removed in Rails 8.1.
|
|
274
|
-
|
|
275
|
-
*Nick Schwaderer*
|
|
276
|
-
|
|
277
|
-
* Support rfc2822 format for Time#to_fs & Date#to_fs.
|
|
278
|
-
|
|
279
|
-
*Akshay Birajdar*
|
|
280
|
-
|
|
281
|
-
* Optimize load time for `Railtie#initialize_i18n`. Filter `I18n.load_path`s passed to the file watcher to only those
|
|
282
|
-
under `Rails.root`. Previously the watcher would grab all available locales, including those in gems
|
|
283
|
-
which do not require a watcher because they won't change.
|
|
284
|
-
|
|
285
|
-
*Nick Schwaderer*
|
|
286
|
-
|
|
287
|
-
* Add a `filter` option to `in_order_of` to prioritize certain values in the sorting without filtering the results
|
|
288
|
-
by these values.
|
|
289
|
-
|
|
290
|
-
*Igor Depolli*
|
|
291
|
-
|
|
292
|
-
* Improve error message when using `assert_difference` or `assert_changes` with a
|
|
293
|
-
proc by printing the proc's source code (MRI only).
|
|
294
|
-
|
|
295
|
-
*Richard Böhme*, *Jean Boussier*
|
|
296
|
-
|
|
297
|
-
* Add a new configuration value `:zone` for `ActiveSupport.to_time_preserves_timezone` and rename the previous `true` value to `:offset`. The new default value is `:zone`.
|
|
298
|
-
|
|
299
|
-
*Jason Kim*, *John Hawthorn*
|
|
300
|
-
|
|
301
|
-
* Align instrumentation `payload[:key]` in ActiveSupport::Cache to follow the same pattern, with namespaced and normalized keys.
|
|
302
|
-
|
|
303
|
-
*Frederik Erbs Spang Thomsen*
|
|
304
|
-
|
|
305
|
-
* Fix `travel_to` to set usec 0 when `with_usec` is `false` and the given argument String or DateTime.
|
|
306
|
-
|
|
307
|
-
*mopp*
|
|
308
|
-
|
|
309
|
-
Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/activesupport/CHANGELOG.md) for previous changes.
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# Benchmark
|
|
2
|
-
|
|
3
|
-
The Benchmark module provides methods for benchmarking Ruby code, giving detailed reports on the time taken for each task.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Add this line to your application's Gemfile:
|
|
8
|
-
|
|
9
|
-
```ruby
|
|
10
|
-
gem 'benchmark'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
And then execute:
|
|
14
|
-
|
|
15
|
-
$ bundle
|
|
16
|
-
|
|
17
|
-
Or install it yourself as:
|
|
18
|
-
|
|
19
|
-
$ gem install benchmark
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
The Benchmark module provides methods to measure and report the time used to execute Ruby code.
|
|
24
|
-
|
|
25
|
-
Measure the time to construct the string given by the expression <code>"a"*1_000_000_000</code>:
|
|
26
|
-
|
|
27
|
-
```ruby
|
|
28
|
-
require 'benchmark'
|
|
29
|
-
puts Benchmark.measure { "a"*1_000_000_000 }
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
0.350000 0.400000 0.750000 ( 0.835234)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
This report shows the user CPU time, system CPU time, the total time (sum of user CPU time, system CPU time, children's user CPU time, and children's system CPU time), and the elapsed real time. The unit of time is seconds.
|
|
39
|
-
|
|
40
|
-
Do some experiments sequentially using the #bm method:
|
|
41
|
-
|
|
42
|
-
```ruby
|
|
43
|
-
require 'benchmark'
|
|
44
|
-
n = 5000000
|
|
45
|
-
Benchmark.bm do |x|
|
|
46
|
-
x.report { for i in 1..n; a = "1"; end }
|
|
47
|
-
x.report { n.times do ; a = "1"; end }
|
|
48
|
-
x.report { 1.upto(n) do ; a = "1"; end }
|
|
49
|
-
end
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
The result:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
user system total real
|
|
56
|
-
1.010000 0.000000 1.010000 ( 1.014479)
|
|
57
|
-
1.000000 0.000000 1.000000 ( 0.998261)
|
|
58
|
-
0.980000 0.000000 0.980000 ( 0.981335)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Continuing the previous example, put a label in each report:
|
|
62
|
-
|
|
63
|
-
```ruby
|
|
64
|
-
require 'benchmark'
|
|
65
|
-
n = 5000000
|
|
66
|
-
Benchmark.bm(7) do |x|
|
|
67
|
-
x.report("for:") { for i in 1..n; a = "1"; end }
|
|
68
|
-
x.report("times:") { n.times do ; a = "1"; end }
|
|
69
|
-
x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
|
70
|
-
end
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
The result:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
user system total real
|
|
77
|
-
for: 1.010000 0.000000 1.010000 ( 1.015688)
|
|
78
|
-
times: 1.000000 0.000000 1.000000 ( 1.003611)
|
|
79
|
-
upto: 1.030000 0.000000 1.030000 ( 1.028098)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The times for some benchmarks depend on the order in which items are run. These differences are due to the cost of memory allocation and garbage collection. To avoid these discrepancies, the #bmbm method is provided. For example, to compare ways to sort an array of floats:
|
|
83
|
-
|
|
84
|
-
```ruby
|
|
85
|
-
require 'benchmark'
|
|
86
|
-
array = (1..1000000).map { rand }
|
|
87
|
-
Benchmark.bmbm do |x|
|
|
88
|
-
x.report("sort!") { array.dup.sort! }
|
|
89
|
-
x.report("sort") { array.dup.sort }
|
|
90
|
-
end
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
The result:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Rehearsal -----------------------------------------
|
|
97
|
-
sort! 1.490000 0.010000 1.500000 ( 1.490520)
|
|
98
|
-
sort 1.460000 0.000000 1.460000 ( 1.463025)
|
|
99
|
-
-------------------------------- total: 2.960000sec
|
|
100
|
-
user system total real
|
|
101
|
-
sort! 1.460000 0.000000 1.460000 ( 1.460465)
|
|
102
|
-
sort 1.450000 0.010000 1.460000 ( 1.448327)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Report statistics of sequential experiments with unique labels, using the #benchmark method:
|
|
106
|
-
|
|
107
|
-
```ruby
|
|
108
|
-
require 'benchmark'
|
|
109
|
-
include Benchmark # we need the CAPTION and FORMAT constants
|
|
110
|
-
n = 5000000
|
|
111
|
-
Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
|
|
112
|
-
tf = x.report("for:") { for i in 1..n; a = "1"; end }
|
|
113
|
-
tt = x.report("times:") { n.times do ; a = "1"; end }
|
|
114
|
-
tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
|
115
|
-
[tf+tt+tu, (tf+tt+tu)/3]
|
|
116
|
-
end
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
The result:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
user system total real
|
|
123
|
-
for: 0.950000 0.000000 0.950000 ( 0.952039)
|
|
124
|
-
times: 0.980000 0.000000 0.980000 ( 0.984938)
|
|
125
|
-
upto: 0.950000 0.000000 0.950000 ( 0.946787)
|
|
126
|
-
>total: 2.880000 0.000000 2.880000 ( 2.883764)
|
|
127
|
-
>avg: 0.960000 0.000000 0.960000 ( 0.961255)
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Development
|
|
131
|
-
|
|
132
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
133
|
-
|
|
134
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
135
|
-
|
|
136
|
-
## Contributing
|
|
137
|
-
|
|
138
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/benchmark.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name = File.basename(__FILE__, ".gemspec")
|
|
2
|
-
version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir|
|
|
3
|
-
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
|
4
|
-
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
|
5
|
-
end rescue nil
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
Gem::Specification.new do |spec|
|
|
9
|
-
spec.name = name
|
|
10
|
-
spec.version = version
|
|
11
|
-
spec.authors = ["Yukihiro Matsumoto"]
|
|
12
|
-
spec.email = ["matz@ruby-lang.org"]
|
|
13
|
-
|
|
14
|
-
spec.summary = %q{a performance benchmarking library}
|
|
15
|
-
spec.description = spec.summary
|
|
16
|
-
spec.homepage = "https://github.com/ruby/benchmark"
|
|
17
|
-
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
18
|
-
|
|
19
|
-
spec.required_ruby_version = ">= 2.1.0"
|
|
20
|
-
|
|
21
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
22
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
23
|
-
|
|
24
|
-
# Specify which files should be added to the gem when it is released.
|
|
25
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
26
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
27
|
-
`git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
28
|
-
end
|
|
29
|
-
spec.bindir = "exe"
|
|
30
|
-
spec.executables = []
|
|
31
|
-
spec.require_paths = ["lib"]
|
|
32
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: benchmark 0.4.1 ruby lib
|
|
3
|
-
|
|
4
|
-
Gem::Specification.new do |s|
|
|
5
|
-
s.name = "benchmark".freeze
|
|
6
|
-
s.version = "0.4.1".freeze
|
|
7
|
-
|
|
8
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
|
-
s.metadata = { "homepage_uri" => "https://github.com/ruby/benchmark", "source_code_uri" => "https://github.com/ruby/benchmark" } if s.respond_to? :metadata=
|
|
10
|
-
s.require_paths = ["lib".freeze]
|
|
11
|
-
s.authors = ["Yukihiro Matsumoto".freeze]
|
|
12
|
-
s.bindir = "exe".freeze
|
|
13
|
-
s.date = "2025-05-30"
|
|
14
|
-
s.description = "a performance benchmarking library".freeze
|
|
15
|
-
s.email = ["matz@ruby-lang.org".freeze]
|
|
16
|
-
s.homepage = "https://github.com/ruby/benchmark".freeze
|
|
17
|
-
s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
|
|
18
|
-
s.required_ruby_version = Gem::Requirement.new(">= 2.1.0".freeze)
|
|
19
|
-
s.rubygems_version = "3.5.11".freeze
|
|
20
|
-
s.summary = "a performance benchmarking library".freeze
|
|
21
|
-
|
|
22
|
-
s.installed_by_version = "3.6.9".freeze
|
|
23
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/bigdecimal.gemspec
RENAMED
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|