Setting up the parallel workers could be an overhead when running individual files. This patch disables that process in case the number of files to run is less than one. Results running a sample file: Before: ``` actionpack $ bin/test test/controller/parameters/accessors_test.rb Run options: --seed 48261 ........................................................................ Finished in 0.211923s, 339.7460 runs/s, 552.0873 assertions/s. 72 runs, 117 assertions, 0 failures, 0 errors, 0 skips ``` After ``` actionpack $ bin/test test/controller/parameters/accessors_test.rb Run options: --seed 5461 ........................................................................ Finished in 0.008411s, 8560.2189 runs/s, 13910.3557 assertions/s. 72 runs, 117 assertions, 0 failures, 0 errors, 0 skips ```
2.3 KiB
-
Tests parallelization is now disabled when running individual files to prevent the setup overhead.
It can still be enforced if the environment variable
PARALLEL_WORKERS
is present and set to a value greater than 1.Ricardo Díaz
-
Fix proxying keyword arguments in
ActiveSupport::CurrentAttributes
.Marcin Kołodziej
-
Add
Enumerable#maximum
andEnumerable#minimum
to easily calculate the maximum or minimum from extracted elements of an enumerable.payments = [Payment.new(5), Payment.new(15), Payment.new(10)] payments.minimum(:price) # => 5 payments.maximum(:price) # => 15
This also allows passing enumerables to
fresh_when
andstale?
in Action Controller. See PR #41404 for an example.Ayrton De Craene
-
ActiveSupport::Cache::MemCacheStore
now accepts an explicitnil
for itsaddresses
argument.config.cache_store = :mem_cache_store, nil # is now equivalent to config.cache_store = :mem_cache_store # and is also equivalent to config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211" # which is the fallback behavior of Dalli
This helps those migrating from
:dalli_store
, where an explicitnil
was permitted.Michael Overmeyer
-
Add
Enumerable#in_order_of
to put an Enumerable in a certain order by a key.DHH
-
ActiveSupport::Inflector.camelize
behaves expected when provided a symbol:upper
or:lower
argument. MatchesString#camelize
behavior.Alex Ghiculescu
-
Raises an
ArgumentError
when the first argument ofActiveSupport::Notification.subscribe
is invalid.Vipul A M
-
HashWithIndifferentAccess#deep_transform_keys
now returns aHashWithIndifferentAccess
instead of aHash
.Nathaniel Woodthorpe
-
consume dalli’s
cache_nils
configuration asActiveSupport::Cache
'sskip_nil
when usingMemCacheStore
.Ritikesh G
-
add
RedisCacheStore#stats
method similar toMemCacheStore#stats
. Callsredis#info
internally.Ritikesh G
Please check 6-1-stable for previous changes.