Commit Graph

520 Commits

Author SHA1 Message Date
Xavier Noria
cf71309684 Depend on Zeitwerk 2.3
Let's bump Zeitwerk in preparation for Rails 6.1.

With Zeitwerk 2.3, applications can enable reloading and eager loading
at the same time. As of this writing, Rails does not implement that
logic, but if we do we know the dependency is in place to support it.

Zeitwerk minor releases are backwards compatible, should be a seamlessly
upgrade.
2020-05-02 11:53:30 +02:00
Ryuta Kamizono
62bfa50ff2 Lock benchmark-ips version < 2.8
Looks like "File does not exist: benchmark/ips/stats/stats_metric" is
caused by benchmark-ips 2.8.0.

https://buildkite.com/rails/rails/builds/68586#d77847d6-b3f5-4fd9-af9e-45f465c9d801/940-965
https://buildkite.com/rails/rails/builds/68586#e2037c59-a695-41ff-9040-c8ee74fa7c16/940-965
2020-05-02 06:36:07 +09:00
Ryuta Kamizono
592358e182 Update pg gem required version to 1.1
This is required for #39063 to use `PG::TextDecoder::Numeric`.

Ref https://github.com/ged/ruby-pg/pull/25.

The pg gem 1.1.0 was released at August 24, 2018, so I think it is good
timing to bump the required version for improving and cleaning up the
code base.

https://rubygems.org/gems/pg/versions
2020-04-27 16:27:40 +09:00
Jonathan Hefner
d104f43c31 Update Gemfile.lock minimum Rack version to 2.0.9
Follow-up to #38991.
2020-04-21 01:06:53 -05:00
Tejas Bubane
cf1abb775e
Bump rubocop to 0.82 (#38980)
* Bump rubocop to 0.82

The `Layout/Tab` cop has been renamed to `Layout/IndentationStyle`
ref: https://github.com/rubocop-hq/rubocop/releases/tag/v0.82.0

No other code changes required.

* Bump rubocop-rails to 2.5.2

No code-changes required.

[Tejas Bubane + Rafael Mendonça França]
2020-04-17 14:24:33 -04:00
Ryuta Kamizono
09ff877610 Update tzinfo to avoid taint warnings
https://github.com/tzinfo/tzinfo/pull/113
2020-04-09 00:54:48 +09:00
Ricardo Trindade
ae3143cbfc
Updates pg gem version 2020-03-30 11:05:56 +01:00
Kasper Timm Hansen
bf34c808f9
Merge branch 'tzinfo2' 2020-03-28 20:53:24 +01:00
Phil Ross
e9425abe33
Update to TZInfo v2.0.0
Co-authored-by: Jared Beck <jared@jaredbeck.com>
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2020-03-28 20:42:43 +01:00
Carlos Antonio da Silva
104aaf5b3f Test with and generate new apps with webpacker 5.0 2020-03-22 16:39:01 -03:00
Yasuo Honda
dad4026f94 Unlock azure-storage-blob version to use version 2.0
`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.

252e3f06a5

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
```
2020-03-17 07:49:57 +09:00
Robin Dupret
e5ed5f37d4 Use latest version of SDoc
Cross-refs zzak/sdoc#138.

[John Hawthorn]
2020-03-14 19:32:02 +01:00
Ricardo Trindade
88fe76e693 bumping rubocop to 0.80 2020-02-20 15:08:20 +00:00
Ryuta Kamizono
774514659b Fix "instance variable @same_site not initialized" warnings
Ref https://github.com/rack/rack/pull/1587.
2020-02-11 08:47:15 +09:00
Kasper Timm Hansen
5bd29afeb4
Skip cookie comma separation test
Rack updated the RFC they're adhering to when parsing cookies, now no
longer including commas.

There's still an open question as mentioned in:
https://github.com/rails/rails/issues/38420

However, the resilience test is no longer as well needed as it once was
and we can move forward separately. If not, this is easily revertible.
2020-02-10 01:48:47 +01:00
Ryuta Kamizono
0399be7076 rexml has been bundled gems in Ruby 2.8 (3.0)
https://bugs.ruby-lang.org/issues/16485
https://github.com/ruby/ruby/pull/2832
2020-01-14 09:35:37 +09:00
Ryuta Kamizono
4628518382 rack 2.1.1 has released
https://github.com/rack/rack/compare/2.1.0...2.1.1
2020-01-12 19:54:25 +09:00
Ryuta Kamizono
2bf1c17c20 Fix CI failure due to renamed #exception= to #error= in minitest 5.14.0
5802aa0828
https://github.com/seattlerb/minitest/pull/809#discussion_r332399750

To support both 5.13.0 and 5.14.0, use `#initialize` instead.
2020-01-12 19:16:08 +09:00
Ryuta Kamizono
ee0d2158c9 Update image_processing to avoid Ruby 2.7 warnings
https://github.com/janko/image_processing/pull/63
2020-01-12 15:18:59 +09:00
Ryuta Kamizono
a6a4222384 rack 2.1.0 changed expires date format from rfc2822 to httpdate
See https://github.com/rack/rack/pull/1144.
2020-01-11 15:09:50 +09:00
Ricardo Trindade
3f7c50151f Bump image_processing gem version since it fixes ruby 2.7 warnings 2020-01-07 20:40:28 +00:00
Rafael Mendonça França
470598fbef
Downgrade parser to work correctly with Ruby 2.5 2019-12-27 15:49:20 -03:00
Rafael Mendonça França
f64f0a3471
Fix test with new capybara 2019-12-27 15:30:45 -03:00
Rafael Mendonça França
1752a01d65
Use bundler version that is default on Ruby 2.7 2019-12-27 11:37:40 -03:00
Yasuo Honda
5f87e50a7e Use pg 1.2.0 to support Ruby 2.7
This pull request addresses 3 failures which expect no warnings. If
these tests executed with Ruby 2.7, all of them failed due to warnings
for tainted objects.

* How to create this commit:

```
% bundle update pg --conservative
```

* Background for this change

pg gem 1.2.0 https://rubygems.org/gems/pg/versions/1.2.0 has been released including https://github.com/ged/ruby-pg/pull/307
to support Ruby 2.7, showing warnings for tainted objects. Refer https://bugs.ruby-lang.org/issues/16131

* Steps to reproduce:

```
% cd activerecord
% ruby -v
ruby 2.7.0dev (2019-12-25T06:38:55Z master 75dca097b8) [x86_64-darwin19]
% bundle update --bundler

% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/referential_integrity_test.rb -n test_does_not_print_warning_if_no_invalid_foreign_key_exception_was_raised
% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/enum_test.rb -n test_no_oid_warning
% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/postgresql_adapter_test.rb -n test_only_warn_on_first_encounter_of_unrecognized_oid
```

* Actual results:

```
% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/referential_integrity_test.rb -n test_does_not_print_warning_if_no_invalid_foreign_key_exception_was_raised

Using postgresql
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:919: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.
... snip ...
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:259: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
F

Failure:
PostgreSQLReferentialIntegrityTest#test_does_not_print_warning_if_no_invalid_foreign_key_exception_was_raised [test/cases/adapters/postgresql/referential_integrity_test.rb:73]:
expected no warnings but got:
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
... snip ...
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
/Users/yahonda/src/github.com/yahonda/rails/activesupport/lib/active_support/core_ext/object/try.rb:15: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.

rails test test/cases/adapters/postgresql/referential_integrity_test.rb:62

Finished in 0.052862s, 18.9172 runs/s, 56.7515 assertions/s.
1 runs, 3 assertions, 1 failures, 0 errors, 0 skips
%
```

```
% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/enum_test.rb -n test_no_oid_warning
Using postgresql
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:919: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.
... snip ...
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:259: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
F

Failure:
PostgresqlEnumTest#test_no_oid_warning [test/cases/adapters/postgresql/enum_test.rb:76]:
Expected "/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb💯 warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb💯 warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:106: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:24: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n" to be blank?.

rails test test/cases/adapters/postgresql/enum_test.rb:72

Finished in 0.059806s, 16.7207 runs/s, 16.7207 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
%
```

```
% ARCONN=postgresql bundle exec ruby -w -Itest test/cases/adapters/postgresql/postgresql_adapter_test.rb -n test_only_warn_on_first_encounter_of_unrecognized_oid
Using postgresql
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:919: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.
... snip ...
/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:259: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
F

Failure:
ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#test_only_warn_on_first_encounter_of_unrecognized_oid [test/cases/adapters/postgresql/postgresql_adapter_test.rb:372]:
Expected /\Aunknown OID \d+: failed to recognize type of 'regclass'\. It will be treated as String\.\n\z/ to match "/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb💯 warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb:20: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\nunknown OID 2205: failed to recognize type of 'regclass'. It will be treated as String.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:106: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb💯 warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:106: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb💯 warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.\n/Users/yahonda/src/github.com/yahonda/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:106: warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.\n".

rails test test/cases/adapters/postgresql/postgresql_adapter_test.rb:363

Finished in 0.037451s, 26.7016 runs/s, 53.4031 assertions/s.
1 runs, 2 assertions, 1 failures, 0 errors, 0 skips
%
```
2019-12-25 16:15:56 +09:00
Ryuta Kamizono
fbe335cfe0 Update tzinfo to avoid Ruby 2.7 warnings
https://github.com/tzinfo/tzinfo/releases/tag/v1.2.6
2019-12-25 02:34:31 +09:00
Jean Boussier
137a78787e Update sqlite3 to avoid Ruby 2.7 warnings 2019-12-19 10:27:02 +01:00
Rafael Mendonça França
92ec9f270d
Fix possible information leak / session hijacking vulnerability.
The `ActionDispatch::Session::MemcacheStore` is still vulnerable
given it requires the gem dalli to be updated as well.

CVE-2019-16782
2019-12-18 17:01:09 -03:00
Jonathan Hefner
fe9abe4436 Leverage new :env option for Thor::Actions#run
Follow-up to #34980.

Also, refactor tests to be less brittle.
2019-12-15 13:18:06 -06:00
utilum
858e429bca Update mysql2, json, to fix ruby 2.7 warnings (#37967)
* Update mysql2 to the latest version

Fixes keyword arguments warning:
brianmario/mysql2/pull/1084

Fixes taint mechanism deprecation warning:
brianmario/mysql2@785969fbce

* Update json to the latest version

Fixes warning from trying to access an uninitialized ivar, and
keyword arguments warning:

flori/json/commit/de14dea34074558dc671d7edc71513f0216ce21d
flori/json/commit/19da336333e63dc9dde7baea47b179e162b7568e
2019-12-14 12:56:48 +09:00
Ryuta Kamizono
2821e8d02a
Merge pull request #37896 from tgxworld/upgrade_listen
Upgrade listen to 3.2.1 for darwin fixes
2019-12-06 09:49:54 +09:00
Alan Tan
c9430dba39 Upgrade listen to 3.2.1 for darwin fixes
Pulls in a fix where the darwin adapter no longers create a `fsevent_watch` process
for each directory that Listen has been asked to watch.
2019-12-06 08:21:24 +08:00
Jean Boussier
54878cd44b Distinguish missing controller exceptions from unrelated NameError
Fix: https://github.com/rails/rails/issues/37650

The classic autoloader used to totally unregister any constant that
failed midway. Which mean `"SomeConst".constantize` was idempotent.

However Zeitwerk rely on normal `Kernel#require` behavior, which mean
that if an exception is raised during a class/module definition,
it will be left incompletely defined. For instance:

```ruby
class FooController
  ::DoesNotExist

  def index
  end
end
```

Will leave `FooController` defined, but without its `index` method.

Because of this, when silencing a NameError, it's important
to make sure the missing constant is really the one we were trying
to load.
2019-12-04 16:11:54 +01:00
Yasuo Honda
78c209a693 Bump RuboCop version to 0.77
https://github.com/rubocop-hq/rubocop/releases/tag/v0.77.0

* Update cop names to changed as follows:

```
$ bundle exec rubocop
Error: The `Layout/IndentFirstArgument` cop has been renamed to `Layout/FirstArgumentIndentation`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`.
(obsolete configuration found in .rubocop.yml, please update it)
$
```

* Auto correct these offenses:

```
$ bundle exec rubocop -a
... snip ...
Offenses:

activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:104:11: C: [Corrected] Style/RedundantReturn: Redundant return detected.
          return true
          ^^^^^^
activerecord/lib/active_record/reflection.rb:622:15: C: [Corrected] Style/RedundantReturn: Redundant return detected.
              return inverse_name
              ^^^^^^
activerecord/lib/active_record/table_metadata.rb:48:9: C: [Corrected] Style/RedundantReturn: Redundant return detected.
        return self
        ^^^^^^

2812 files inspected, 3 offenses detected, 3 offenses corrected
$
```
2019-11-27 23:58:49 +00:00
Benoit Daloze
cbc5fbc008 Update to listen 3.2
* https://github.com/guard/listen/releases/tag/v3.2.0
* https://github.com/guard/listen/issues/465
* `listen` removed the unmaintained `ruby_dep` dependency, which
  incorrectly shows warnings when running on TruffleRuby.
2019-11-24 15:19:54 +01:00
Diego Plentz
9731bcbee7 Add I18n to eager_load_namespaces 2019-11-21 14:59:22 -05:00
Ryuta Kamizono
ad767034c9 Address all possible Performance/StartWith / Performance/EndWith violations
rubocop-performance v1.5.1 includes bug fixes for that cops.

https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.5.1
2019-11-14 03:20:29 +09:00
Yasuo Honda
ce9a220fdc Enabled GitHub Actions to run the latest RuboCop 0.76.0
Updated the default Ruby workflow:

* Trigger this action for pull request and push
* Install requried OS packages for Active Record connection adapters
* Removing `gem install bundler` because Ruby 2.6 already installs it
* Run RuboCop in parallel by `bundle exec rubocop --parallel`
* Rename `ruby.yml` to `rubocop.yml` to represent the workflow

Bump RuboCop to 0.76.0 and rename `Style/UnneededPercentQ` to `Style/RedundantPercentQ`

```ruby
$ bundle exec rubocop
Error: The `Style/UnneededPercentQ` cop has been renamed to `Style/RedundantPercentQ`.
(obsolete configuration found in .rubocop.yml
```

Removed `.codeclimate.yml`
2019-10-30 23:21:09 +00:00
utilum
1cc172a5b0 Update multi_json to the latest version
Avoid `warning: tried to create a Proc object without giving a block`
in Ruby head.

Fixed in intridea/multi_json@26a94ab8c7 .
2019-10-15 10:22:20 +02:00
John Hawthorn
fe852341ec Bundle update 2019-10-09 21:48:16 -07:00
Xavier Noria
245f255318 bump Zeitwerk to 2.2 2019-10-09 21:30:48 +02:00
utilum
26a4e28588 Update sassc to the latest version
```
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/ffi-1.11.1/lib/ffi/library.rb:275: warning: method redefined; discarding old _context_get_included_files
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/ffi-1.11.1/lib/ffi/library.rb:275: warning: method redefined; discarding old list_get_length
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/ffi-1.11.1/lib/ffi/library.rb:275: warning: method redefined; discarding old list_get_value
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/ffi-1.11.1/lib/ffi/library.rb:275: warning: method redefined; discarding old _make_data_context
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/ffi-1.11.1/lib/ffi/library.rb:275: warning: method redefined; discarding old version
```

Were fixed in sassc 2.2.1.
2019-10-08 12:13:38 +02:00
utilum
08a92a2afb Update json to the latest version
```
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/json-2.1.0/lib/json/common.rb:156: warning: The last argument is nil, treating as empty keywords
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/json-2.1.0/lib/json/common.rb:156: warning: The last argument is used as the keyword parameter
```

Was fixed in 2.2.0.
2019-10-08 12:09:02 +02:00
utilum
305fa94feb Update i18n to the latest version
```
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/i18n-1.6.0/lib/i18n/backend/base.rb:146: warning: The last argument is used as the keyword parameter
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/i18n-1.6.0/lib/i18n/backend/base.rb:84: warning: The last argument is used as the keyword parameter
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/i18n-1.6.0/lib/i18n.rb:179: warning: for `t' defined here
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/i18n-1.6.0/lib/i18n.rb:179: warning: for `translate' defined here
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/i18n-1.6.0/lib/i18n.rb:205: warning: The last argument is used as the keyword parameter
```

Was fixed by ruby-i18n/i18n@2920107fbf .
2019-10-08 12:09:02 +02:00
Ryuta Kamizono
6158b83d2a Address to the warning "DEPRECATED: global use of assertion methods"
This addresses to the warning "DEPRECATED: global use of assertion
methods" which is introduced in minitest v5.12.0.

e6bc448573

https://buildkite.com/rails/rails/builds/64121#880aecf2-849f-4603-95f1-228784c7d3f4/1003-1010
2019-10-04 17:32:31 +09:00
Carlos Antonio da Silva
c3103383d3 Update Gemfile.lock with newly added activesupport dependencies
Reference: 3b23c644971fc5805505748e78c3230d25ef7618
2019-10-01 23:24:51 -03:00
Ryuta Kamizono
4674d77764 Required mysql2 gem 0.5.0
This follows up #36692, `Mysql2::Error::TimeoutError` is introduced from
mysql2 gem 0.5.0. https://github.com/brianmario/mysql2/pull/911
2019-09-13 11:15:44 +09:00
Eugene Kenny
5545f6a771 Fix Active Job Sidekiq integration tests
The `Sidekiq::Logging` module was removed in Sidekiq 6.0 in favour of
`Sidekiq.logger=`.

https://github.com/mperham/sidekiq/wiki/Logging#api-changes

> The old Sidekiq::Logging class was removed in Sidekiq 6.0. You should
> not be accessing any Sidekiq internal classes to use the logger. Use
> `logger` directly in your Worker or use `Sidekiq.logger` elsewhere.
2019-09-01 23:31:21 +02:00
utilum
e83ec20f52 Update puma to the latest version
Currently:
`lib/ruby/gems/2.6.0/gems/puma-3.12.1/lib/puma/minissl.rb:5: warning:
mismatched indentations at 'rescue' with 'begin' at 3`
2019-08-18 13:21:47 +02:00
Rafael Mendonça França
1953e0e1ac
Support Rails with sass-rails 6 2019-08-16 18:33:29 -04:00