- 20 3月, 2020 1 次提交
-
-
由 Aaron Patterson 提交于
This commit escapes dollar signs and backticks to prevent JS XSS issues when using the `j` or `javascript_escape` helper CVE-2020-5267
-
- 19 3月, 2020 6 次提交
-
-
由 Kasper Timm Hansen 提交于
Add Enumerable#pick
-
由 Eugene Kenny 提交于
When called on a loaded relation, `pick` will now use the existing results instead of making another query, just like `pluck` does.
-
由 Eugene Kenny 提交于
This allows `pick` to be called on an object that could either be an enumerable or a relation. Also clarify the documentation for `Enumerable#pluck`, and add an example of plucking multiple keys to the core extensions guide.
-
由 Dylan Thacker-Smith 提交于
If a transaction is wrapped in a Timeout.timeout(duration) block, then the transaction will be committed when the transaction block is exited from the timeout, since it uses `throw`. Ruby code doesn't have a way to distinguish between a block being exited from a `return`, `break` or `throw`, so fixing this problem for the case of `throw` would require a backwards incompatible change for block exited with `return` or `break`. As such, the current behaviour so it can be changed in the future.
-
由 Masaki Hara 提交于
In a distributed configuration like rolling update, users may observe both old and new instances during deployment. Users may be served by a new instance and then by an old instance. That means when the server changes `cookies_serializer` from `:marshal` to `:hybrid` or the server changes `use_authenticated_cookie_encryption` from `false` to `true`, users may lose their sessions if they access the server during deployment. We added fallbacks to downgrade the cookie format when necessary during deployment, ensuring compatibility on both old and new instances.
-
由 Carlos Antonio da Silva 提交于
-
- 18 3月, 2020 2 次提交
-
-
由 Eileen M. Uchitelle 提交于
Raise error when non-existent enum used in query
-
由 ak 提交于
This behaviour is in rails/activerecord/lib/active_record/enum.rb #serialize(value) line no 143 if value is not present in mapping we are sending the value back , which in mysql returns unrelated record. I have changed to return nil is value is not present in mapping Implemented code review changes Improved test case coverage [ci skip] - cosmetic changes for better readibility of change log Signed-off-by: Nak <atulkanswal@gmail.com>
-
- 17 3月, 2020 12 次提交
-
-
由 Xavier Noria 提交于
Tiny doc fix in .validates
-
由 Tim Dorr 提交于
This should be a string array literal. Simple as that :)
-
由 Eileen M. Uchitelle 提交于
Update autosave_association.rb
-
由 Jarek Radosz 提交于
When using ActionController::Live setting content type header after response body resulted in a race condition, throwing either “ActionDispatch::IllegalStateError: header already sent” or “RuntimeError: can't modify frozen Hash”. This commit restores original order (i.e. from before 75757c5c).
-
由 d-m-u 提交于
Fix typo
-
由 Rafael França 提交于
Unlock `azure-storage-blob` version to use version 2.0
-
由 Yasuo Honda 提交于
`azure-storage-blob` 2.0.0 has been released. https://rubygems.org/gems/azure-storage-blob/versions/2.0.0 According to this commit and changelog, `azure-storage-blob` 1.1.0 did not support Ruby 2.6 and higher. As of right now, Rails master branch should support Ruby 2.5.0, 2.6.0 and 2.7.0 then it should be appropriate to unlock `azure-storage-blob` version. https://github.com/Azure/azure-storage-ruby/commit/252e3f06a5cf2e2583302bfefa95d8b25818a44f This commit addresses this following error: ```ruby % cd activestorage % bundle exec rake test Traceback (most recent call last): 14: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>' 13: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select' 12: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>' 11: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 10: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 9: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:7:in `<top (required)>' 8: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:8:in `<class:AzureStorageServiceTest>' 7: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service.rb:51:in `configure' 6: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:8:in `build' 5: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:17:in `build' 4: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:30:in `resolve' 3: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 2: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 1: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/azure_storage_service.rb:3:in `<top (required)>' /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:346:in `block (2 levels) in replace_gem': can't activate azure-storage-blob (~> 1.1), already activated azure-storage-blob-2.0.0. Make sure all dependencies are added to Gemfile. (Gem::LoadError) 11: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>' 10: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select' 9: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>' 8: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 7: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 6: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:7:in `<top (required)>' 5: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:8:in `<class:AzureStorageServiceTest>' 4: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service.rb:51:in `configure' 3: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:8:in `build' 2: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:17:in `build' 1: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:29:in `resolve' /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:33:in `rescue in resolve': Missing service adapter for "AzureStorage" (RuntimeError) rake aborted! ``` * Update Gemfile.lock to bump azure-storage-blob version ``` % bundle update --conservative faraday azure-storage-blob google-cloud-storage` ``` - How to find gem name to update by setting `gem "azure-storage-blob", "= 2.0.0"` temporarily ```ruby % git diff diff --git a/Gemfile b/Gemfile index 5fdaceab2f..6be7dccf4b 100644 --- a/Gemfile +++ b/Gemfile @@ -84,7 +84,7 @@ end group :storage do gem "aws-sdk-s3", require: false gem "google-cloud-storage", "~> 1.11", require: false - gem "azure-storage-blob", require: false + gem "azure-storage-blob", "= 2.0.0", require: false # Use 2.0.0 temporarily to find which gems need bump gem "image_processing", "~> 1.2" end % bundle install Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies..... Bundler could not find compatible versions for gem "faraday": In snapshot (Gemfile.lock): faraday (= 0.17.1) In Gemfile: azure-storage-blob (= 2.0.0) was resolved to 2.0.0, which depends on azure-storage-common (~> 2.0) was resolved to 2.0.1, which depends on faraday (~> 1.0) google-cloud-storage (~> 1.11) was resolved to 1.25.0, which depends on googleauth (~> 0.9) was resolved to 0.10.0, which depends on faraday (~> 0.12) Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict. % git checkout -f Gemfile % bundle update --conservative faraday azure-storage-blob google-cloud-storage ```
-
由 Rafael Mendonça França 提交于
Also change the arguments to be keyword arguments to make easier to evolve this method if we need to.
-
由 Eileen M. Uchitelle 提交于
Add options examples to find_in_batches method
-
由 David Auza 提交于
Update guides/source/active_record_querying.md Co-Authored-By: NEileen M. Uchitelle <eileencodes@users.noreply.github.com> Update guides/source/active_record_querying.md Co-Authored-By: NEileen M. Uchitelle <eileencodes@users.noreply.github.com> Update guides/source/active_record_querying.md Co-Authored-By: NEileen M. Uchitelle <eileencodes@users.noreply.github.com> Update guides/source/active_record_querying.md Co-Authored-By: NEileen M. Uchitelle <eileencodes@users.noreply.github.com>
-
由 Rafael França 提交于
Quotation mark for gems with options in Gemfile template:
-
由 Rafael França 提交于
[ImgBot] Optimize images
-
- 16 3月, 2020 1 次提交
-
-
由 ImgBotApp 提交于
/guides/assets/images/rails_guides_logo.gif -- 3.68kb -> 2.65kb (28.06%) /guides/assets/images/association_basics/belongs_to.png -- 34.22kb -> 26.71kb (21.96%) /guides/assets/images/getting_started/template_is_missing_articles_new.png -- 26.17kb -> 20.72kb (20.81%) /guides/assets/images/association_basics/has_many.png -- 35.38kb -> 29.84kb (15.66%) /guides/assets/images/association_basics/has_one.png -- 37.33kb -> 32.27kb (13.54%) /guides/assets/images/association_basics/polymorphic.png -- 82.75kb -> 72.70kb (12.15%) /guides/assets/images/association_basics/has_one_through.png -- 90.37kb -> 79.83kb (11.66%) /guides/assets/images/association_basics/habtm.png -- 60.00kb -> 53.02kb (11.63%) /guides/assets/images/getting_started/unknown_action_create_for_articles.png -- 15.36kb -> 13.82kb (10.04%) /guides/assets/images/association_basics/has_many_through.png -- 96.52kb -> 88.06kb (8.76%) Signed-off-by: NImgBotApp <ImgBotHelp@gmail.com>
-
- 15 3月, 2020 2 次提交
-
-
由 Kasper Timm Hansen 提交于
Use latest version of SDoc
-
由 Robin Dupret 提交于
Cross-refs zzak/sdoc#138. [John Hawthorn]
-
- 14 3月, 2020 9 次提交
-
-
由 Quinn Chaffee 提交于
* `expires_in` `extras` documentation Wanted to find how to add `s-maxage` and stumbled across this feature. Wanted to document it for others, but many proxies like Akamai are very insistent on using `s-maxage` rather than `max-age`. * Altered verbiage and fixed spelling
-
由 Kasper Timm Hansen 提交于
Isolate ARGV in Rails::Command.invoke
-
由 Joel Hawksley 提交于
-
由 Eileen M. Uchitelle 提交于
Refactor fetch_attribute
-
由 Eileen M. Uchitelle 提交于
Remove convenience class alias
-
由 Kasper Timm Hansen 提交于
Fix warning: method redefined
-
由 eileencodes 提交于
This convenience class is only used twice in Arel. We can easily write it out instead.
-
由 eileencodes 提交于
Similar to the work done in #38636, instead of using case statements we can make these classes respond to `fetch_attribute`. New classes can implement `fetch_attribute` instead of adding to the case statement, it's more object oriented, and nicer looking. Co-authored-by: NAaron Patterson <aaron.patterson@gmail.com>
-
由 utilum 提交于
-
- 13 3月, 2020 7 次提交
-
-
Use the same quote (') for gems with extra options used by AppGenerator in the Gemfile template.
-
由 Kasper Timm Hansen 提交于
Fix variable not initialized warnings
-
由 utilum 提交于
``` activesupport/test/concern_test.rb:20: warning: instance variable @included_ran not initialized activesupport/test/concern_test.rb:28: warning: instance variable @prepended_ran not initialized ```
-
由 Rafael França 提交于
Extract building ActiveRecord::Result into a method
-
由 Kir Shatrov 提交于
-
由 Rafael França 提交于
Update code snippets to suggest the use of strong parameters
-
由 Rafael França 提交于
refactor: arel fetch_attribute to get the atrribute node from binary module.
-