- 22 4月, 2018 1 次提交
-
-
由 yuuji.yaginuma 提交于
-
- 19 4月, 2018 2 次提交
-
-
由 Gleb Mazovetskiy 提交于
Fixes #32610. Closes #32614. Lua scripts in redis are *blocking*, meaning that no other client can execute any commands while the script is running. See https://redis.io/commands/eval#atomicity-of-scripts. This results in the following exceptions once the number of keys is sufficiently large: BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE. This commit replaces the lua-based implementation with one that uses `SCAN` and `DEL` in batches. This doesn't block the server. The primary limitation of `SCAN`, i.e. potential duplicate keys, is of no consequence here, because `DEL` ignores keys that do not exist.
-
由 Dominik Sander 提交于
Before this change missing timezone data for any of the time zones defined in `ActiveSupport::Timezone::MAPPING` caused a `comparison of NilClass with ActiveSupport::TimeZone failed` exception. Attempting to get a timezone by passing a number/duration to `[]` or calling `all` directly will try to sort sort the values of `zones_map`. Those values are initialized by the return value of `create(zonename)` which returns `nil` if `TZInfo` is unable to find the timezone information. In our case the exception was triggered by an outdated tzdata package which did not include information for the "recently" added time zones. Before 078421ba `zones_map` only returned the information that have been loaded into `@lazy_zone_map` which ignored time zones for which the data could not be loaded, this change restores the previous behaviour.
-
- 12 4月, 2018 1 次提交
-
-
由 Godfrey Chan 提交于
(See previous commit for a description of the issue)
-
- 14 3月, 2018 1 次提交
-
-
由 Rafael Mendonça França 提交于
We only add the header when releasing to avoid some conflicts. [ci skip]
-
- 12 3月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
- Add missing dots. - Remove reference to itself on GitHub. Usually, we add references to fixed issues only in a changelog. Follow up #32223
-
- 07 3月, 2018 2 次提交
-
-
由 Nick Holden 提交于
Equality comparisons between dates and times can take some extra time to comprehend. I tend to think of a date or time as "before" or "after" another date or time, but I naturally read `<` and `>` as "less than" and "greater than." This change seeks to make date/time comparisons more human readable.
-
由 Ashe Connor 提交于
Previously, URI.enscape could handle Unicode input (without any actual escaped characters), or input with escaped characters (but no actual Unicode characters) - not both. URI.unescape("\xe3\x83\x90") # => "バ" URI.unescape("%E3%83%90") # => "バ" URI.unescape("\xe3\x83\x90%E3%83%90") # => # Encoding::CompatibilityError We need to let `gsub` handle this for us, and then force back to the original encoding of the input. The result String will be mangled if the percent-encoded characters don't conform to the encoding of the String itself, but that goes without saying. Signed-off-by: NAshe Connor <ashe@kivikakk.ee>
-
- 05 3月, 2018 1 次提交
-
-
由 Christian Blais 提交于
now support translations through I18n. { fr: { number: { nth: { ordinals: lambda do |_key, number:, **_options| if number.to_i.abs == 1 'er' else 'e' end end, ordinalized: lambda do |_key, number:, **_options| "#{number}#{ActiveSupport::Inflector.ordinal(number)}" end } } } }
-
- 28 2月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Remove extra comments `# Asking for private method` in activesupport/test/core_ext/module_test.rb Improve docs of using `delegate` with `:private` Update changelog of #31944
-
- 27 2月, 2018 2 次提交
-
-
由 bogdanvlviv 提交于
Previously it was removed by #32106 since it was backported to `5-2-stable`. [ci skip]
-
由 Tomas Valent 提交于
-
- 26 2月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Remove railties' changelog added by 7340596d since it was backported to `5-2-stable` via ac99916f Remove activesupport's changelog added by 1077ae96 since it was backported to `5-2-stable` via a2b97e4f Remove activesupport's changelog added by 0d41a76d since it was backported to `5-2-stable` via cdce6a70 Remove activestorage's changelog added by d57c52a3 since it was backported to `5-2-stable` via 5292cdf5 Follow up c113bdc9
-
- 24 2月, 2018 1 次提交
-
-
由 Gabriel Sobrinho 提交于
Fixes #31909. Closes #31911.
-
- 19 2月, 2018 1 次提交
-
-
由 Andrew White 提交于
Some timezones like `Europe/London` have multiple mappings in `ActiveSupport::TimeZone::MAPPING` so return all of them instead of the first one found by using `Hash#value`. e.g: # Before ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"] # After ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"] Fixes #31668.
-
- 18 2月, 2018 3 次提交
-
-
由 Jeremy Daer 提交于
This faithfully preserves grapheme clusters (characters composed of other characters and combining marks) and other multibyte characters.
-
由 Jeremy Daer 提交于
```ruby "foo".freeze.strip_heredoc.frozen? # => true ``` Fixes the case where frozen string literals would inadvertently become unfrozen: ```ruby foo = <<-MSG.strip_heredoc la la la MSG foo.frozen? # => false !?? ```
-
由 Jeremy Daer 提交于
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
-
- 16 2月, 2018 1 次提交
-
-
由 eileencodes 提交于
Provides both a forked process and threaded parallelization options. To use add `parallelize` to your test suite. Takes a `workers` argument that controls how many times the process is forked. For each process a new database will be created suffixed with the worker number; test-database-0 and test-database-1 respectively. If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored and the environment variable will be used instead. This is useful for CI environments, or other environments where you may need more workers than you do for local testing. If the number of workers is set to `1` or fewer, the tests will not be parallelized. The default parallelization method is to fork processes. If you'd like to use threads instead you can pass `with: :threads` to the `parallelize` method. Note the threaded parallelization does not create multiple database and will not work with system tests at this time. parallelize(workers: 2, with: :threads) The threaded parallelization uses Minitest's parallel exector directly. The processes paralleliztion uses a Ruby Drb server. For parallelization via threads a setup hook and cleanup hook are provided. ``` class ActiveSupport::TestCase parallelize_setup do |worker| # setup databases end parallelize_teardown do |worker| # cleanup database end parallelize(workers: 2) end ``` [Eileen M. Uchitelle, Aaron Patterson]
-
- 02 2月, 2018 1 次提交
-
-
由 fatkodima 提交于
-
- 31 1月, 2018 1 次提交
-
-
由 Rafael Mendonça França 提交于
:tada::tada::tada:
-
- 23 1月, 2018 1 次提交
-
-
由 fatkodima 提交于
-
- 19 1月, 2018 1 次提交
-
-
由 Julien Meichelbeck 提交于
* Support hash as first argument for `assert_difference`. This allows to specify multiple numeric differences in the same assertion. Example: assert_difference 'Article.count' => 1, 'Notification.count' => 2 do # post :create, params: { article: {...} } end * Support error message when passing a hash as a first parameter * Format CHANGELOG properly [Julien Meichelbeck + Rafael Mendonça França]
-
- 09 1月, 2018 1 次提交
-
-
由 Eugene Kenny 提交于
Instead of providing a configuration option to set the hash function, switch to SHA-1 for new apps and allow upgrading apps to opt in later via `new_framework_defaults_5_2.rb`.
-
- 29 12月, 2017 1 次提交
-
-
由 Ignatius Reza 提交于
currently it's not possible to know what the hit rates are from read_multi
-
- 17 12月, 2017 1 次提交
-
-
由 Eugene Kenny 提交于
Using `truncate` to limit the length of the digest has the unwanted side effect of adding an ellipsis when the input is longer than the limit. Also: - Don't instantiate a new object for every digest - Rename the configuration option to `hash_digest_class` - Update the CHANGELOG entry to describe how to use the feature
-
- 13 12月, 2017 1 次提交
-
-
由 Dmitri Dolguikh 提交于
and defaults to `Digest::MD5`. Replaced calls to `::Digest::MD5.hexdigest` with calls to `ActiveSupport::Digest.hexdigest`.
-
- 12 12月, 2017 1 次提交
-
-
由 Mehmet Emin INAC 提交于
-
- 29 11月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 28 11月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 23 11月, 2017 1 次提交
-
-
由 Chris LaRose 提交于
-
- 21 11月, 2017 1 次提交
-
-
由 Takumasa Ochi 提交于
Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment` and `#decrement`. Closes #30716.
-
- 15 11月, 2017 2 次提交
-
-
由 Andrew White 提交于
Make `ActiveSupport::TimeWithZone` match Ruby's handling of ambiguous times by choosing the later period, e.g. Ruby: ``` ENV["TZ"] = "Europe/Moscow" Time.local(2014, 10, 26, 1, 0, 0) # => 2014-10-26 01:00:00 +0300 ``` Before: ``` >> "2014-10-26 01:00:00".in_time_zone("Moscow") TZInfo::AmbiguousTime: 26/10/2014 01:00 is an ambiguous local time. ``` After: ``` >> "2014-10-26 01:00:00".in_time_zone("Moscow") => Sun, 26 Oct 2014 01:00:00 MSK +03:00 ``` Fixes #17395.
-
由 bogdanvlviv 提交于
-
- 14 11月, 2017 3 次提交
-
-
由 Jeremy Daer 提交于
Compression has long been available, but opt-in and at a 16kB threshold. It wasn't enabled by default due to CPU cost. Today it's cheap and typical cache data is eminently compressible, such as HTML or JSON fragments. Compression dramatically reduces Memcached/Redis mem usage, which means the same cache servers can store more data, which means higher hit rates. To disable compression, pass `compress: false` to the initializer.
-
由 Jeremy Daer 提交于
* Supports vanilla Redis, hiredis, and Redis::Distributed. * Supports Memcached-like sharding across Redises with Redis::Distributed. * Fault tolerant. If the Redis server is unavailable, no exceptions are raised. Cache fetches are treated as misses and writes are dropped. * Local cache. Hot in-memory primary cache within block/middleware scope. * `read_/write_multi` support for Redis mget/mset. Use Redis::Distributed 4.0.1+ for distributed mget support. * `delete_matched` support for Redis KEYS globs.
-
由 Daniel Ma 提交于
While using `assert_changes`, I came across some unexpected behavior: if you provide a `to:` argument, and the expression matches but didn't actually change, the assertion will pass. The way `assert_changes` reads, I assumed that it would both assert that there was any change at all, _and_ that the expression changed to match my `to:` argument. In the case of just a `from:` argument, `assert_changes` does what I expect as well. It asserts that the before value `=== from` and that the after value changed. My key change is that `assert_changes` will now _always_ assert that expression changes, no matter what combination of `from:` and `to:` arguments
-
- 10 11月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
[ci skip]
-
- 08 11月, 2017 1 次提交
-
-
由 Andrew White 提交于
In #11474 we prevented TWZ ranges being iterated over which matched Ruby's handling of Time ranges and as a consequence `include?` stopped working with both Time ranges and TWZ ranges. However in ruby/ruby@b061634 support was added for `include?` to use `cover?` for 'linear' objects. Since we have no way of making Ruby consider TWZ instances as 'linear' we have to override `Range#include?`. Fixes #30799.
-
- 06 11月, 2017 1 次提交
-
-
由 Andrew White 提交于
Acronym inflections are stored with lowercase keys in the hash but the match wasn't being lowercased before being looked up in the hash. This shouldn't have any performance impact because before it would fail to find the acronym and perform the `downcase` operation anyway. Fixes #31052.
-