1. 17 3月, 2020 8 次提交
    • D
      Update autosave_association.rb · bdfd6f11
      d-m-u 提交于
      Fix typo
      bdfd6f11
    • R
      Merge pull request #38747 from yahonda/azure_storage_blob_2 · 8520cc77
      Rafael França 提交于
      Unlock `azure-storage-blob` version to use version 2.0
      8520cc77
    • Y
      Unlock `azure-storage-blob` version to use version 2.0 · dad4026f
      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
      ```
      dad4026f
    • R
      Document the internal hook to build a result · f735a216
      Rafael Mendonça França 提交于
      Also change the arguments to be keyword arguments to make easier to
      evolve this method if we need to.
      f735a216
    • E
      Merge pull request #38728 from davidauza-engineer/patch-5 · 2562d133
      Eileen M. Uchitelle 提交于
      Add options examples to find_in_batches method
      2562d133
    • D
      Add options examples to find_in_batches method [ci skip] · 51954c89
      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>
      51954c89
    • R
      Merge pull request #38735 from roramirez/quoting-gemfile-app-generator · 7f39b313
      Rafael França 提交于
      Quotation mark for gems with options in Gemfile template:
      7f39b313
    • R
      Merge pull request #38743 from jbampton/imgbot · 3ee934ca
      Rafael França 提交于
      [ImgBot] Optimize images
      3ee934ca
  2. 16 3月, 2020 1 次提交
    • I
      [ImgBot] Optimize images · 4f1472d4
      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>
      4f1472d4
  3. 15 3月, 2020 2 次提交
  4. 14 3月, 2020 9 次提交
  5. 13 3月, 2020 11 次提交
    • R
      Quotation mark for gems with options in Gemfile template: · 695dc5f9
      Rodrigo Ramírez Norambuena 提交于
      Use the same quote (') for gems with extra options used by  AppGenerator
      in the Gemfile template.
      695dc5f9
    • K
      Merge pull request #38708 from utilum/AS_concern_test_vars_not_initialized_warning · 0c715e59
      Kasper Timm Hansen 提交于
      Fix variable not initialized warnings
      0c715e59
    • U
      Fix variable not initialized warnings · 879918b5
      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
      ```
      879918b5
    • R
      Merge pull request #38713 from kirs/activerecord-build_result · 20f4a2fc
      Rafael França 提交于
      Extract building ActiveRecord::Result into a method
      20f4a2fc
    • K
      Extract building ActiveRecord::Result into a method · fd0a76b5
      Kir Shatrov 提交于
      fd0a76b5
    • R
      Merge pull request #38595 from dylnclrk/update-params-in-docs · 6020bf32
      Rafael França 提交于
      Update code snippets to suggest the use of strong parameters
      6020bf32
    • R
      Merge pull request #38689 from yashLadha/refactor/arel_fetch_attribute · 328ed171
      Rafael França 提交于
      refactor: arel fetch_attribute to get the atrribute node from binary module.
      328ed171
    • R
      Merge pull request #38676 from kwerle/correct_object_serializer_doc · f0048109
      Rafael França 提交于
      Correct the parameter name for deserialize
      f0048109
    • A
      Merge pull request #38712 from rails/fix-invoke-on-2-8 · 1eba54f5
      Aaron Patterson 提交于
      Rails::Command.invoke wants kwargs, so give it kwargs
      1eba54f5
    • A
      Rails::Command.invoke wants kwargs, so give it kwargs · 690d946d
      Aaron Patterson 提交于
      This fixes an exception when generating a new app on Ruby 2.8.  Before
      this commit, I get this exception:
      
      ```
      $ be ruby railties/exe/rails new ~/git/fix-bug --dev
      ...
      ...
      Traceback (most recent call last):
      	31: from railties/exe/rails:10:in `<main>'
      	30: from railties/exe/rails:10:in `require'
      	29: from /Users/aaron/git/rails/railties/lib/rails/cli.rb:18:in `<top (required)>'
      	28: from /Users/aaron/git/rails/railties/lib/rails/command.rb:45:in `invoke'
      	27: from /Users/aaron/git/rails/railties/lib/rails/command/base.rb:69:in `perform'
      	26: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
      	25: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
      	24: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
      	23: from /Users/aaron/git/rails/railties/lib/rails/commands/application/application_command.rb:26:in `perform'
      	22: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
      	21: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/group.rb:232:in `dispatch'
      	20: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `invoke_all'
      	19: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `map'
      	18: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `each'
      	17: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `block in invoke_all'
      	16: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
      	15: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
      	14: from (eval):1:in `run_webpack'
      	13: from /Users/aaron/git/rails/railties/lib/rails/generators/app_base.rb:419:in `run_webpack'
      	12: from /Users/aaron/git/rails/railties/lib/rails/generators/actions.rb:255:in `rails_command'
      	11: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/actions.rb:197:in `in_root'
      	10: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/actions.rb:187:in `inside'
      	 9: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/2.8.0/fileutils.rb:139:in `cd'
      	 8: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/2.8.0/fileutils.rb:139:in `chdir'
      	 7: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/actions.rb:187:in `block in inside'
      	 6: from /Users/aaron/.rbenv/versions/ruby-trunk/lib/ruby/gems/2.8.0/gems/thor-1.0.1/lib/thor/actions.rb:197:in `block in in_root'
      	 5: from /Users/aaron/git/rails/railties/lib/rails/generators/actions.rb:256:in `block in rails_command'
      	 4: from /Users/aaron/git/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:15:in `silence_warnings'
      	 3: from /Users/aaron/git/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:28:in `with_warnings'
      	 2: from /Users/aaron/git/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:15:in `block in silence_warnings'
      	 1: from /Users/aaron/git/rails/railties/lib/rails/generators/actions.rb:257:in `block (2 levels) in rails_command'
      /Users/aaron/git/rails/railties/lib/rails/command.rb:31:in `invoke': wrong number of arguments (given 3, expected 1..2) (ArgumentError)
      ```
      
      After this commit, things seem to work.
      690d946d
    • R
      Merge pull request #38701 from OsamaSayegh/mp-in-rails · bb9c12b4
      Rafael França 提交于
      Include rack-mini-profiler gem by default
      bb9c12b4
  6. 12 3月, 2020 7 次提交
  7. 11 3月, 2020 2 次提交