From ab5f32a901e67e05cd92e1b92ed0d7a73decba57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:03:13 +0000 Subject: [PATCH 1/3] build(deps): bump rubocop-rails in /Library/Homebrew Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.11.3 to 2.12.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.11.3...v2.12.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index c3e3b7e155..d4821a1844 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -126,7 +126,7 @@ GEM rubocop-performance (1.11.5) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.11.3) + rubocop-rails (2.12.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) From c4ac617a8658a25e018e4a097bda442107c54cd5 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:06:25 +0000 Subject: [PATCH 2/3] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../lib/rubocop/cop/rails/content_tag.rb | 84 ------------------ .../config/default.yml | 14 ++- .../config/obsoletion.yml | 0 .../lib/rubocop-rails.rb | 0 .../rubocop/cop/mixin/active_record_helper.rb | 0 .../rubocop/cop/mixin/enforce_superclass.rb | 0 .../lib/rubocop/cop/mixin/index_method.rb | 0 .../rubocop/cop/mixin/target_rails_version.rb | 0 .../lib/rubocop/cop/rails/action_filter.rb | 0 .../cop/rails/active_record_aliases.rb | 0 .../rails/active_record_callbacks_order.rb | 0 .../cop/rails/active_record_override.rb | 0 .../cop/rails/active_support_aliases.rb | 0 .../lib/rubocop/cop/rails/add_column_index.rb | 0 .../cop/rails/after_commit_override.rb | 0 .../cop/rails/application_controller.rb | 0 .../lib/rubocop/cop/rails/application_job.rb | 0 .../rubocop/cop/rails/application_mailer.rb | 0 .../rubocop/cop/rails/application_record.rb | 0 .../lib/rubocop/cop/rails/arel_star.rb | 0 .../lib/rubocop/cop/rails/assert_not.rb | 0 .../rails/attribute_default_block_value.rb | 0 .../lib/rubocop/cop/rails/belongs_to.rb | 0 .../lib/rubocop/cop/rails/blank.rb | 0 .../rubocop/cop/rails/bulk_change_table.rb | 0 .../lib/rubocop/cop/rails/content_tag.rb | 87 +++++++++++++++++++ .../cop/rails/create_table_with_timestamps.rb | 0 .../lib/rubocop/cop/rails/date.rb | 0 .../lib/rubocop/cop/rails/default_scope.rb | 0 .../lib/rubocop/cop/rails/delegate.rb | 2 +- .../rubocop/cop/rails/delegate_allow_blank.rb | 0 .../lib/rubocop/cop/rails/dynamic_find_by.rb | 2 +- .../cop/rails/eager_evaluation_log_message.rb | 0 .../lib/rubocop/cop/rails/enum_hash.rb | 0 .../lib/rubocop/cop/rails/enum_uniqueness.rb | 0 .../cop/rails/environment_comparison.rb | 0 .../cop/rails/environment_variable_access.rb | 0 .../lib/rubocop/cop/rails/exit.rb | 0 .../rubocop/cop/rails/expanded_date_range.rb | 0 .../lib/rubocop/cop/rails/file_path.rb | 0 .../lib/rubocop/cop/rails/find_by.rb | 0 .../lib/rubocop/cop/rails/find_by_id.rb | 0 .../lib/rubocop/cop/rails/find_each.rb | 0 .../cop/rails/has_and_belongs_to_many.rb | 0 .../rails/has_many_or_has_one_dependent.rb | 2 + .../cop/rails/helper_instance_variable.rb | 0 .../cop/rails/http_positional_arguments.rb | 9 +- .../lib/rubocop/cop/rails/http_status.rb | 0 .../cop/rails/i18n_locale_assignment.rb | 0 .../ignored_skip_action_filter_option.rb | 0 .../lib/rubocop/cop/rails/index_by.rb | 0 .../lib/rubocop/cop/rails/index_with.rb | 0 .../lib/rubocop/cop/rails/inquiry.rb | 0 .../lib/rubocop/cop/rails/inverse_of.rb | 0 .../rails/lexically_scoped_action_filter.rb | 25 +++++- .../lib/rubocop/cop/rails/link_to_blank.rb | 4 +- .../lib/rubocop/cop/rails/mailer_name.rb | 0 .../lib/rubocop/cop/rails/match_route.rb | 0 .../lib/rubocop/cop/rails/negate_include.rb | 0 .../lib/rubocop/cop/rails/not_null_column.rb | 0 .../lib/rubocop/cop/rails/order_by_id.rb | 0 .../lib/rubocop/cop/rails/output.rb | 20 ++++- .../lib/rubocop/cop/rails/output_safety.rb | 0 .../lib/rubocop/cop/rails/pick.rb | 0 .../lib/rubocop/cop/rails/pluck.rb | 0 .../lib/rubocop/cop/rails/pluck_id.rb | 0 .../lib/rubocop/cop/rails/pluck_in_where.rb | 0 .../cop/rails/pluralization_grammar.rb | 4 +- .../lib/rubocop/cop/rails/presence.rb | 0 .../lib/rubocop/cop/rails/present.rb | 0 .../lib/rubocop/cop/rails/rake_environment.rb | 0 .../rubocop/cop/rails/read_write_attribute.rb | 0 .../rubocop/cop/rails/redundant_allow_nil.rb | 0 .../cop/rails/redundant_foreign_key.rb | 0 .../redundant_receiver_in_with_options.rb | 0 .../cop/rails/redundant_travel_back.rb | 57 ++++++++++++ .../cop/rails/reflection_class_name.rb | 0 .../lib/rubocop/cop/rails/refute_methods.rb | 0 .../cop/rails/relative_date_constant.rb | 0 .../lib/rubocop/cop/rails/render_inline.rb | 0 .../rubocop/cop/rails/render_plain_text.rb | 0 .../lib/rubocop/cop/rails/request_referer.rb | 0 .../rubocop/cop/rails/require_dependency.rb | 0 .../rubocop/cop/rails/reversible_migration.rb | 4 +- .../reversible_migration_method_definition.rb | 0 .../lib/rubocop/cop/rails/safe_navigation.rb | 0 .../cop/rails/safe_navigation_with_blank.rb | 0 .../lib/rubocop/cop/rails/save_bang.rb | 0 .../lib/rubocop/cop/rails/scope_args.rb | 6 +- .../lib/rubocop/cop/rails/short_i18n.rb | 0 .../cop/rails/skips_model_validations.rb | 0 .../cop/rails/squished_sql_heredocs.rb | 0 .../lib/rubocop/cop/rails/time_zone.rb | 0 .../rubocop/cop/rails/time_zone_assignment.rb | 0 .../rubocop/cop/rails/uniq_before_pluck.rb | 0 .../rails/unique_validation_without_index.rb | 0 .../lib/rubocop/cop/rails/unknown_env.rb | 0 .../cop/rails/unused_ignored_columns.rb | 0 .../lib/rubocop/cop/rails/validation.rb | 0 .../lib/rubocop/cop/rails/where_equals.rb | 0 .../lib/rubocop/cop/rails/where_exists.rb | 0 .../lib/rubocop/cop/rails/where_not.rb | 0 .../lib/rubocop/cop/rails_cops.rb | 1 + .../lib/rubocop/rails.rb | 0 .../lib/rubocop/rails/inject.rb | 0 .../lib/rubocop/rails/schema_loader.rb | 0 .../lib/rubocop/rails/schema_loader/schema.rb | 0 .../lib/rubocop/rails/version.rb | 2 +- 109 files changed, 223 insertions(+), 102 deletions(-) delete mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/content_tag.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/config/default.yml (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/config/obsoletion.yml (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop-rails.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/mixin/active_record_helper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/mixin/enforce_superclass.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/mixin/index_method.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/mixin/target_rails_version.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/action_filter.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/active_record_aliases.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/active_record_callbacks_order.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/active_record_override.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/active_support_aliases.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/add_column_index.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/after_commit_override.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/application_controller.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/application_job.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/application_mailer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/application_record.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/arel_star.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/assert_not.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/attribute_default_block_value.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/belongs_to.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/bulk_change_table.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/content_tag.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/create_table_with_timestamps.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/date.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/default_scope.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/delegate.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/delegate_allow_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/dynamic_find_by.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/eager_evaluation_log_message.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/enum_hash.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/enum_uniqueness.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/environment_comparison.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/environment_variable_access.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/exit.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/expanded_date_range.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/file_path.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/find_by.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/find_by_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/find_each.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/has_and_belongs_to_many.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/helper_instance_variable.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/http_positional_arguments.rb (93%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/http_status.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/i18n_locale_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/index_by.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/index_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/inquiry.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/inverse_of.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb (85%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/link_to_blank.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/mailer_name.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/match_route.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/negate_include.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/not_null_column.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/order_by_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/output.rb (70%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/output_safety.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/pick.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/pluck.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/pluck_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/pluck_in_where.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/pluralization_grammar.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/presence.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/present.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/rake_environment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/read_write_attribute.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/redundant_allow_nil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/redundant_foreign_key.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_travel_back.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/reflection_class_name.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/refute_methods.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/relative_date_constant.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/render_inline.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/render_plain_text.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/request_referer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/require_dependency.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/reversible_migration.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/reversible_migration_method_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/safe_navigation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/safe_navigation_with_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/save_bang.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/scope_args.rb (80%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/short_i18n.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/skips_model_validations.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/squished_sql_heredocs.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/time_zone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/time_zone_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/uniq_before_pluck.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/unique_validation_without_index.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/unknown_env.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/unused_ignored_columns.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/validation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/where_equals.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/where_exists.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails/where_not.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/cop/rails_cops.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/rails.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/rails/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/rails/schema_loader.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/rails/schema_loader/schema.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.11.3 => rubocop-rails-2.12.0}/lib/rubocop/rails/version.rb (90%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index b300623b1e..9a75fc77de 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -83,7 +83,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11 $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.20.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.5/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.3/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.12.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/content_tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/content_tag.rb deleted file mode 100644 index 47f519ffee..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/content_tag.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module Rails - # This cop checks that `tag` is used instead of `content_tag` - # because `content_tag` is legacy syntax. - # - # NOTE: Allow `content_tag` when the first argument is a variable because - # `content_tag(name)` is simpler rather than `tag.public_send(name)`. - # - # @example - # # bad - # content_tag(:p, 'Hello world!') - # content_tag(:br) - # - # # good - # tag.p('Hello world!') - # tag.br - # content_tag(name, 'Hello world!') - class ContentTag < Base - include RangeHelp - extend AutoCorrector - extend TargetRailsVersion - - minimum_target_rails_version 5.1 - - MSG = 'Use `tag` instead of `content_tag`.' - RESTRICT_ON_SEND = %i[content_tag].freeze - - def on_new_investigation - @corrected_nodes = nil - end - - def on_send(node) - first_argument = node.first_argument - return if !first_argument || - allowed_argument?(first_argument) || - corrected_ancestor?(node) - - add_offense(node) do |corrector| - autocorrect(corrector, node) - - @corrected_nodes ||= Set.new.compare_by_identity - @corrected_nodes.add(node) - end - end - - private - - def corrected_ancestor?(node) - node.each_ancestor(:send).any? { |ancestor| @corrected_nodes&.include?(ancestor) } - end - - def allowed_argument?(argument) - argument.variable? || argument.send_type? || argument.const_type? || argument.splat_type? - end - - def autocorrect(corrector, node) - if method_name?(node.first_argument) - range = correction_range(node) - - rest_args = node.arguments.drop(1) - replacement = "tag.#{node.first_argument.value.to_s.underscore}(#{rest_args.map(&:source).join(', ')})" - - corrector.replace(range, replacement) - else - corrector.replace(node.loc.selector, 'tag') - end - end - - def method_name?(node) - return false unless node.str_type? || node.sym_type? - - /^[a-zA-Z_][a-zA-Z_\-0-9]*$/.match?(node.value) - end - - def correction_range(node) - range_between(node.loc.selector.begin_pos, node.loc.expression.end_pos) - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/config/default.yml similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/config/default.yml index 27e926b27d..6676ca47b0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/config/default.yml @@ -181,12 +181,14 @@ Rails/BulkChangeTable: - db/migrate/*.rb Rails/ContentTag: - Description: 'Use `tag` instead of `content_tag`.' + Description: 'Use `tag.something` instead of `tag(:something)`.' Reference: + - 'https://github.com/rubocop/rubocop-rails/issues/260' - 'https://github.com/rails/rails/issues/25195' - 'https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag' Enabled: true VersionAdded: '2.6' + VersionChanged: '2.12' Rails/CreateTableWithTimestamps: Description: >- @@ -499,6 +501,7 @@ Rails/OrderById: Rails/Output: Description: 'Checks for calls to puts, print, etc.' Enabled: true + SafeAutoCorrect: false VersionAdded: '0.15' VersionChanged: '0.19' Include: @@ -607,6 +610,14 @@ Rails/RedundantReceiverInWithOptions: Enabled: true VersionAdded: '0.52' +Rails/RedundantTravelBack: + Description: This cop checks for redundant `travel_back` calls. + Enabled: pending + VersionAdded: '2.12' + Include: + - spec/**/*.rb + - test/**/*.rb + Rails/ReflectionClassName: Description: 'Use a string for `class_name` option value in the definition of a reflection.' Enabled: true @@ -713,6 +724,7 @@ Rails/ScopeArgs: Description: 'Checks the arguments of ActiveRecord scopes.' Enabled: true VersionAdded: '0.19' + VersionChanged: '2.12' Include: - app/models/**/*.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/config/obsoletion.yml similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/config/obsoletion.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/config/obsoletion.yml diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop-rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop-rails.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop-rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop-rails.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/mixin/active_record_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/mixin/active_record_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/mixin/active_record_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/mixin/enforce_superclass.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/mixin/enforce_superclass.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/mixin/enforce_superclass.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/mixin/index_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/mixin/index_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/mixin/index_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/mixin/target_rails_version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/mixin/target_rails_version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/mixin/target_rails_version.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/action_filter.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/action_filter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_record_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/active_record_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_record_aliases.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_record_callbacks_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_record_callbacks_order.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_record_callbacks_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_record_callbacks_order.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_record_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/active_record_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_record_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_support_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_support_aliases.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/active_support_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/active_support_aliases.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/add_column_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/add_column_index.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/add_column_index.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/add_column_index.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/after_commit_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/after_commit_override.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/after_commit_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/after_commit_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_controller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_controller.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_controller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_controller.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_job.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_job.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_job.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_job.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_mailer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_mailer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_mailer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_mailer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_record.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_record.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/application_record.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/application_record.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/arel_star.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/arel_star.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/arel_star.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/arel_star.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/assert_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/assert_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/assert_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/attribute_default_block_value.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/attribute_default_block_value.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/attribute_default_block_value.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/attribute_default_block_value.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/belongs_to.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/belongs_to.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/belongs_to.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/bulk_change_table.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/bulk_change_table.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/bulk_change_table.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/bulk_change_table.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/content_tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/content_tag.rb new file mode 100644 index 0000000000..8c8eb33e39 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/content_tag.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop 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)`. + # And this cop will be renamed to something like `LegacyTag` in the future. (e.g. RuboCop Rails 2.0) + # + # @example + # # bad + # tag(:p) + # tag(:br, class: 'classname') + # + # # good + # tag.p + # tag.br(class: 'classname') + # tag(name, class: 'classname') + class ContentTag < Base + include RangeHelp + extend AutoCorrector + extend TargetRailsVersion + + minimum_target_rails_version 5.1 + + MSG = 'Use `tag.%s` instead of `tag(%s)`.' + RESTRICT_ON_SEND = %i[tag].freeze + + def on_new_investigation + @corrected_nodes = nil + end + + def on_send(node) + first_argument = node.first_argument + return if !first_argument || + allowed_argument?(first_argument) || + corrected_ancestor?(node) + + preferred_method = node.first_argument.value.to_s.underscore + message = format(MSG, preferred_method: preferred_method, current_argument: first_argument.source) + + add_offense(node, message: message) do |corrector| + autocorrect(corrector, node, preferred_method) + + @corrected_nodes ||= Set.new.compare_by_identity + @corrected_nodes.add(node) + end + end + + private + + def corrected_ancestor?(node) + node.each_ancestor(:send).any? { |ancestor| @corrected_nodes&.include?(ancestor) } + end + + def allowed_argument?(argument) + argument.variable? || + argument.send_type? || + argument.const_type? || + argument.splat_type? || + allowed_name?(argument) + end + + def autocorrect(corrector, node, preferred_method) + range = correction_range(node) + + rest_args = node.arguments.drop(1) + replacement = "tag.#{preferred_method}(#{rest_args.map(&:source).join(', ')})" + + corrector.replace(range, replacement) + end + + def allowed_name?(argument) + return false unless argument.str_type? || argument.sym_type? + + !/^[a-zA-Z\-][a-zA-Z\-0-9]*$/.match?(argument.value) + end + + def correction_range(node) + range_between(node.loc.selector.begin_pos, node.loc.expression.end_pos) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/create_table_with_timestamps.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/create_table_with_timestamps.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/create_table_with_timestamps.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/create_table_with_timestamps.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/date.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/date.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/date.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/date.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/default_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/default_scope.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/default_scope.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/default_scope.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/delegate.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/delegate.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/delegate.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/delegate.rb index 0e1bb5907c..69be94405b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/delegate.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/delegate.rb @@ -100,7 +100,7 @@ module RuboCop def method_name_matches?(method_name, body) method_name == body.method_name || - include_prefix_case? && method_name == prefixed_method_name(body) + (include_prefix_case? && method_name == prefixed_method_name(body)) end def include_prefix_case? diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/delegate_allow_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/delegate_allow_blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/delegate_allow_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/delegate_allow_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/dynamic_find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/dynamic_find_by.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/dynamic_find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/dynamic_find_by.rb index 75358c8367..1ef798f9cc 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/dynamic_find_by.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/dynamic_find_by.rb @@ -40,7 +40,7 @@ module RuboCop IGNORED_ARGUMENT_TYPES = %i[hash splat].freeze def on_send(node) - return if node.receiver.nil? && !inherit_active_record_base?(node) || allowed_invocation?(node) + return if (node.receiver.nil? && !inherit_active_record_base?(node)) || allowed_invocation?(node) method_name = node.method_name static_name = static_method_name(method_name) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/eager_evaluation_log_message.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/eager_evaluation_log_message.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/enum_hash.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/enum_hash.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/enum_hash.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/enum_hash.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/enum_uniqueness.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/enum_uniqueness.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/enum_uniqueness.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/enum_uniqueness.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/environment_comparison.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/environment_comparison.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/environment_comparison.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/environment_comparison.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/environment_variable_access.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/environment_variable_access.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/environment_variable_access.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/environment_variable_access.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/exit.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/exit.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/exit.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/exit.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/expanded_date_range.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/expanded_date_range.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/expanded_date_range.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/expanded_date_range.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/file_path.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/file_path.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_by.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_by_id.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_each.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/find_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/find_each.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/has_and_belongs_to_many.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/has_and_belongs_to_many.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/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.12.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb index 47b9dd8423..3a6d5aed22 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb @@ -114,6 +114,8 @@ module RuboCop end def valid_options?(options) + options = options.first.children.first.pairs if options.first.kwsplat_type? + return true unless options return true if options.any? do |o| dependent_option?(o) || present_option?(o) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/helper_instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/helper_instance_variable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/helper_instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/helper_instance_variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/http_positional_arguments.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/http_positional_arguments.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/http_positional_arguments.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/http_positional_arguments.rb index a775a2024a..32536f4eda 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/http_positional_arguments.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/http_positional_arguments.rb @@ -27,6 +27,7 @@ module RuboCop KEYWORD_ARGS = %i[ method params session body flash xhr as headers env to ].freeze + ROUTING_METHODS = %i[draw routes].freeze RESTRICT_ON_SEND = %i[get post put patch delete head].freeze minimum_target_rails_version 5.0 @@ -40,6 +41,8 @@ module RuboCop PATTERN def on_send(node) + return if in_routing_block?(node) + http_request?(node) do |data| return unless needs_conversion?(data) @@ -63,13 +66,17 @@ module RuboCop private + def in_routing_block?(node) + !!node.each_ancestor(:block).detect { |block| ROUTING_METHODS.include?(block.send_node.method_name) } + end + def needs_conversion?(data) return true unless data.hash_type? return false if kwsplat_hash?(data) data.each_pair.none? do |pair| special_keyword_arg?(pair.key) || - format_arg?(pair.key) && data.pairs.one? + (format_arg?(pair.key) && data.pairs.one?) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/http_status.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/i18n_locale_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/i18n_locale_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/index_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/index_by.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/index_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/index_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/index_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/index_with.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/index_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/index_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/inquiry.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/inquiry.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/inquiry.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/inquiry.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/inverse_of.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/inverse_of.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/inverse_of.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/inverse_of.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb similarity index 85% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb index e27e6905ae..851a4dab6d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb @@ -124,9 +124,10 @@ module RuboCop block = parent.each_child_node(:begin).first return unless block - defined_methods = block.each_child_node(:def).map(&:method_name) + defined_action_methods = defined_action_methods(block) + methods = array_values(methods_node).reject do |method| - defined_methods.include?(method) + defined_action_methods.include?(method) end message = message(methods, parent) @@ -135,6 +136,26 @@ module RuboCop private + def defined_action_methods(block) + defined_methods = block.each_child_node(:def).map(&:method_name) + + defined_methods + aliased_action_methods(block, defined_methods) + end + + def aliased_action_methods(node, defined_methods) + alias_methods = node.each_child_node(:send).select { |send_node| send_node.method?(:alias_method) } + + hash_of_alias_methods = alias_methods.each_with_object({}) do |alias_method, result| + result[alias_method.last_argument.value] = alias_method.first_argument.value + end + + defined_methods.each_with_object([]) do |defined_method, aliased_method| + if (new_method_name = hash_of_alias_methods[defined_method]) + aliased_method << new_method_name + end + end + end + # @param node [RuboCop::AST::Node] # @return [Array] def array_values(node) # rubocop:disable Metrics/MethodLength diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/link_to_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/link_to_blank.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/link_to_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/link_to_blank.rb index 558532681c..2938f619ce 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/link_to_blank.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/link_to_blank.rb @@ -75,8 +75,8 @@ module RuboCop corrector.replace(str_range, "#{existing_rel} noopener") end - def add_rel(send_node, offence_node, corrector) - opening_quote = offence_node.children.last.source[0] + def add_rel(send_node, offense_node, corrector) + opening_quote = offense_node.children.last.source[0] closing_quote = opening_quote == ':' ? '' : opening_quote new_rel_exp = ", rel: #{opening_quote}noopener#{closing_quote}" range = if (last_argument = send_node.last_argument).hash_type? diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/mailer_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/mailer_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/mailer_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/mailer_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/match_route.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/match_route.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/match_route.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/match_route.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/negate_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/negate_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/negate_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/negate_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/not_null_column.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/not_null_column.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/not_null_column.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/not_null_column.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/order_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/order_by_id.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/order_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/order_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/output.rb similarity index 70% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/output.rb index 2d2df29581..a06b98b8e4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/output.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/output.rb @@ -14,6 +14,9 @@ module RuboCop # # good # Rails.logger.debug 'A debug message' class Output < Base + include RangeHelp + extend AutoCorrector + MSG = 'Do not write to stdout. ' \ "Use Rails's logger if you want to log." RESTRICT_ON_SEND = %i[ @@ -35,10 +38,13 @@ module RuboCop PATTERN def on_send(node) - return unless (output?(node) || io_output?(node)) && - node.arguments? + return unless (output?(node) || io_output?(node)) && node.arguments? - add_offense(node.loc.selector) + range = offense_range(node) + + add_offense(range) do |corrector| + corrector.replace(range, 'Rails.logger.debug') + end end private @@ -46,6 +52,14 @@ module RuboCop def match_gvar?(sym) %i[$stdout $stderr].include?(sym) end + + def offense_range(node) + if node.receiver + range_between(node.loc.expression.begin_pos, node.loc.selector.end_pos) + else + node.loc.selector + end + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/output_safety.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/output_safety.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/output_safety.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/output_safety.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pick.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pick.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pick.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pick.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck_id.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck_in_where.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck_in_where.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluck_in_where.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluck_in_where.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluralization_grammar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluralization_grammar.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluralization_grammar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluralization_grammar.rb index 8abe9a0352..9635a780f2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/pluralization_grammar.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/pluralization_grammar.rb @@ -61,8 +61,8 @@ module RuboCop def offense?(node) number, = *node.receiver - singular_receiver?(number) && plural_method?(node.method_name) || - plural_receiver?(number) && singular_method?(node.method_name) + (singular_receiver?(number) && plural_method?(node.method_name)) || + (plural_receiver?(number) && singular_method?(node.method_name)) end def plural_method?(method_name) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/presence.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/presence.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/presence.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/presence.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/present.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/present.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/present.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/present.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/rake_environment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/rake_environment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/rake_environment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/rake_environment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/read_write_attribute.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/read_write_attribute.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/read_write_attribute.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/read_write_attribute.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/redundant_allow_nil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/redundant_allow_nil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_allow_nil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/redundant_foreign_key.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_foreign_key.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/redundant_foreign_key.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_foreign_key.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_travel_back.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_travel_back.rb new file mode 100644 index 0000000000..729b620ff0 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/redundant_travel_back.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop checks for redundant `travel_back` calls. + # Since Rails 5.2, `travel_back` is automatically called at the end of the test. + # + # @example + # + # # bad + # def teardown + # do_something + # travel_back + # end + # + # # good + # def teardown + # do_something + # end + # + # # bad + # after do + # do_something + # travel_back + # end + # + # # good + # after do + # do_something + # end + # + class RedundantTravelBack < Base + include RangeHelp + extend AutoCorrector + extend TargetRailsVersion + + minimum_target_rails_version 5.2 + + MSG = 'Redundant `travel_back` detected.' + RESTRICT_ON_SEND = %i[travel_back].freeze + + def on_send(node) + return unless node.each_ancestor(:def, :block).any? do |ancestor| + method_name = ancestor.def_type? ? :teardown : :after + + ancestor.method?(method_name) + end + + add_offense(node) do |corrector| + corrector.remove(range_by_whole_lines(node.source_range, include_final_newline: true)) + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reflection_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reflection_class_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reflection_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reflection_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/refute_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/refute_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/refute_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/relative_date_constant.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/relative_date_constant.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/relative_date_constant.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/relative_date_constant.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/render_inline.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/render_inline.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/render_inline.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/render_inline.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/render_plain_text.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/render_plain_text.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/render_plain_text.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/render_plain_text.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/request_referer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/request_referer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/request_referer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/request_referer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/require_dependency.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/require_dependency.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/require_dependency.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/require_dependency.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reversible_migration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/reversible_migration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reversible_migration.rb index 36f5f05117..4bafa6fbaf 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reversible_migration.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reversible_migration.rb @@ -343,8 +343,8 @@ module RuboCop def within_reversible_or_up_only_block?(node) node.each_ancestor(:block).any? do |ancestor| - ancestor.block_type? && - ancestor.send_node.method?(:reversible) || + (ancestor.block_type? && + ancestor.send_node.method?(:reversible)) || ancestor.send_node.method?(:up_only) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reversible_migration_method_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/reversible_migration_method_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/safe_navigation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/safe_navigation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/safe_navigation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/safe_navigation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/safe_navigation_with_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/safe_navigation_with_blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/safe_navigation_with_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/safe_navigation_with_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/save_bang.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/save_bang.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/save_bang.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/save_bang.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/scope_args.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/scope_args.rb similarity index 80% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/scope_args.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/scope_args.rb index 3b90061d3e..04e6095399 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/scope_args.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/scope_args.rb @@ -14,6 +14,8 @@ module RuboCop # # good # scope :something, -> { where(something: true) } class ScopeArgs < Base + extend AutoCorrector + MSG = 'Use `lambda`/`proc` instead of a plain method call.' RESTRICT_ON_SEND = %i[scope].freeze @@ -21,7 +23,9 @@ module RuboCop def on_send(node) scope?(node) do |second_arg| - add_offense(second_arg) + add_offense(second_arg) do |corrector| + corrector.replace(second_arg, "-> { #{second_arg.source} }") + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/short_i18n.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/short_i18n.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/short_i18n.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/short_i18n.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/skips_model_validations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/skips_model_validations.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/skips_model_validations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/skips_model_validations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/squished_sql_heredocs.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/squished_sql_heredocs.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/time_zone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/time_zone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/time_zone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/time_zone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/time_zone_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/time_zone_assignment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/time_zone_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/time_zone_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/uniq_before_pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/uniq_before_pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/uniq_before_pluck.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/unique_validation_without_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/unique_validation_without_index.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3/lib/rubocop/cop/rails/unknown_env.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/unknown_env.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/unknown_env.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/unknown_env.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/unused_ignored_columns.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/unused_ignored_columns.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/unused_ignored_columns.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/unused_ignored_columns.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/validation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/validation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/validation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/validation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_equals.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_equals.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_equals.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_equals.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_exists.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_exists.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_exists.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_exists.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_not.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails/where_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails/where_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails_cops.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails_cops.rb index f86c3b1818..7c00103b00 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/cop/rails_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/cop/rails_cops.rb @@ -72,6 +72,7 @@ require_relative 'rails/read_write_attribute' require_relative 'rails/redundant_allow_nil' require_relative 'rails/redundant_foreign_key' require_relative 'rails/redundant_receiver_in_with_options' +require_relative 'rails/redundant_travel_back' require_relative 'rails/reflection_class_name' require_relative 'rails/refute_methods' require_relative 'rails/relative_date_constant' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/schema_loader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/schema_loader.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/schema_loader.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/schema_loader.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/schema_loader/schema.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/schema_loader/schema.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/schema_loader/schema.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/schema_loader/schema.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/version.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.0/lib/rubocop/rails/version.rb index 7f9cab7da1..65f0d6acaa 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.3/lib/rubocop/rails/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.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.11.3' + STRING = '2.12.0' def self.document_version STRING.match('\d+\.\d+').to_s From 342fb409f88eb31cf99c4b7437c08e1e3002dee9 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:09:13 +0000 Subject: [PATCH 3/3] Update RBI files for rubocop-rails. --- ...ls@2.11.3.rbi => rubocop-rails@2.12.0.rbi} | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop-rails@2.11.3.rbi => rubocop-rails@2.12.0.rbi} (98%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.3.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.12.0.rbi similarity index 98% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.3.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.12.0.rbi index 0482be4cba..fdcaa8c8f3 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.12.0.rbi @@ -383,10 +383,10 @@ class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base private def allowed_argument?(argument); end - def autocorrect(corrector, node); end + def allowed_name?(argument); end + def autocorrect(corrector, node, preferred_method); end def corrected_ancestor?(node); end def correction_range(node); end - def method_name?(node); end end RuboCop::Cop::Rails::ContentTag::MSG = T.let(T.unsafe(nil), String) @@ -755,6 +755,7 @@ class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base def correction_template(node); end def format_arg?(node); end def highlight_range(node); end + def in_routing_block?(node); end def needs_conversion?(data); end def special_keyword_arg?(node); end end @@ -762,6 +763,7 @@ end RuboCop::Cop::Rails::HttpPositionalArguments::KEYWORD_ARGS = T.let(T.unsafe(nil), Array) RuboCop::Cop::Rails::HttpPositionalArguments::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Rails::HttpPositionalArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -906,7 +908,9 @@ class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base private + def aliased_action_methods(node, defined_methods); end def array_values(node); end + def defined_action_methods(block); end def message(methods, parent); end end @@ -924,7 +928,7 @@ class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base private - def add_rel(send_node, offence_node, corrector); end + def add_rel(send_node, offense_node, corrector); end def append_to_rel(rel_node, corrector); end def autocorrect(corrector, send_node, node, option_nodes); end def contains_noopener?(value); end @@ -1014,6 +1018,9 @@ RuboCop::Cop::Rails::OrderById::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Rails::OrderById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + def io_output?(param0 = T.unsafe(nil)); end def on_send(node); end def output?(param0 = T.unsafe(nil)); end @@ -1021,6 +1028,7 @@ class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base private def match_gvar?(sym); end + def offense_range(node); end end RuboCop::Cop::Rails::Output::MSG = T.let(T.unsafe(nil), String) @@ -1256,6 +1264,17 @@ end RuboCop::Cop::Rails::RedundantReceiverInWithOptions::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Rails::RedundantTravelBack < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + def on_send(node); end +end + +RuboCop::Cop::Rails::RedundantTravelBack::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::RedundantTravelBack::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::ReflectionClassName < ::RuboCop::Cop::Base def association_with_reflection(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1476,6 +1495,8 @@ RuboCop::Cop::Rails::SaveBang::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Rails::SaveBang::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + def on_send(node); end def scope?(param0 = T.unsafe(nil)); end end