diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb
index b2e5612484..d342f4cd67 100644
--- a/Library/Homebrew/vendor/bundle/bundler/setup.rb
+++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb
@@ -86,7 +86,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.27.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.14.2/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.11.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.8/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/config/default.yml
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/config/default.yml
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/config/default.yml
index ee8fa92ae4..d1180db658 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/config/default.yml
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/config/default.yml
@@ -60,6 +60,7 @@ Rails/ActionFilter:
- filter
Include:
- app/controllers/**/*.rb
+ - app/mailers/**/*.rb
Rails/ActiveRecordAliases:
Description: >-
@@ -107,7 +108,7 @@ Rails/AddColumnIndex:
Rails/AfterCommitOverride:
Description: >-
- This cop enforces that there is only one call to `after_commit`
+ Enforces that there is only one call to `after_commit`
(and its aliases - `after_create_commit`, `after_update_commit`,
and `after_destroy_commit`) with the same callback name per model.
Enabled: 'pending'
@@ -271,6 +272,13 @@ Rails/DeprecatedActiveModelErrorsMethods:
Enabled: pending
Safe: false
VersionAdded: '2.14'
+ VersionChanged: '2.15'
+
+Rails/DotSeparatedKeys:
+ Description: 'Enforces the use of dot-separated keys instead of `:scope` options in `I18n` translation methods.'
+ StyleGuide: 'https://rails.rubystyle.guide/#dot-separated-keys'
+ Enabled: pending
+ VersionAdded: '2.15'
Rails/DuplicateAssociation:
Description: "Don't repeat associations in a model."
@@ -476,6 +484,7 @@ Rails/IgnoredSkipActionFilterOption:
VersionAdded: '0.63'
Include:
- app/controllers/**/*.rb
+ - app/mailers/**/*.rb
Rails/IndexBy:
Description: 'Prefer `index_by` over `each_with_object`, `to_h`, or `map`.'
@@ -504,13 +513,14 @@ Rails/InverseOf:
- app/models/**/*.rb
Rails/LexicallyScopedActionFilter:
- Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the controller."
+ Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the class."
StyleGuide: 'https://rails.rubystyle.guide#lexically-scoped-action-filter'
Enabled: true
Safe: false
VersionAdded: '0.52'
Include:
- app/controllers/**/*.rb
+ - app/mailers/**/*.rb
Rails/LinkToBlank:
Description: 'Checks that `link_to` with a `target: "_blank"` have a `rel: "noopener"` option passed to them.'
@@ -690,7 +700,7 @@ Rails/RedundantReceiverInWithOptions:
VersionAdded: '0.52'
Rails/RedundantTravelBack:
- Description: This cop checks for redundant `travel_back` calls.
+ Description: Checks for redundant `travel_back` calls.
Enabled: pending
VersionAdded: '2.12'
Include:
@@ -774,6 +784,11 @@ Rails/RootJoinChain:
Enabled: pending
VersionAdded: '2.13'
+Rails/RootPublicPath:
+ Description: "Favor `Rails.public_path` over `Rails.root` with `'public'`."
+ Enabled: pending
+ VersionAdded: '2.15'
+
Rails/SafeNavigation:
Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`."
Enabled: true
@@ -808,7 +823,7 @@ Rails/SaveBang:
Rails/SchemaComment:
Description: >-
- This cop enforces the use of the `comment` option when adding a new table or column
+ Enforces the use of the `comment` option when adding a new table or column
to the database during a migration.
Enabled: false
VersionAdded: '2.13'
@@ -867,9 +882,15 @@ Rails/SquishedSQLHeredocs:
VersionAdded: '2.8'
VersionChanged: '2.9'
# Some SQL syntax (e.g. PostgreSQL comments and functions) requires newlines
- # to be preserved in order to work, thus auto-correction is not safe.
+ # to be preserved in order to work, thus autocorrection is not safe.
SafeAutoCorrect: false
+Rails/StripHeredoc:
+ Description: 'Enforces the use of squiggly heredoc over `strip_heredoc`.'
+ StyleGuide: 'https://rails.rubystyle.guide/#prefer-squiggly-heredoc'
+ Enabled: pending
+ VersionAdded: '2.15'
+
Rails/TableNameAssignment:
Description: >-
Do not use `self.table_name =`. Use Inflections or `table_name_prefix` instead.
@@ -905,6 +926,16 @@ Rails/TimeZoneAssignment:
- spec/**/*.rb
- test/**/*.rb
+Rails/ToFormattedS:
+ Description: 'Checks for consistent uses of `to_fs` or `to_formatted_s`.'
+ StyleGuide: 'https://rails.rubystyle.guide/#prefer-to-fs'
+ Enabled: pending
+ EnforcedStyle: to_fs
+ SupportedStyles:
+ - to_fs
+ - to_formatted_s
+ VersionAdded: '2.15'
+
Rails/TransactionExitStatement:
Description: 'Avoid the usage of `return`, `break` and `throw` in transaction blocks.'
Enabled: pending
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/config/obsoletion.yml
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/config/obsoletion.yml
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/config/obsoletion.yml
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop-rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop-rails.rb
similarity index 68%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop-rails.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop-rails.rb
index fb215b534c..a5ac04629e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop-rails.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop-rails.rb
@@ -13,3 +13,11 @@ require_relative 'rubocop/rails/schema_loader/schema'
RuboCop::Rails::Inject.defaults!
require_relative 'rubocop/cop/rails_cops'
+
+RuboCop::Cop::Style::RedundantSelf.singleton_class.prepend(
+ Module.new do
+ def autocorrect_incompatible_with
+ super.push(RuboCop::Cop::Rails::SafeNavigation)
+ end
+ end
+)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/active_record_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/active_record_helper.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/active_record_helper.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/active_record_helper.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/active_record_migrations_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/active_record_migrations_helper.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/active_record_migrations_helper.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/active_record_migrations_helper.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/class_send_node_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/class_send_node_helper.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/class_send_node_helper.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/class_send_node_helper.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/enforce_superclass.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/enforce_superclass.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/enforce_superclass.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/enforce_superclass.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/index_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/index_method.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/index_method.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/index_method.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/migrations_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/migrations_helper.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/migrations_helper.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/migrations_helper.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/target_rails_version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/target_rails_version.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/mixin/target_rails_version.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/mixin/target_rails_version.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/action_controller_test_case.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/action_controller_test_case.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/action_controller_test_case.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/action_controller_test_case.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/action_filter.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/action_filter.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/action_filter.rb
index b86d8da070..83db0ade84 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/action_filter.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/action_filter.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the consistent use of action filter methods.
+ # Enforces the consistent use of action filter methods.
#
# The cop is configurable and can enforce the use of the older
# something_filter methods or the newer something_action methods.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_aliases.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_aliases.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_aliases.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_callbacks_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_callbacks_order.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_callbacks_order.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_callbacks_order.rb
index 24301248aa..734f117347 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_callbacks_order.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_callbacks_order.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that Active Record callbacks are declared
+ # Checks that Active Record callbacks are declared
# in the order in which they will be executed.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_override.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_record_override.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_record_override.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_support_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_support_aliases.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_support_aliases.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_support_aliases.rb
index 4587369eb0..312490da4b 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/active_support_aliases.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/active_support_aliases.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that ActiveSupport aliases to core ruby methods
+ # Checks that ActiveSupport aliases to core ruby methods
# are not used.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/add_column_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/add_column_index.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/add_column_index.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/add_column_index.rb
index e7816d5fa6..9bc6bb7cd4 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/add_column_index.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/add_column_index.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for migrations using `add_column` that have an `index`
+ # Checks for migrations using `add_column` that have an `index`
# key. `add_column` does not accept `index`, but also does not raise an
# error for extra keys, so it is possible to mistakenly add the key without
# realizing it will not actually add an index.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/after_commit_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/after_commit_override.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/after_commit_override.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/after_commit_override.rb
index 789f5059c7..070941de77 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/after_commit_override.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/after_commit_override.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces that there is only one call to `after_commit`
+ # Enforces that there is only one call to `after_commit`
# (and its aliases - `after_create_commit`, `after_update_commit`,
# and `after_destroy_commit`) with the same callback name per model.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_controller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_controller.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_controller.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_controller.rb
index 9bdde9de72..6e67472256 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_controller.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_controller.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that controllers subclass `ApplicationController`.
+ # Checks that controllers subclass `ApplicationController`.
#
# @safety
# This cop's autocorrection is unsafe because it may let the logic from `ApplicationController`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_job.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_job.rb
similarity index 93%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_job.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_job.rb
index 48adfe0185..d02e32b253 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_job.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_job.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that jobs subclass `ApplicationJob` with Rails 5.0.
+ # Checks that jobs subclass `ApplicationJob` with Rails 5.0.
#
# @safety
# This cop's autocorrection is unsafe because it may let the logic from `ApplicationJob`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_mailer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_mailer.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_mailer.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_mailer.rb
index 1f66855213..c8638da9f2 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_mailer.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_mailer.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that mailers subclass `ApplicationMailer` with Rails 5.0.
+ # Checks that mailers subclass `ApplicationMailer` with Rails 5.0.
#
# @safety
# This cop's autocorrection is unsafe because it may let the logic from `ApplicationMailer`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_record.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_record.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_record.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_record.rb
index 0fba2a3e7b..ebd46b179f 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/application_record.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/application_record.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that models subclass `ApplicationRecord` with Rails 5.0.
+ # Checks that models subclass `ApplicationRecord` with Rails 5.0.
#
# @safety
# This cop's autocorrection is unsafe because it may let the logic from `ApplicationRecord`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/arel_star.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/arel_star.rb
similarity index 94%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/arel_star.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/arel_star.rb
index 6135c584ca..77e5441a9a 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/arel_star.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/arel_star.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop prevents usage of `"*"` on an Arel::Table column reference.
+ # Prevents usage of `"*"` on an Arel::Table column reference.
#
# Using `arel_table["*"]` causes the outputted string to be a literal
# quoted asterisk (e.g. `my_model`.`*`). This causes the
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/assert_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/assert_not.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/assert_not.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/assert_not.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/attribute_default_block_value.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/attribute_default_block_value.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/attribute_default_block_value.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/attribute_default_block_value.rb
index 2651f981b8..42bac8e3b2 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/attribute_default_block_value.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/attribute_default_block_value.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for `attribute` class methods that specify a `:default` option
+ # Looks for `attribute` class methods that specify a `:default` option
# which value is an array, string literal or method call without a block.
# It will accept all other values, such as string, symbol, integer and float literals
# as well as constants.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/belongs_to.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/belongs_to.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/belongs_to.rb
index e6cb7ac06e..37d4ea255a 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/belongs_to.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/belongs_to.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for belongs_to associations where we control whether the
+ # Looks for belongs_to associations where we control whether the
# association is required via the deprecated `required` option instead.
#
# Since Rails 5, belongs_to associations are required by default and this
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/blank.rb
similarity index 93%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/blank.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/blank.rb
index 14c54cd257..d5a0a8fa2c 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/blank.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/blank.rb
@@ -3,17 +3,17 @@
module RuboCop
module Cop
module Rails
- # This cop checks for code that can be written with simpler conditionals
+ # Checks for code that can be written with simpler conditionals
# using `Object#blank?` defined by Active Support.
#
# Interaction with `Style/UnlessElse`:
# The configuration of `NotPresent` will not produce an offense in the
# context of `unless else` if `Style/UnlessElse` is inabled. This is
- # to prevent interference between the auto-correction of the two cops.
+ # to prevent interference between the autocorrection of the two cops.
#
# @safety
- # This cop is unsafe auto-correction, because `' '.empty?` returns false,
- # but `' '.blank?` returns true. Therefore, auto-correction is not compatible
+ # This cop is unsafe autocorrection, because `' '.empty?` returns false,
+ # but `' '.blank?` returns true. Therefore, autocorrection is not compatible
# if the receiver is a non-empty blank string, tab, or newline meta characters.
#
# @example NilOrEmpty: true (default)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/bulk_change_table.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/bulk_change_table.rb
similarity index 99%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/bulk_change_table.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/bulk_change_table.rb
index d29cbe5bd0..a9bfb2c9e5 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/bulk_change_table.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/bulk_change_table.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This Cop checks whether alter queries are combinable.
+ # Checks whether alter queries are combinable.
# If combinable queries are detected, it suggests to you
# to use `change_table` with `bulk: true` instead.
# This option causes the migration to generate a single
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/compact_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/compact_blank.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/compact_blank.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/compact_blank.rb
index dadd8356c8..8efcf30f1d 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/compact_blank.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/compact_blank.rb
@@ -17,7 +17,7 @@ module RuboCop
# `ActionController::Parameters`.
# `Array#compact_blank!`, `Hash#compact_blank!` are equivalent to `delete_if(&:blank?)`.
# `ActionController::Parameters#compact_blank!` is equivalent to `reject!(&:blank?)`.
- # If the cop makes a mistake, auto-corrected code may get unexpected behavior.
+ # If the cop makes a mistake, autocorrected code may get unexpected behavior.
#
# @example
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/content_tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/content_tag.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/content_tag.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/content_tag.rb
index b212ef72aa..2c36621d1c 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/content_tag.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/content_tag.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks legacy syntax usage of `tag`
+ # Checks legacy syntax usage of `tag`
#
# NOTE: Allow `tag` when the first argument is a variable because
# `tag(name)` is simpler rather than `tag.public_send(name)`.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/create_table_with_timestamps.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/create_table_with_timestamps.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/create_table_with_timestamps.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/create_table_with_timestamps.rb
index 1d763127e7..6b676436b6 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/create_table_with_timestamps.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/create_table_with_timestamps.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks the migration for which timestamps are not included
+ # Checks the migration for which timestamps are not included
# when creating a new table.
# In many cases, timestamps are useful information and should be added.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/date.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/date.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/date.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/date.rb
index decc517d5d..1515387925 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/date.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/date.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the correct use of Date methods,
+ # Checks for the correct use of Date methods,
# such as Date.today, Date.current etc.
#
# Using `Date.today` is dangerous, because it doesn't know anything about
@@ -22,16 +22,6 @@ module RuboCop
# And you can set a warning for `to_time` with `AllowToTime: false`.
# `AllowToTime` is `true` by default to prevent false positive on `DateTime` object.
#
- # @example EnforcedStyle: strict
- # # bad
- # Date.current
- # Date.yesterday
- # Date.today
- #
- # # good
- # Time.zone.today
- # Time.zone.today - 1.day
- #
# @example EnforcedStyle: flexible (default)
# # bad
# Date.today
@@ -43,6 +33,16 @@ module RuboCop
# Date.yesterday
# date.in_time_zone
#
+ # @example EnforcedStyle: strict
+ # # bad
+ # Date.current
+ # Date.yesterday
+ # Date.today
+ #
+ # # good
+ # Time.zone.today
+ # Time.zone.today - 1.day
+ #
# @example AllowToTime: true (default)
# # good
# date.to_time
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/default_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/default_scope.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/default_scope.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/default_scope.rb
index d3bd035462..3bbd88d009 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/default_scope.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/default_scope.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for uses of `default_scope`.
+ # Looks for uses of `default_scope`.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate.rb
index 69be94405b..df86aeb5d3 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for delegations that could have been created
+ # Looks for delegations that could have been created
# automatically with the `delegate` method.
#
# Safe navigation `&.` is ignored because Rails' `allow_nil`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate_allow_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate_allow_blank.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate_allow_blank.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate_allow_blank.rb
index 7935e95ca3..a3eb325a3c 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/delegate_allow_blank.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/delegate_allow_blank.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for delegations that pass :allow_blank as an option
+ # Looks for delegations that pass :allow_blank as an option
# instead of :allow_nil. :allow_blank is not a valid option to pass
# to ActiveSupport#delegate.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
similarity index 64%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
index d77863972e..86811e92b3 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks direct manipulation of ActiveModel#errors as hash.
+ # Checks direct manipulation of ActiveModel#errors as hash.
# These operations are deprecated in Rails 6.1 and will not work in Rails 7.
#
# @safety
@@ -26,8 +26,18 @@ module RuboCop
# # good
# user.errors.delete(:name)
#
+ # # bad
+ # user.errors.keys.include?(:attr)
+ #
+ # # good
+ # user.errors.attribute_names.include?(:attr)
+ #
class DeprecatedActiveModelErrorsMethods < Base
+ include RangeHelp
+ extend AutoCorrector
+
MSG = 'Avoid manipulating ActiveModel errors as hash directly.'
+ AUTOCORECTABLE_METHODS = %i[<< clear keys].freeze
MANIPULATIVE_METHODS = Set[
*%i[
@@ -45,6 +55,7 @@ module RuboCop
{
#root_manipulation?
#root_assignment?
+ #errors_keys?
#messages_details_manipulation?
#messages_details_assignment?
}
@@ -66,6 +77,12 @@ module RuboCop
...)
PATTERN
+ def_node_matcher :errors_keys?, <<~PATTERN
+ (send
+ (send #receiver_matcher :errors)
+ :keys)
+ PATTERN
+
def_node_matcher :messages_details_manipulation?, <<~PATTERN
(send
(send
@@ -89,12 +106,49 @@ module RuboCop
def on_send(node)
any_manipulation?(node) do
- add_offense(node)
+ add_offense(node) do |corrector|
+ next unless AUTOCORECTABLE_METHODS.include?(node.method_name)
+
+ autocorrect(corrector, node)
+ end
end
end
private
+ def autocorrect(corrector, node)
+ receiver = node.receiver
+
+ if receiver.receiver.method?(:messages)
+ corrector.remove(receiver.receiver.loc.dot)
+ corrector.remove(receiver.receiver.loc.selector)
+ end
+
+ range = offense_range(node, receiver)
+ replacement = replacement(node, receiver)
+
+ corrector.replace(range, replacement)
+ end
+
+ def offense_range(node, receiver)
+ range_between(receiver.receiver.source_range.end_pos, node.source_range.end_pos)
+ end
+
+ def replacement(node, receiver)
+ return '.errors.attribute_names' if node.method?(:keys)
+
+ key = receiver.first_argument.source
+
+ case node.method_name
+ when :<<
+ value = node.first_argument.source
+
+ ".add(#{key}, #{value})"
+ when :clear
+ ".delete(#{key})"
+ end
+ end
+
def receiver_matcher(node)
model_file? ? receiver_matcher_inside_model(node) : receiver_matcher_outside_model(node)
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dot_separated_keys.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dot_separated_keys.rb
new file mode 100644
index 0000000000..e2b8b795e7
--- /dev/null
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dot_separated_keys.rb
@@ -0,0 +1,71 @@
+# frozen_string_literal: true
+
+module RuboCop
+ module Cop
+ module Rails
+ # Enforces the use of dot-separated locale keys instead of specifying the `:scope` option
+ # with an array or a single symbol in `I18n` translation methods.
+ # Dot-separated notation is easier to read and trace the hierarchy.
+ #
+ # @example
+ # # bad
+ # I18n.t :record_invalid, scope: [:activerecord, :errors, :messages]
+ # I18n.t :title, scope: :invitation
+ #
+ # # good
+ # I18n.t 'activerecord.errors.messages.record_invalid'
+ # I18n.t :record_invalid, scope: 'activerecord.errors.messages'
+ #
+ class DotSeparatedKeys < Base
+ include RangeHelp
+ extend AutoCorrector
+
+ MSG = 'Use the dot-separated keys instead of specifying the `:scope` option.'
+ TRANSLATE_METHODS = %i[translate t].freeze
+
+ def_node_matcher :translate_with_scope?, <<~PATTERN
+ (send {nil? (const nil? :I18n)} {:translate :t} ${sym_type? str_type?}
+ (hash <$(pair (sym :scope) ${array_type? sym_type?}) ...>)
+ )
+ PATTERN
+
+ def on_send(node)
+ return unless TRANSLATE_METHODS.include?(node.method_name)
+
+ translate_with_scope?(node) do |key_node, scope_node|
+ return unless should_convert_scope?(scope_node)
+
+ add_offense(scope_node) do |corrector|
+ # Eat the comma on the left.
+ range = range_with_surrounding_space(range: scope_node.source_range, side: :left)
+ range = range_with_surrounding_comma(range, :left)
+ corrector.remove(range)
+
+ corrector.replace(key_node, new_key(key_node, scope_node))
+ end
+ end
+ end
+
+ private
+
+ def should_convert_scope?(scope_node)
+ scopes(scope_node).all?(&:basic_literal?)
+ end
+
+ def new_key(key_node, scope_node)
+ "'#{scopes(scope_node).map(&:value).join('.')}.#{key_node.value}'"
+ end
+
+ def scopes(scope_node)
+ value = scope_node.value
+
+ if value.array_type?
+ value.values
+ else
+ [value]
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_association.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_association.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_association.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_association.rb
index 3c1da3ec07..6c7b972bfb 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_association.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_association.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for associations that have been defined multiple times in the same file.
+ # Looks for associations that have been defined multiple times in the same file.
#
# When an association is defined multiple times on a model, Active Record overrides the
# previously defined association with the new one. Because of this, this cop's autocorrection
@@ -35,7 +35,7 @@ module RuboCop
offenses(class_node).each do |name, nodes|
nodes.each do |node|
add_offense(node, message: format(MSG, name: name)) do |corrector|
- next if nodes.last == node
+ next if same_line?(nodes.last, node)
corrector.remove(range_by_whole_lines(node.source_range, include_final_newline: true))
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_scope.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_scope.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_scope.rb
index e3a33ce4e5..e5c2e0fdac 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duplicate_scope.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duplicate_scope.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for multiple scopes in a model that have the same `where` clause. This
+ # Checks for multiple scopes in a model that have the same `where` clause. This
# often means you copy/pasted a scope, updated the name, and forgot to change the condition.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duration_arithmetic.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duration_arithmetic.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duration_arithmetic.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duration_arithmetic.rb
index 046635691f..47f2ab0b73 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/duration_arithmetic.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/duration_arithmetic.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks if a duration is added to or subtracted from `Time.current`.
+ # Checks if a duration is added to or subtracted from `Time.current`.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/dynamic_find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dynamic_find_by.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/dynamic_find_by.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dynamic_find_by.rb
index 2999c0d649..b3a8750353 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/dynamic_find_by.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/dynamic_find_by.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks dynamic `find_by_*` methods.
+ # Checks dynamic `find_by_*` methods.
# Use `find_by` instead of dynamic method.
# See. https://rails.rubystyle.guide#find_by
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/eager_evaluation_log_message.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/eager_evaluation_log_message.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb
index a5d0ebe51f..549e2ccdcd 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/eager_evaluation_log_message.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that blocks are used for interpolated strings passed to
+ # Checks that blocks are used for interpolated strings passed to
# `Rails.logger.debug`.
#
# By default, Rails production environments use the `:info` log level.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_hash.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_hash.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_hash.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_hash.rb
index 1944ba2180..b99b8edecd 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_hash.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_hash.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for enums written with array syntax.
+ # Looks for enums written with array syntax.
#
# When using array syntax, adding an element in a
# position other than the last causes all previous
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_uniqueness.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_uniqueness.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_uniqueness.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_uniqueness.rb
index d99eba57bc..e01ff831f8 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/enum_uniqueness.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/enum_uniqueness.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for duplicate values in enum declarations.
+ # Looks for duplicate values in enum declarations.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_comparison.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_comparison.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_comparison.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_comparison.rb
index d6c6e3b9ad..c5a25465bf 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_comparison.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_comparison.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that Rails.env is compared using `.production?`-like
+ # Checks that Rails.env is compared using `.production?`-like
# methods instead of equality against a string or symbol.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_variable_access.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_variable_access.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_variable_access.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_variable_access.rb
index 00d6aee077..e3642820c9 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/environment_variable_access.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/environment_variable_access.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for direct access to environment variables through the
+ # Looks for direct access to environment variables through the
# `ENV` variable within the application code. This can lead to runtime
# errors due to misconfiguration that could have been discovered at boot
# time if the environment variables were loaded as part of initialization
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/exit.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/exit.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/exit.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/exit.rb
index d5f77155be..9bd3cd4ab9 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/exit.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/exit.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces that `exit` calls are not used within a rails app.
+ # Enforces that `exit` calls are not used within a rails app.
# Valid options are instead to raise an error, break, return, or some
# other form of stopping execution of current request.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/expanded_date_range.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/expanded_date_range.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/expanded_date_range.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/expanded_date_range.rb
index 34e1d341af..35f583da1c 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/expanded_date_range.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/expanded_date_range.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for expanded date range. It only compatible `..` range is targeted.
+ # Checks for expanded date range. It only compatible `..` range is targeted.
# Incompatible `...` range is ignored.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/file_path.rb
similarity index 91%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/file_path.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/file_path.rb
index e8258537e4..bde2094342 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/file_path.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/file_path.rb
@@ -3,19 +3,10 @@
module RuboCop
module Cop
module Rails
- # This cop is used to identify usages of file path joining process
+ # Identifies usages of file path joining process
# to use `Rails.root.join` clause. It is used to add uniformity when
# joining paths.
#
- # @example EnforcedStyle: arguments
- # # bad
- # Rails.root.join('app/models/goober')
- # File.join(Rails.root, 'app/models/goober')
- # "#{Rails.root}/app/models/goober"
- #
- # # good
- # Rails.root.join('app', 'models', 'goober')
- #
# @example EnforcedStyle: slashes (default)
# # bad
# Rails.root.join('app', 'models', 'goober')
@@ -25,6 +16,15 @@ module RuboCop
# # good
# Rails.root.join('app/models/goober')
#
+ # @example EnforcedStyle: arguments
+ # # bad
+ # Rails.root.join('app/models/goober')
+ # File.join(Rails.root, 'app/models/goober')
+ # "#{Rails.root}/app/models/goober"
+ #
+ # # good
+ # Rails.root.join('app', 'models', 'goober')
+ #
class FilePath < Base
include ConfigurableEnforcedStyle
include RangeHelp
@@ -48,8 +48,11 @@ module RuboCop
def on_dstr(node)
return unless rails_root_nodes?(node)
return unless node.children.last.str_type?
- return unless node.children.last.source.start_with?('.') ||
- node.children.last.source.include?(File::SEPARATOR)
+
+ last_child_source = node.children.last.source
+ return unless last_child_source.start_with?('.') ||
+ last_child_source.include?(File::SEPARATOR)
+ return if last_child_source.start_with?(':')
register_offense(node)
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by.rb
index 02beb5aba3..74da0840f3 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop is used to identify usages of `where.take` and change them to use `find_by` instead.
+ # Identifies usages of `where.take` and change them to use `find_by` instead.
#
# And `where(...).first` can return different results from `find_by`.
# (They order records differently, so the "first" record can be different.)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by_id.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by_id.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by_id.rb
index f0776a0dfa..415e45e25b 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_by_id.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_by_id.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces that `ActiveRecord#find` is used instead of
+ # Enforces that `ActiveRecord#find` is used instead of
# `where.take!`, `find_by!`, and `find_by_id!` to retrieve a single record
# by primary key when you expect it to be found.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_each.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_each.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_each.rb
index 81ca1b193e..73eb23fc45 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/find_each.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/find_each.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop is used to identify usages of `all.each` and
+ # Identifies usages of `all.each` and
# change them to use `all.find_each` instead.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_and_belongs_to_many.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb
similarity index 89%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_and_belongs_to_many.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb
index 1c849a44f5..cf6ca32c32 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_and_belongs_to_many.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of the has_and_belongs_to_many macro.
+ # Checks for the use of the has_and_belongs_to_many macro.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
similarity index 91%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
index 7b9362ccde..e8f4e69cc3 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for `has_many` or `has_one` associations that don't
+ # Looks for `has_many` or `has_one` associations that don't
# specify a `:dependent` option.
#
# It doesn't register an offense if `:through` or `dependent: nil`
@@ -116,7 +116,7 @@ module RuboCop
def valid_options?(options)
return false if options.nil?
- options = options.first.children.first.pairs if options.first.kwsplat_type?
+ options = extract_option_if_kwsplat(options)
return true unless options
return true if options.any? do |o|
@@ -126,6 +126,14 @@ module RuboCop
false
end
+ def extract_option_if_kwsplat(options)
+ if options.first.kwsplat_type? && options.first.children.first.hash_type?
+ return options.first.children.first.pairs
+ end
+
+ options
+ end
+
def active_resource?(node)
return false if node.nil?
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/helper_instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/helper_instance_variable.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/helper_instance_variable.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/helper_instance_variable.rb
index 60d632fd44..d390b414fa 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/helper_instance_variable.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/helper_instance_variable.rb
@@ -3,14 +3,14 @@
module RuboCop
module Cop
module Rails
- # This cop checks for use of the helper methods which reference
+ # Checks for use of the helper methods which reference
# instance variables.
#
# Relying on instance variables makes it difficult to re-use helper
# methods.
#
# If it seems awkward to explicitly pass in each dependent
- # variable, consider moving the behaviour elsewhere, for
+ # variable, consider moving the behavior elsewhere, for
# example to a model, decorator or presenter.
#
# Provided that a class inherits `ActionView::Helpers::FormBuilder`,
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/http_positional_arguments.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/http_positional_arguments.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/http_positional_arguments.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/http_positional_arguments.rb
index 31413a8d29..bb0f214eae 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/http_positional_arguments.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/http_positional_arguments.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop is used to identify usages of http methods like `get`, `post`,
+ # Identifies usages of http methods like `get`, `post`,
# `put`, `patch` without the usage of keyword arguments in your tests and
# change them to use keyword args. This cop only applies to Rails >= 5.
# If you are running Rails < 5 you should disable the
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/http_status.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/http_status.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/http_status.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_lazy_lookup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_lazy_lookup.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_lazy_lookup.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_lazy_lookup.rb
index d3093ea23d..9cc3709058 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_lazy_lookup.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_lazy_lookup.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for places where I18n "lazy" lookup can be used.
+ # Checks for places where I18n "lazy" lookup can be used.
#
# @example
# # en.yml
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_locale_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb
similarity index 94%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_locale_assignment.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb
index 6b3dfb9eaf..1f9e852d5a 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_locale_assignment.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of `I18n.locale=` method.
+ # Checks for the use of `I18n.locale=` method.
#
# The `locale` attribute persists for the rest of the Ruby runtime, potentially causing
# unexpected behavior at a later time.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_locale_texts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_locale_texts.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/i18n_locale_texts.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/i18n_locale_texts.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
index 05432756e7..57a2ca9847 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that `if` and `only` (or `except`) are not used together
+ # Checks that `if` and `only` (or `except`) are not used together
# as options of `skip_*` action filter.
#
# The `if` option will be ignored when `if` and `only` are used together.
@@ -80,7 +80,7 @@ module RuboCop
def options_hash(options)
options.pairs
.select { |pair| pair.key.sym_type? }
- .map { |pair| [pair.key.value, pair] }.to_h
+ .to_h { |pair| [pair.key.value, pair] }
end
def if_and_only?(options)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_by.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_by.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_by.rb
index 3f4db479ef..5de9a56f8e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_by.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_by.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for uses of `each_with_object({}) { ... }`,
+ # Looks for uses of `each_with_object({}) { ... }`,
# `map { ... }.to_h`, and `Hash[map { ... }]` that are transforming
# an enumerable into a hash where the values are the original elements.
# Rails provides the `index_by` method for this purpose.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_with.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_with.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_with.rb
index 5a9c033e09..2ef1b9fc70 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/index_with.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/index_with.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for uses of `each_with_object({}) { ... }`,
+ # Looks for uses of `each_with_object({}) { ... }`,
# `map { ... }.to_h`, and `Hash[map { ... }]` that are transforming
# an enumerable into a hash where the keys are the original elements.
# Rails provides the `index_with` method for this purpose.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inquiry.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inquiry.rb
similarity index 92%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inquiry.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inquiry.rb
index f5e215d4ae..a7933a9347 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inquiry.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inquiry.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that Active Support's `inquiry` method is not used.
+ # Checks that Active Support's `inquiry` method is not used.
#
# @example
# # bad - String#inquiry
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inverse_of.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inverse_of.rb
similarity index 99%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inverse_of.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inverse_of.rb
index 892d213e70..e80351a7de 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/inverse_of.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/inverse_of.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for has_(one|many) and belongs_to associations where
+ # Looks for has_(one|many) and belongs_to associations where
# Active Record can't automatically determine the inverse association
# because of a scope or the options used. Using the blog with order scope
# example below, traversing the a Blog's association in both directions
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
index 266d57e0d2..3b96591f88 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that methods specified in the filter's `only` or
+ # Checks that methods specified in the filter's `only` or
# `except` options are defined within the same class or module.
#
# @safety
@@ -12,7 +12,7 @@ module RuboCop
# methods that are defined in other classes or modules, you should
# define the filter in that class or module.
#
- # If you rely on behaviour defined in the superclass actions, you must
+ # If you rely on behavior defined in the superclass actions, you must
# remember to invoke `super` in the subclass actions.
#
# @example
@@ -71,7 +71,7 @@ module RuboCop
# class ArticlesController < ContentController
# before_action :load_article, only: [:update]
#
- # # the cop requires this method, but it relies on behaviour defined
+ # # the cop requires this method, but it relies on behavior defined
# # in the superclass, so needs to invoke `super`
# def update
# super
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/link_to_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/link_to_blank.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/link_to_blank.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/link_to_blank.rb
index 2938f619ce..a0c2899f99 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/link_to_blank.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/link_to_blank.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for calls to `link_to` that contain a
+ # Checks for calls to `link_to` that contain a
# `target: '_blank'` but no `rel: 'noopener'`. This can be a security
# risk as the loaded page will have control over the previous page
# and could change its location for phishing purposes.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/mailer_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/mailer_name.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/mailer_name.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/mailer_name.rb
index c5ab074ff5..e50ca97513 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/mailer_name.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/mailer_name.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces that mailer names end with `Mailer` suffix.
+ # Enforces that mailer names end with `Mailer` suffix.
#
# Without the `Mailer` suffix it isn't immediately apparent what's a mailer
# and which views are related to the mailer.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/match_route.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/match_route.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/match_route.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/match_route.rb
index a7c4525d00..e7c7b4c418 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/match_route.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/match_route.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies places where defining routes with `match`
+ # Identifies places where defining routes with `match`
# can be replaced with a specific HTTP method.
#
# Don't use `match` to define any routes unless there is a need to map multiple request types
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/migration_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/migration_class_name.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/migration_class_name.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/migration_class_name.rb
index e206cd1d6a..d204d450b4 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/migration_class_name.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/migration_class_name.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop makes sure that each migration file defines a migration class
+ # Makes sure that each migration file defines a migration class
# whose name matches the file name.
# (e.g. `20220224111111_create_users.rb` should define `CreateUsers` class.)
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/negate_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/negate_include.rb
similarity index 94%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/negate_include.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/negate_include.rb
index 34bd3f7d57..1aed7adf45 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/negate_include.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/negate_include.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the use of `collection.exclude?(obj)`
+ # Enforces the use of `collection.exclude?(obj)`
# over `!collection.include?(obj)`.
#
# @safety
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/not_null_column.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/not_null_column.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/not_null_column.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/not_null_column.rb
index a692cd3446..9c22495df5 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/not_null_column.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/not_null_column.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for add_column call with NOT NULL constraint
+ # Checks for add_column call with NOT NULL constraint
# in migration file.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/order_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/order_by_id.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/order_by_id.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/order_by_id.rb
index 62c1eae559..a4090b8d3d 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/order_by_id.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/order_by_id.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for places where ordering by `id` column is used.
+ # Checks for places where ordering by `id` column is used.
#
# Don't use the `id` column for ordering. The sequence of ids is not guaranteed
# to be in any particular order, despite often (incidentally) being chronological.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output.rb
index eff7b68c5c..655cef658e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of output calls like puts and print
+ # Checks for the use of output calls like puts and print
#
# @safety
# This cop's autocorrection is unsafe because depending on the Rails log level configuration,
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output_safety.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output_safety.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output_safety.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output_safety.rb
index 61de1c154e..869fa3030e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/output_safety.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/output_safety.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of output safety calls like `html_safe`,
+ # Checks for the use of output safety calls like `html_safe`,
# `raw`, and `safe_concat`. These methods do not escape content. They
# simply return a SafeBuffer containing the content as is. Instead,
# use `safe_join` to join content and escape it and concat to
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pick.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pick.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pick.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pick.rb
index f6ecd0a9e2..a13ba846f0 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pick.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pick.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the use of `pick` over `pluck(...).first`.
+ # Enforces the use of `pick` over `pluck(...).first`.
#
# Using `pluck` followed by `first` creates an intermediate array, which
# `pick` avoids. When called on an Active Record relation, `pick` adds a
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck.rb
index ffb42fb1fc..f8c3201135 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the use of `pluck` over `map`.
+ # Enforces the use of `pluck` over `map`.
#
# `pluck` can be used instead of `map` to extract a single key from each
# element in an enumerable. When called on an Active Record relation, it
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_id.rb
similarity index 93%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_id.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_id.rb
index 0193d5b284..4a99691f07 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_id.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_id.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the use of `ids` over `pluck(:id)` and `pluck(primary_key)`.
+ # Enforces the use of `ids` over `pluck(:id)` and `pluck(primary_key)`.
#
# @safety
# This cop is unsafe if the receiver object is not an Active Record object.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_in_where.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_in_where.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_in_where.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_in_where.rb
index 145b0bd4bd..1da5967386 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluck_in_where.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluck_in_where.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies places where `pluck` is used in `where` query methods
+ # Identifies places where `pluck` is used in `where` query methods
# and can be replaced with `select`.
#
# Since `pluck` is an eager method and hits the database immediately,
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluralization_grammar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluralization_grammar.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluralization_grammar.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluralization_grammar.rb
index 9635a780f2..24f6f1e660 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/pluralization_grammar.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/pluralization_grammar.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for correct grammar when using ActiveSupport's
+ # Checks for correct grammar when using ActiveSupport's
# core extensions to the numeric classes.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/presence.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/presence.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/presence.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/presence.rb
index feea8e313d..2fbba874c1 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/presence.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/presence.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks code that can be written more easily using
+ # Checks code that can be written more easily using
# `Object#presence` defined by Active Support.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/present.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/present.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/present.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/present.rb
index 60c46fb128..55b5bd923e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/present.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/present.rb
@@ -3,13 +3,13 @@
module RuboCop
module Cop
module Rails
- # This cop checks for code that can be written with simpler conditionals
+ # Checks for code that can be written with simpler conditionals
# using `Object#present?` defined by Active Support.
#
# Interaction with `Style/UnlessElse`:
# The configuration of `NotBlank` will not produce an offense in the
# context of `unless else` if `Style/UnlessElse` is inabled. This is
- # to prevent interference between the auto-correction of the two cops.
+ # to prevent interference between the autocorrection of the two cops.
#
# @example NotNilAndNotEmpty: true (default)
# # Converts usages of `!nil? && !empty?` to `present?`
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/rake_environment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/rake_environment.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/rake_environment.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/rake_environment.rb
index f750732676..fdb6f76924 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/rake_environment.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/rake_environment.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for Rake tasks without the `:environment` task
+ # Checks for Rake tasks without the `:environment` task
# dependency. The `:environment` task loads application code for other
# Rake tasks. Without it, tasks cannot make use of application code like
# models.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/read_write_attribute.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/read_write_attribute.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/read_write_attribute.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/read_write_attribute.rb
index a399c41a9a..1f481a1777 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/read_write_attribute.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/read_write_attribute.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of the `read_attribute` or `write_attribute`
+ # Checks for the use of the `read_attribute` or `write_attribute`
# methods and recommends square brackets instead.
#
# If an attribute is missing from the instance (for example, when
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_allow_nil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_allow_nil.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_allow_nil.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_allow_nil.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_foreign_key.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_foreign_key.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_foreign_key.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_foreign_key.rb
index b52a03fcf9..e32d207aa1 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_foreign_key.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_foreign_key.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop detects cases where the `:foreign_key` option on associations
+ # Detects cases where the `:foreign_key` option on associations
# is redundant.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
index 7dcbb62b86..f289e76217 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for redundant receiver in `with_options`.
+ # Checks for redundant receiver in `with_options`.
# Receiver is implicit from Rails 4.2 or higher.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_travel_back.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_travel_back.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_travel_back.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_travel_back.rb
index 729b620ff0..f26c08677d 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/redundant_travel_back.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/redundant_travel_back.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for redundant `travel_back` calls.
+ # Checks for redundant `travel_back` calls.
# Since Rails 5.2, `travel_back` is automatically called at the end of the test.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reflection_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reflection_class_name.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reflection_class_name.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reflection_class_name.rb
index 69ffac76df..2de89b84ac 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reflection_class_name.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reflection_class_name.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks if the value of the option `class_name`, in
+ # Checks if the value of the option `class_name`, in
# the definition of a reflection is a string.
#
# @safety
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/refute_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/refute_methods.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/refute_methods.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/refute_methods.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/relative_date_constant.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/relative_date_constant.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/relative_date_constant.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/relative_date_constant.rb
index 71488de21e..ac57ef0350 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/relative_date_constant.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/relative_date_constant.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks whether constant value isn't relative date.
+ # Checks whether constant value isn't relative date.
# Because the relative date will be evaluated only once.
#
# @safety
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_inline.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_inline.rb
similarity index 93%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_inline.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_inline.rb
index 875ddf669b..6d7db676c2 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_inline.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_inline.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop looks for inline rendering within controller actions.
+ # Looks for inline rendering within controller actions.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_plain_text.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_plain_text.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_plain_text.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_plain_text.rb
index e4d271f7eb..0736bb3c28 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/render_plain_text.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/render_plain_text.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies places where `render text:` can be
+ # Identifies places where `render text:` can be
# replaced with `render plain:`.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/request_referer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/request_referer.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/request_referer.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/request_referer.rb
index 4c30ab65ce..4ad0f3a237 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/request_referer.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/request_referer.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for consistent uses of `request.referer` or
+ # Checks for consistent uses of `request.referer` or
# `request.referrer`, depending on the cop's configuration.
#
# @example EnforcedStyle: referer (default)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/require_dependency.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/require_dependency.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/require_dependency.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/require_dependency.rb
index a72771d810..f6e444a4e6 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/require_dependency.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/require_dependency.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the usage of `require_dependency`.
+ # Checks for the usage of `require_dependency`.
#
# `require_dependency` is an obsolete method for Rails applications running in Zeitwerk mode.
# In Zeitwerk mode, the semantics should match Ruby's and no need to be defensive with load order,
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration.rb
similarity index 99%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration.rb
index f462ee0cbe..ceb9940379 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks whether the change method of the migration file is
+ # Checks whether the change method of the migration file is
# reversible.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration_method_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb
similarity index 84%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration_method_definition.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb
index c2ea3a558c..acc506cadf 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/reversible_migration_method_definition.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks whether the migration implements
+ # Checks whether the migration implements
# either a `change` method or both an `up` and a `down`
# method.
#
@@ -49,15 +49,15 @@ module RuboCop
'both an `up` and a `down` method.'
def_node_matcher :change_method?, <<~PATTERN
- [ #migration_class? `(def :change (args) _) ]
+ `(def :change (args) _)
PATTERN
def_node_matcher :up_and_down_methods?, <<~PATTERN
- [ #migration_class? `(def :up (args) _) `(def :down (args) _) ]
+ [`(def :up (args) _) `(def :down (args) _)]
PATTERN
def on_class(node)
- return if change_method?(node) || up_and_down_methods?(node)
+ return if !migration_class?(node) || change_method?(node) || up_and_down_methods?(node)
add_offense(node)
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/root_join_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/root_join_chain.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/root_join_chain.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/root_join_chain.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/root_public_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/root_public_path.rb
new file mode 100644
index 0000000000..78448c6f59
--- /dev/null
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/root_public_path.rb
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+module RuboCop
+ module Cop
+ module Rails
+ # Favor `Rails.public_path` over `Rails.root` with `'public'`
+ #
+ # @example
+ # # bad
+ # Rails.root.join('public')
+ # Rails.root.join('public/file.pdf')
+ # Rails.root.join('public', 'file.pdf')
+ #
+ # # good
+ # Rails.public_path
+ # Rails.public_path.join('file.pdf')
+ # Rails.public_path.join('file.pdf')
+ #
+ class RootPublicPath < Base
+ extend AutoCorrector
+
+ MSG = 'Use `Rails.public_path`.'
+
+ RESTRICT_ON_SEND = %i[join].to_set.freeze
+
+ PATTERN = %r{\Apublic(/|\z)}.freeze
+
+ def_node_matcher :rails_root_public, <<~PATTERN
+ (send
+ (send
+ $(const {nil? cbase} :Rails) :root) :join
+ (str $#public_path?) $...)
+ PATTERN
+
+ def on_send(node)
+ return unless (rails, maybe_public_path, other_args = rails_root_public(node))
+
+ add_offense(node) do |corrector|
+ first_args = maybe_public_path.gsub(PATTERN, '')
+
+ args = other_args.map(&:source)
+ args.unshift("'#{first_args}'") unless first_args.empty?
+
+ replacement = "#{rails.source}.public_path"
+ replacement += ".join(#{args.join(', ')})" unless args.empty?
+
+ corrector.replace(node, replacement)
+ end
+ end
+
+ private
+
+ def public_path?(string)
+ PATTERN.match?(string)
+ end
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation.rb
similarity index 84%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation.rb
index b5e67e4d74..c75ee8ac64 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation.rb
@@ -3,8 +3,9 @@
module RuboCop
module Cop
module Rails
- # This cop converts usages of `try!` to `&.`. It can also be configured
- # to convert `try`. It will convert code to use safe navigation.
+ # Converts usages of `try!` to `&.`. It can also be configured
+ # to convert `try`. It will convert code to use safe navigation
+ # if the target Ruby version is set to 2.3+
#
# @example ConvertTry: false (default)
# # bad
@@ -39,6 +40,9 @@ module RuboCop
class SafeNavigation < Base
include RangeHelp
extend AutoCorrector
+ extend TargetRubyVersion
+
+ minimum_target_ruby_version 2.3
MSG = 'Use safe navigation (`&.`) instead of `%s`.'
RESTRICT_ON_SEND = %i[try try!].freeze
@@ -47,15 +51,6 @@ module RuboCop
(send _ ${:try :try!} $_ ...)
PATTERN
- # Monkey patching for `Style/RedundantSelf` of RuboCop core.
- # rubocop:disable Style/ClassAndModuleChildren
- class Style::RedundantSelf
- def self.autocorrect_incompatible_with
- [Rails::SafeNavigation]
- end
- end
- # rubocop:enable Style/ClassAndModuleChildren
-
def self.autocorrect_incompatible_with
[Style::RedundantSelf]
end
@@ -75,7 +70,7 @@ module RuboCop
def autocorrect(corrector, node)
method_node, *params = *node.arguments
- method = method_node.source[1..-1]
+ method = method_node.source[1..]
range = if node.receiver
range_between(node.loc.dot.begin_pos, node.loc.expression.end_pos)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation_with_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation_with_blank.rb
similarity index 94%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation_with_blank.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation_with_blank.rb
index 99067f4d7e..37cb73474e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/safe_navigation_with_blank.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/safe_navigation_with_blank.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks to make sure safe navigation isn't used with `blank?` in
+ # Checks to make sure safe navigation isn't used with `blank?` in
# a conditional.
#
# @safety
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/save_bang.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/save_bang.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/save_bang.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/save_bang.rb
index c4d7cbc3b9..da2b0cc7bd 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/save_bang.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/save_bang.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies possible cases where Active Record save! or related
+ # Identifies possible cases where Active Record save! or related
# should be used instead of save because the model might have failed to
# save and an exception is better than unhandled failure.
#
@@ -37,7 +37,7 @@ module RuboCop
#
# update_attributes
#
- # # After running rubocop --safe-auto-correct
+ # # After running rubocop --safe-autocorrect
# def update_attributes
# end
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/schema_comment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/schema_comment.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/schema_comment.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/schema_comment.rb
index 5920823d60..0e1c23028d 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/schema_comment.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/schema_comment.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces the use of the `comment` option when adding a new table or column
+ # Enforces the use of the `comment` option when adding a new table or column
# to the database during a migration.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/scope_args.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/scope_args.rb
similarity index 93%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/scope_args.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/scope_args.rb
index 04e6095399..100007b7b4 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/scope_args.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/scope_args.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for scope calls where it was passed
+ # Checks for scope calls where it was passed
# a method (usually a scope) instead of a lambda/proc.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/short_i18n.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/short_i18n.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/short_i18n.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/short_i18n.rb
index fc8c04aee9..82152a1580 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/short_i18n.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/short_i18n.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces that short forms of `I18n` methods are used:
+ # Enforces that short forms of `I18n` methods are used:
# `t` instead of `translate` and `l` instead of `localize`.
#
# This cop has two different enforcement modes. When the EnforcedStyle
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/skips_model_validations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/skips_model_validations.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/skips_model_validations.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/skips_model_validations.rb
index 1747a793f5..16266c2d86 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/skips_model_validations.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/skips_model_validations.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of methods which skip
+ # Checks for the use of methods which skip
# validations which are listed in
# https://guides.rubyonrails.org/active_record_validations.html#skipping-validations
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/squished_sql_heredocs.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/squished_sql_heredocs.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb
index 6a93980fbb..ec36e3be85 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/squished_sql_heredocs.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb
@@ -8,7 +8,7 @@ module RuboCop
#
# @safety
# Some SQL syntax (e.g. PostgreSQL comments and functions) requires newlines
- # to be preserved in order to work, thus auto-correction for this cop is not safe.
+ # to be preserved in order to work, thus autocorrection for this cop is not safe.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/strip_heredoc.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/strip_heredoc.rb
new file mode 100644
index 0000000000..1c26b83839
--- /dev/null
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/strip_heredoc.rb
@@ -0,0 +1,56 @@
+# frozen_string_literal: true
+
+module RuboCop
+ module Cop
+ module Rails
+ # Enforces the use of squiggly heredoc over `strip_heredoc`.
+ #
+ # @example
+ #
+ # # bad
+ # <= 7, where transactions
# exitted using these statements are being rollbacked rather than
@@ -29,6 +29,11 @@ module RuboCop
# throw if user.active?
# end
#
+ # # bad, as `with_lock` implicitly opens a transaction too
+ # user.with_lock do
+ # throw if user.active?
+ # end
+ #
# # good
# ApplicationRecord.transaction do
# # Rollback
@@ -47,18 +52,26 @@ module RuboCop
Exit statement `%s` is not allowed. Use `raise` (rollback) or `next` (commit).
MSG
- RESTRICT_ON_SEND = %i[transaction].freeze
+ RESTRICT_ON_SEND = %i[transaction with_lock].freeze
def_node_search :exit_statements, <<~PATTERN
({return | break | send nil? :throw} ...)
PATTERN
+ def_node_matcher :rescue_body_return_node?, <<~PATTERN
+ (:resbody ...
+ ...
+ ({return | break | send nil? :throw} ...)
+ ...
+ )
+ PATTERN
+
def on_send(node)
return unless (parent = node.parent)
return unless parent.block_type? && parent.body
exit_statements(parent.body).each do |statement_node|
- next if in_rescue?(statement_node) || nested_block?(statement_node)
+ next if statement_node.break_type? && nested_block?(statement_node)
statement = statement(statement_node)
message = format(MSG, statement: statement)
@@ -79,13 +92,7 @@ module RuboCop
end
end
- def in_rescue?(statement_node)
- statement_node.ancestors.find(&:rescue_type?)
- end
-
def nested_block?(statement_node)
- return false unless statement_node.break_type?
-
!statement_node.ancestors.find(&:block_type?).method?(:transaction)
end
end
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/uniq_before_pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/uniq_before_pluck.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/uniq_before_pluck.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/uniq_before_pluck.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unique_validation_without_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unique_validation_without_index.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unique_validation_without_index.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unique_validation_without_index.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unknown_env.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unknown_env.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unknown_env.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unknown_env.rb
index 0cf5ff2bf8..42020b4155 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unknown_env.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unknown_env.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks that environments called with `Rails.env` predicates
+ # Checks that environments called with `Rails.env` predicates
# exist.
# By default the cop allows three environments which Rails ships with:
# `development`, `test`, and `production`.
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unused_ignored_columns.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unused_ignored_columns.rb
similarity index 94%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unused_ignored_columns.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unused_ignored_columns.rb
index a8d075e71f..02a0caa4c6 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/unused_ignored_columns.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/unused_ignored_columns.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop suggests you remove a column that does not exist in the schema from `ignored_columns`.
+ # Suggests you remove a column that does not exist in the schema from `ignored_columns`.
# `ignored_columns` is necessary to drop a column from RDBMS, but you don't need it after the migration
# to drop the column. You avoid forgetting to remove `ignored_columns` by this cop.
#
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/validation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/validation.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/validation.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/validation.rb
index 27231977a3..29f5f33629 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/validation.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/validation.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop checks for the use of old-style attribute validation macros.
+ # Checks for the use of old-style attribute validation macros.
#
# @example
# # bad
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_equals.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_equals.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_equals.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_equals.rb
index 8dfb79120b..217e83a711 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_equals.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_equals.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies places where manually constructed SQL
+ # Identifies places where manually constructed SQL
# in `where` can be replaced with `where(attribute: value)`.
#
# @safety
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_exists.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_exists.rb
similarity index 95%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_exists.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_exists.rb
index 71d33ff62d..65b32cb467 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_exists.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_exists.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop enforces consistent style when using `exists?`.
+ # Enforces consistent style when using `exists?`.
#
# Two styles are supported for this cop. When EnforcedStyle is 'exists'
# then the cop enforces `exists?(...)` over `where(...).exists?`.
@@ -12,7 +12,7 @@ module RuboCop
# `where(...).exists?` over `exists?(...)`.
#
# @safety
- # This cop is unsafe for auto-correction because the behavior may change on the following case:
+ # This cop is unsafe for autocorrection because the behavior may change on the following case:
#
# [source,ruby]
# ----
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_not.rb
similarity index 98%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_not.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_not.rb
index f50f4c01a4..126b7926fa 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails/where_not.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails/where_not.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
module Rails
- # This cop identifies places where manually constructed SQL
+ # Identifies places where manually constructed SQL
# in `where` can be replaced with `where.not(...)`.
#
# @example
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails_cops.rb
similarity index 96%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails_cops.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails_cops.rb
index 0615c7a2f9..cf7c6c5769 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/cop/rails_cops.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/cop/rails_cops.rb
@@ -34,6 +34,7 @@ require_relative 'rails/default_scope'
require_relative 'rails/delegate'
require_relative 'rails/delegate_allow_blank'
require_relative 'rails/deprecated_active_model_errors_methods'
+require_relative 'rails/dot_separated_keys'
require_relative 'rails/duplicate_association'
require_relative 'rails/duplicate_scope'
require_relative 'rails/duration_arithmetic'
@@ -96,6 +97,7 @@ require_relative 'rails/require_dependency'
require_relative 'rails/reversible_migration'
require_relative 'rails/reversible_migration_method_definition'
require_relative 'rails/root_join_chain'
+require_relative 'rails/root_public_path'
require_relative 'rails/safe_navigation'
require_relative 'rails/safe_navigation_with_blank'
require_relative 'rails/save_bang'
@@ -104,9 +106,11 @@ require_relative 'rails/scope_args'
require_relative 'rails/short_i18n'
require_relative 'rails/skips_model_validations'
require_relative 'rails/squished_sql_heredocs'
+require_relative 'rails/strip_heredoc'
require_relative 'rails/table_name_assignment'
require_relative 'rails/time_zone'
require_relative 'rails/time_zone_assignment'
+require_relative 'rails/to_formatted_s'
require_relative 'rails/transaction_exit_statement'
require_relative 'rails/uniq_before_pluck'
require_relative 'rails/unique_validation_without_index'
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/inject.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/inject.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/inject.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/schema_loader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/schema_loader.rb
similarity index 100%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/schema_loader.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/schema_loader.rb
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/schema_loader/schema.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/schema_loader/schema.rb
similarity index 97%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/schema_loader/schema.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/schema_loader/schema.rb
index 8c9b62022f..e4d13f82b6 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/schema_loader/schema.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/schema_loader/schema.rb
@@ -32,6 +32,8 @@ module RuboCop
raise "Unexpected type: #{ast.type}" unless ast.block_type?
each_table(ast) do |table_def|
+ next unless table_def.method?(:create_table)
+
@tables << Table.new(table_def)
end
@@ -56,6 +58,7 @@ module RuboCop
def each_add_index(ast)
ast.body.children.each do |node|
+ next unless node.respond_to?(:send_type?)
next if !node&.send_type? || !node.method?(:add_index)
yield(node)
diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/version.rb
similarity index 90%
rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/version.rb
rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/version.rb
index 3be9b485c1..f3839c5b2e 100644
--- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.14.2/lib/rubocop/rails/version.rb
+++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.15.0/lib/rubocop/rails/version.rb
@@ -4,7 +4,7 @@ module RuboCop
module Rails
# This module holds the RuboCop Rails version information.
module Version
- STRING = '2.14.2'
+ STRING = '2.15.0'
def self.document_version
STRING.match('\d+\.\d+').to_s