aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Added missing guide links in README documentation and minor wording fix [ci ↵ashishprajapati2019-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | skip]
* | | | | Fix links in gemspec and docs from http to https.Abhay Nikam2019-03-092-2/+2
|/ / / /
* | | | Merge pull request #35536 from alexander-lazarov/improve-cache-docsXavier Noria2019-03-081-5/+5
|\ \ \ \ | | | | | | | | | | Improve wording in cache documentation
| * | | | Improve wording in cache documentation [ci skip]Alexander Lazarov2019-03-081-5/+5
| | | | |
* | | | | Allow autoloader inflectors to be swaped outJean Boussier2019-03-081-4/+0
|/ / / /
* | | | Merge pull request #35498 from sobrinho/fix-including-excluding-flattenRyuta Kamizono2019-03-074-7/+10
|\ \ \ \ | | | | | | | | | | Fix including/excluding flattening
| * | | | Fix including/excluding flatteningGabriel Sobrinho2019-03-064-7/+10
| | | | |
* | | | | Bump ZeitwerkXavier Noria2019-03-061-1/+1
|/ / / /
* | | | Added Array#including, Array#excluding, Enumerable#including, ↵David Heinemeier Hansson2019-03-055-11/+77
| | | | | | | | | | | | | | | | Enumerable#excluding
* | | | activesupport: Simplify class_attribute implementation (#35454)Dylan Thacker-Smith2019-03-031-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * activesupport(class_attribute): Use redefine_singleton_method * activesupport(class_attribute): Use keyword arguments * activesupport(class_attribute): Avoid unnecessary redefinition for default
* | | | Run activesupport's memcache store tests on Buildkitebogdanvlviv2019-02-263-14/+15
| |/ / |/| | | | | | | | Related to 287920ca7d06c8f51198ec750d65ba703835b257
* | | Preparing for 6.0.0.beta2 releaseRafael Mendonça França2019-02-252-1/+3
| | |
* | | Let Zeitwerk autoloaders inflect with Active SupportXavier Noria2019-02-231-2/+14
| | | | | | | | | | | | [Harry Brundage & Xavier Noria]
* | | Upgrade Zeitwerk to 1.3.1Xavier Noria2019-02-231-1/+1
| | |
* | | simplify AS::Dependencies.verbose=Xavier Noria2019-02-211-1/+1
| | | | | | | | | | | | Possible thanks to Zeitwerk 1.3.0.
* | | bump ZeitwerkXavier Noria2019-02-211-1/+1
| | |
* | | let Zeitwerk integration unhook AS::DependenciesXavier Noria2019-02-191-0/+5
| | |
* | | upgrades Zeitwerk to 1.2.0Xavier Noria2019-02-171-1/+1
| | |
* | | Implement AS::Dependencies.verbose= compatibility for :zeitwerk modeXavier Noria2019-02-151-0/+5
| | |
* | | Fix small typo in docs Conrad Beach2019-02-152-2/+2
| | | | | | | | | | | | | | | [ci skip]
* | | Replace autoloader accessors with Rails.autoloaders.{main,once}Xavier Noria2019-02-142-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails.autoloader and Rails.once_autoloader was just tentative API good enough for a first patch. Rails.autoloader is singular and does not convey in its name that there is another autoloader. That might be confusing, for example if you set a logger and miss traces. On the other hand, the name `once_autoloader` is very close to being horrible. Rails.autoloaders.main and Rails.autoloaders.once read better for my taste, and have a nice symmetry. Also, both "main" and "once" are four letters long, short and same length. They are tagged as "rails.main" and "rails.once", respectively. References #35235.
* | | Register new autoloading in AS CHANGELOG [ci skip]Xavier Noria2019-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | There is too much to say about it for a CHANGELOG entry, and linking to the original PR could mislead if there are later changes as already happened with the gem dependency, so just a one-liner. For final we'll up to date documentation.
* | | Merge pull request #35261 from rails/zeitwerk-as-dependencyXavier Noria2019-02-131-3/+4
|\ \ \ | | | | | | | | Let Zeitwerk be a dependency of Active Support
| * | | Let Zeitwerk be a dependency of Active SupportXavier Noria2019-02-131-3/+4
| | | | | | | | | | | | | | | | | | | | Zeitwerk is a strong dependency, planned to replace AS::Dependencies. A line in the generated Gemfile does not convey this as much.
* | | | Use Dir#children and Dir#each_child instead of excluding "." and ".."Ricardo Díaz2019-02-132-11/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | Both methods were introduced in Ruby 2.5 and fit this use case very nicely: listing a directory's entries excluding the "." and ".." nodes. The private method #exclude_from was removed as it no longer serves its original purpose.
* / / Refactors a loopXavier Noria2019-02-131-6/+8
|/ / | | | | | | | | | | | | | | | | I believe the current style does not clearly communicate that we are ignoring non-existing autoload paths altogether. Your eyes may even be looking for an else clause that is easy to miss but that does not exist. With the early `next` and code comment the loop reads better for my taste.
* | styleXavier Noria2019-02-121-0/+2
| |
* | Zeitwerk integrationXavier Noria2019-02-121-0/+71
| |
* | Merge pull request #32861 from zvkemp/asn-unsubscribe-proxyAaron Patterson2019-02-115-3/+100
|\ \ | | | | | | use ProxyPattern to match for ActiveSupport::Notifications fanout/unsubscribe
| * | use a proxy matcher for AS::N fanoutzvkemp2019-02-115-3/+100
| | |
* | | Fix rubocop violationsyuuji.yaginuma2019-02-091-2/+2
| | |
* | | Remove redundant returning `object`Ryuta Kamizono2019-02-091-1/+0
| | | | | | | | | | | | `object.transform_values!` returns `object` itself.
* | | Use Ruby 2.4+ native transform_values(!)Kasper Timm Hansen2019-02-081-7/+2
| | |
* | | Delete uneeded blank fileGuillermo Iguaran2019-02-081-0/+0
| | |
* | | Add 'Hash#deep_transform_values', and 'Hash#deep_transform_values!'Guillermo Iguaran2019-02-085-0/+84
| | |
* | | Fix elapsed time calculationsbogdanvlviv2019-02-082-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've found a few places in Rails code base where I think it makes sense to calculate elapsed time more precisely by using `Concurrent.monotonic_time`: - Fix calculation of elapsed time in `ActiveSupport::Cache::MemoryStore#prune` - Fix calculation of elapsed time in `ActiveRecord::ConnectionAdapters::ConnectionPool::Queue#wait_poll` - Fix calculation of elapsed time in `ActiveRecord::ConnectionAdapters::ConnectionPool#attempt_to_checkout_all_existing_connections` - Fix calculation of elapsed time in `ActiveRecord::ConnectionAdapters::Mysql2Adapter#explain` See https://docs.ruby-lang.org/en/2.5.0/Process.html#method-c-clock_gettime https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way Related to 7c4542146f0dde962205e5a90839349631ae60fb
* | Merge pull request #35170 from palkan/fix/encrypted-fileRafael França2019-02-051-1/+2
|\ \ | | | | | | Add missing `require "tmpdir"` in ActiveSupport::EncryptedFile
| * | Add missing `require "tmpdir"` in ActiveSupport::EncryptedFileVladimir Dementyev2019-02-051-1/+2
| | |
* | | Respect ENV variables when finding DBs etc for the test suiteMatthew Draper2019-02-061-1/+1
| | | | | | | | | | | | | | | If they're not set we'll still fall back to localhost, but this makes it possible to run the tests against a remote Postgres / Redis / whatever.
* | | Merge pull request #35063 from rosa/current-before-reset-callbackRafael Mendonça França2019-02-043-9/+41
|\ \ \ | |/ / |/| | | | | Support before_reset callback in CurrentAttributes
| * | Support before_reset callback in CurrentAttributesRosa Gutierrez2019-01-303-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when we need to do some work associated to `Current.reset` but that work depends on the values of the current attributes themselves. This cannot be done in the supported `resets` callback because when the block is executed, CurrentAttributes's instance has already been reset. For symmetry, `after_reset` is defined as alias of `resets`.
* | | Keep cache for strings in notifications/fanoutJohn Hawthorn2019-02-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | When adding/removing a subscription with a string pattern, it isn't necessary to clear the entire cache, only the cache for the key being added. When adding/removing subscriptions for a regex or to match all events, the full cache is still cleared.
* | | Make Notifications::Fanout#listeners_for fasterJohn Hawthorn2019-02-011-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we stored all subscribers in an array, and every time a new message name came in asked each subscriber if they responded to the message. This commit changes Fanout to hash subscribers with a String pattern by their pattern. This way we can look them up directly and only do the O(N) scan over the non-string (Regex or any) patterns.
* | | ActiveSupport typo fixes.alkesh262019-02-017-7/+7
| | |
* | | Remove the Kernel#` override that turns ENOENT into nilAkinori MUSHA2019-01-313-14/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | ActiveSupport overrides `` Kernel#` `` so that it would not raise `Errno::ENOENT` but return `nil` instead (due to the last statement `STDERR.puts` returning nil) if a given command were not found. Because of this, you cannot safely say somthing like `` `command`.chomp `` when ActiveSupport is loaded. It turns out that this is an outdated monkey patch for Windows platforms to emulate Unix behavior on an ancient version of Ruby, and it should be removed by now.
* | Merge pull request #35080 from sos4nt/add_hash_assocRyuta Kamizono2019-01-303-0/+28
|\ \ | | | | | | | | | Add HashWithIndifferentAccess#assoc
| * | Add HashWithIndifferentAccess#assocStefan Schüßler2019-01-303-0/+27
|/ /
* | Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-182-1/+3
| |
* | No dup nor delete from optionsKrzysztof Rybka2019-01-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory comparison: Options: {:years=>1, :months=>1, :weeks=>1, :days=>1} Calculating ------------------------------------- master 576.000 memsize ( 0.000 retained) 5.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) advance_no_dup 288.000 memsize ( 0.000 retained) 4.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) Comparison: advance_no_dup: 288 allocated master: 576 allocated - 2.00x more Options: {:years=>1} Calculating ------------------------------------- master 264.000 memsize ( 0.000 retained) 2.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) advance_no_dup 72.000 memsize ( 0.000 retained) 1.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) Comparison: advance_no_dup: 72 allocated master: 264 allocated - 3.67x more Options: {:weeks=>1} Calculating ------------------------------------- master 264.000 memsize ( 0.000 retained) 2.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) advance_no_dup 72.000 memsize ( 0.000 retained) 1.000 objects ( 0.000 retained) 0.000 strings ( 0.000 retained) Comparison: advance_no_dup: 72 allocated master: 264 allocated - 3.67x more Peformance comparison: Options: {:years=>1, :months=>1, :weeks=>1, :days=>1} Warming up -------------------------------------- master 27.740k i/100ms advance_no_dup 37.705k i/100ms Calculating ------------------------------------- master 338.511k (± 5.9%) i/s - 1.692M in 5.020333s advance_no_dup 572.980k (± 3.7%) i/s - 2.866M in 5.008680s Comparison: advance_no_dup: 572979.7 i/s master: 338510.9 i/s - 1.69x slower Options: {:years=>1} Warming up -------------------------------------- master 53.313k i/100ms advance_no_dup 115.016k i/100ms Calculating ------------------------------------- master 639.715k (± 1.7%) i/s - 3.199M in 5.001851s advance_no_dup 1.579M (± 6.4%) i/s - 7.936M in 5.053876s Comparison: advance_no_dup: 1579251.7 i/s master: 639714.8 i/s - 2.47x slower Options: {:weeks=>1} Warming up -------------------------------------- master 57.353k i/100ms advance_no_dup 129.141k i/100ms Calculating ------------------------------------- master 674.113k (± 3.4%) i/s - 3.384M in 5.025973s advance_no_dup 1.911M (± 2.5%) i/s - 9.556M in 5.004496s Comparison: advance_no_dup: 1910739.3 i/s master: 674112.6 i/s - 2.83x slower
* | Remove secret_token rack env and cookie upgrade codeRafael Mendonça França2019-01-171-32/+0
| | | | | | | | Now that secret_token was removed all this code is now dead.