- 15 2月, 2019 8 次提交
-
-
由 Ryuta Kamizono 提交于
This reverts commit b67d5c6d, reversing changes made to 2e018361. Reason: #35186 may cause that silently leaking information when people upgrade the app. We need deprecation first before making this.
-
由 Rafael Mendonça França 提交于
Fix the `config_for` to always return a NonSymbolAccessDeprecatedHash:
-
由 Vladimir Dementyev 提交于
-
由 Eileen M. Uchitelle 提交于
Minor changes to deprecation warning message after #35242
-
由 Abhay Nikam 提交于
-
由 George Claghorn 提交于
Fixes missing method `path_for` when using MirrorService with DiskService as the primary service
-
由 Eileen M. Uchitelle 提交于
Add setter and deprecation for configurations hashes
-
由 Abhay Nikam 提交于
-
- 14 2月, 2019 20 次提交
-
-
由 eileencodes 提交于
In chat Sam Saffron asked how to use the setter now that configurations is no longer a hash and you need to do AR::Base.configurations["test"]=. Technically you can do `ActiveRecord::Base.configurations = { the hash }` but I realized the old way throws an error and is unintuitive. To aid in the transition from hashes to objects this PR makes a few changes: 1) Re-adds a deprecated hash setter `[]=` that will add a new hash to the configurations list OR replace an existing hash if that environment is already present. This won't be supported in future Rails versions but a good error is important. 2) Changed to throw deprecation warnings on the methods we decided to support for hash conversion and raise on the methods we don't support. 3) Refactored the setter/getter hash deprecation warnings messages and rewrote them. Getters message: ``` DEPRECATION WARNING: `ActiveRecord::Base.configurations` no longer returns a hash. Methods that act on the hash like `values` are deprecated and will be removed in Rails 6.1. Use the `configs_for` method to collect and iterate over the database configurations. ``` Setter message: ``` DEPRECATION WARNING: Setting `ActiveRecord::Base.configurations` with `[]=` is deprecated. Use `ActiveRecord::Base.configurations=` directly to set the configurations instead. ``` 4) Rewrote the legacy configurations test file to test all the public methods in the DatabaseConfigurations class.
-
由 Edouard CHIN 提交于
- If you have hashes inside array, the hashes were getting initialized as regular HWIA wereas we want them to be NonSymbolAccessDeprecatedHash in order to trigger a deprecation warning when keys are accessed with string. This patch fixes that by overwriting the `[]=` to to the same as what HWIA does (with the difference that we don't call `convert_key` to not trigger a deprecation when setting value). I also took the liberty to extract `hash.nested_under_indifferent_access`, into a separate method to allow subclasses to return whatever they want. Inheriting HWIA is not common, but I think it's useful for cases like this one where we want to preprocess reading and writing values in the hash (for deprecation purposes or other reasons).
-
由 Xavier Noria 提交于
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.
-
由 Xavier Noria 提交于
Let Zeitwerk be a dependency of Active Support
-
由 Ryuta Kamizono 提交于
Use Dir#children and Dir#each_child in ActiveSupport::Cache::FileStore
-
由 yuuji.yaginuma 提交于
-
由 Ricardo Díaz 提交于
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.
-
由 Rafael Mendonça França 提交于
Adding enque time tracking and logging
-
由 Cory Gwin @gwincr11 提交于
Motivation: - Currently we have 2 seperate monkey patches in place for tracking enqueded time for 2 seperate workers. It seems that activejob could be a source of truth for how long an item has been enqued so that we can easily use it for consistent monitoring across workers/apps to ensure that jobs are running at an acceptable speed. Changes: - Add an enqueded at attribute and serilization tooling. - Add a method to get how long a job has been enqueded for. - Add a logging item to show how long a job was enqued prior to the perform method firing.
-
由 Ryuta Kamizono 提交于
Revert "Chaining named scope is no longer leaking to class level querying methods"
-
由 Xavier Noria 提交于
Zeitwerk is a strong dependency, planned to replace AS::Dependencies. A line in the generated Gemfile does not convey this as much.
-
由 Ryuta Kamizono 提交于
This reverts #32380, since this may cause that silently leaking information when people upgrade the app. We need deprecation first before making this.
-
由 Aaron Patterson 提交于
Cached collections only work if there is one template
-
由 Aaron Patterson 提交于
Cached collections only work if there is one template. If there are more than one templates, the caching mechanism doesn't have a key.
-
由 Xavier Noria 提交于
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.
-
由 Rafael França 提交于
Address to useless assignment `formats = nil` after #35254
-
由 Aaron Patterson 提交于
Clean for fix done in #35229. Removed unused arguments for `build_lookup_context `
-
由 Abhay Nikam 提交于
-
由 Aaron Patterson 提交于
Convert lookup context's to a stack for fixing #35222 and #34138
-
- 13 2月, 2019 12 次提交
-
-
由 Eileen M. Uchitelle 提交于
Fix database configurations building when DATABASE_URL present
-
由 Jaap van der Plas 提交于
Since production applications typically run with log level info and email adresses should be considered as sensitive data we want to prevent them from ending up in the logs. In development mode (with log level debug) they are still logged as part of the Mail::Message object.
-
由 Ryuta Kamizono 提交于
This reverts commit eec3e28a, reversing changes made to 5588fb48. Reason: Marking as loaded without actual loading is too greedy optimization. See more context #35239. Closes #35239. [Edouard CHIN & Ryuta Kamizono]
-
由 Matthew Draper 提交于
-
由 Eileen M. Uchitelle 提交于
Add Worker Pool section to Action Cable configuration docs
-
由 Kasper Timm Hansen 提交于
Action Cable: allow multiple instances of Server::Base with different configs
-
由 Vladimir Dementyev 提交于
That allows us to create a separate, isolated Action Cable server instance within the same app.
-
由 Vladimir Dementyev 提交于
-
由 Ryuta Kamizono 提交于
Fixed the CI failure https://travis-ci.org/rails/rails/jobs/492291248#L1185-L1191.
-
由 Eileen M. Uchitelle 提交于
Fix DatabaseSelector test that fails sometimes
-
由 Ryuta Kamizono 提交于
Currently custom attributes are always qualified by the table name in the generated SQL wrongly even if the table doesn't have the named column, it would cause an invalid SQL error. Custom attributes should only be qualified if the table has the same named column.
-
由 Xavier Noria 提交于
Zeitwerk integration
-