From 0fb581b70e6048bca5bf3a715e4f8c0fa240545f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 18:57:16 +0000 Subject: [PATCH 1/9] build(deps): bump rubocop-rails in /Library/Homebrew Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.17.4 to 2.18.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.17.4...v2.18.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 40b3cdfbe3..30f626553c 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -147,7 +147,7 @@ GEM rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.17.4) + rubocop-rails (2.18.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From 6f5a5922170d2571120ff9de7d139ad69135049f Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Tue, 28 Feb 2023 19:01:08 +0000 Subject: [PATCH 2/9] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../config/default.yml | 78 ++++++++++++------- .../config/obsoletion.yml | 0 .../lib/rubocop-rails.rb | 0 .../rubocop/cop/mixin/active_record_helper.rb | 0 .../mixin/active_record_migrations_helper.rb | 0 .../cop/mixin/class_send_node_helper.rb | 0 .../rubocop/cop/mixin/enforce_superclass.rb | 0 .../lib/rubocop/cop/mixin/index_method.rb | 0 .../rubocop/cop/mixin/migrations_helper.rb | 0 .../rubocop/cop/mixin/target_rails_version.rb | 0 .../action_controller_flash_before_render.rb | 12 ++- .../cop/rails/action_controller_test_case.rb | 2 +- .../lib/rubocop/cop/rails/action_filter.rb | 0 .../lib/rubocop/cop/rails/action_order.rb | 0 .../cop/rails/active_record_aliases.rb | 2 + .../rails/active_record_callbacks_order.rb | 0 .../cop/rails/active_record_override.rb | 0 .../cop/rails/active_support_aliases.rb | 0 .../cop/rails/active_support_on_load.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 | 3 - .../lib/rubocop/cop/rails/blank.rb | 2 +- .../rubocop/cop/rails/bulk_change_table.rb | 5 +- .../lib/rubocop/cop/rails/compact_blank.rb | 0 .../lib/rubocop/cop/rails/content_tag.rb | 0 .../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 | 0 .../rubocop/cop/rails/delegate_allow_blank.rb | 0 .../deprecated_active_model_errors_methods.rb | 2 +- .../rubocop/cop/rails/dot_separated_keys.rb | 0 .../cop/rails/duplicate_association.rb | 0 .../lib/rubocop/cop/rails/duplicate_scope.rb | 0 .../rubocop/cop/rails/duration_arithmetic.rb | 0 .../lib/rubocop/cop/rails/dynamic_find_by.rb | 0 .../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 .../lib/rubocop/cop/rails/freeze_time.rb | 3 + .../cop/rails/has_and_belongs_to_many.rb | 0 .../rails/has_many_or_has_one_dependent.rb | 4 +- .../cop/rails/helper_instance_variable.rb | 0 .../cop/rails/http_positional_arguments.rb | 0 .../lib/rubocop/cop/rails/http_status.rb | 0 .../lib/rubocop/cop/rails/i18n_lazy_lookup.rb | 0 .../cop/rails/i18n_locale_assignment.rb | 0 .../rubocop/cop/rails/i18n_locale_texts.rb | 0 .../cop/rails/ignored_columns_assignment.rb | 0 .../ignored_skip_action_filter_option.rb | 2 - .../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 | 3 - .../rails/lexically_scoped_action_filter.rb | 24 ++++-- .../lib/rubocop/cop/rails/link_to_blank.rb | 0 .../lib/rubocop/cop/rails/mailer_name.rb | 0 .../lib/rubocop/cop/rails/match_route.rb | 0 .../rubocop/cop/rails/migration_class_name.rb | 0 .../lib/rubocop/cop/rails/negate_include.rb | 2 +- .../lib/rubocop/cop/rails/not_null_column.rb | 15 ++-- .../lib/rubocop/cop/rails/order_by_id.rb | 0 .../lib/rubocop/cop/rails/output.rb | 0 .../lib/rubocop/cop/rails/output_safety.rb | 0 .../lib/rubocop/cop/rails/pick.rb | 0 .../lib/rubocop/cop/rails/pluck.rb | 12 +++ .../lib/rubocop/cop/rails/pluck_id.rb | 0 .../lib/rubocop/cop/rails/pluck_in_where.rb | 0 .../cop/rails/pluralization_grammar.rb | 0 .../lib/rubocop/cop/rails/presence.rb | 4 +- .../lib/rubocop/cop/rails/present.rb | 2 +- .../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 ...ndant_presence_validation_on_belongs_to.rb | 0 .../redundant_receiver_in_with_options.rb | 0 .../cop/rails/redundant_travel_back.rb | 0 .../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/response_parsed_body.rb | 57 ++++++++++++++ .../rubocop/cop/rails/reversible_migration.rb | 33 +------- .../reversible_migration_method_definition.rb | 0 .../lib/rubocop/cop/rails/root_join_chain.rb | 0 .../cop/rails/root_pathname_methods.rb | 0 .../lib/rubocop/cop/rails/root_public_path.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/schema_comment.rb | 0 .../lib/rubocop/cop/rails/scope_args.rb | 0 .../lib/rubocop/cop/rails/short_i18n.rb | 0 .../cop/rails/skips_model_validations.rb | 0 .../cop/rails/squished_sql_heredocs.rb | 9 ++- .../lib/rubocop/cop/rails/strip_heredoc.rb | 0 .../cop/rails/table_name_assignment.rb | 0 .../lib/rubocop/cop/rails/time_zone.rb | 0 .../rubocop/cop/rails/time_zone_assignment.rb | 0 .../lib/rubocop/cop/rails/to_formatted_s.rb | 0 .../rubocop/cop/rails/to_s_with_argument.rb | 0 .../top_level_hash_with_indifferent_access.rb | 0 .../cop/rails/transaction_exit_statement.rb | 2 - .../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 | 7 +- .../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_missing.rb | 0 .../lib/rubocop/cop/rails/where_not.rb | 0 .../where_not_with_multiple_conditions.rb | 0 .../lib/rubocop/cop/rails_cops.rb | 1 + .../lib/rubocop/rails.rb | 2 +- .../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 +- 140 files changed, 194 insertions(+), 98 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/config/default.yml (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/config/obsoletion.yml (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop-rails.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/active_record_helper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/active_record_migrations_helper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/class_send_node_helper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/enforce_superclass.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/index_method.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/migrations_helper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/mixin/target_rails_version.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/action_controller_flash_before_render.rb (88%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/action_controller_test_case.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/action_filter.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/action_order.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/active_record_aliases.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/active_record_callbacks_order.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/active_record_override.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/active_support_aliases.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/active_support_on_load.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/add_column_index.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/after_commit_override.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/application_controller.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/application_job.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/application_mailer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/application_record.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/arel_star.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/assert_not.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/attribute_default_block_value.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/belongs_to.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/blank.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/bulk_change_table.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/compact_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/content_tag.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/create_table_with_timestamps.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/date.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/default_scope.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/delegate.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/delegate_allow_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/dot_separated_keys.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/duplicate_association.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/duplicate_scope.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/duration_arithmetic.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/dynamic_find_by.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/eager_evaluation_log_message.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/enum_hash.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/enum_uniqueness.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/environment_comparison.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/environment_variable_access.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/exit.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/expanded_date_range.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/file_path.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/find_by.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/find_by_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/find_each.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/freeze_time.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.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.17.4 => rubocop-rails-2.18.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.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/helper_instance_variable.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/http_positional_arguments.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/http_status.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/i18n_lazy_lookup.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/i18n_locale_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/i18n_locale_texts.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/ignored_columns_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/index_by.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/index_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/inquiry.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/inverse_of.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb (89%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/link_to_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/mailer_name.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/match_route.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/migration_class_name.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/negate_include.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/not_null_column.rb (83%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/order_by_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/output.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/output_safety.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/pick.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/pluck.rb (86%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/pluck_id.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/pluck_in_where.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/pluralization_grammar.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/presence.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/present.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/rake_environment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/read_write_attribute.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/redundant_allow_nil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/redundant_foreign_key.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/redundant_travel_back.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/reflection_class_name.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/refute_methods.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/relative_date_constant.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/render_inline.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/render_plain_text.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/request_referer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/require_dependency.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/response_parsed_body.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/reversible_migration.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/reversible_migration_method_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/root_join_chain.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/root_pathname_methods.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/root_public_path.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/safe_navigation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/safe_navigation_with_blank.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/save_bang.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/schema_comment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/scope_args.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/short_i18n.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/skips_model_validations.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/squished_sql_heredocs.rb (83%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/strip_heredoc.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/table_name_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/time_zone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/time_zone_assignment.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/to_formatted_s.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/to_s_with_argument.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/transaction_exit_statement.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/uniq_before_pluck.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/unique_validation_without_index.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/unknown_env.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/unused_ignored_columns.rb (88%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/validation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/where_equals.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/where_exists.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/where_missing.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/where_not.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/cop/rails_cops.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/rails.rb (79%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/rails/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/rails/schema_loader.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.0}/lib/rubocop/rails/schema_loader/schema.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-rails-2.17.4 => rubocop-rails-2.18.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 9c240d0ad9..3a2253c3b5 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -106,7 +106,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.46.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.16.0/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.18.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.18.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.7.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-macho-3.0.0/lib") diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/config/default.yml similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/config/default.yml index b4c8d28d44..1e609a14f3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/config/default.yml @@ -46,23 +46,6 @@ Lint/NumberConversion: - fortnights - in_milliseconds AllowedPatterns: [] - # Deprecated. - IgnoredMethods: - - ago - - from_now - - second - - seconds - - minute - - minutes - - hour - - hours - - day - - days - - week - - weeks - - fortnight - - fortnights - - in_milliseconds Rails: Enabled: true @@ -135,7 +118,9 @@ Rails/ActiveRecordOverride: Check for overriding Active Record methods instead of using callbacks. Enabled: true + Severity: warning VersionAdded: '0.67' + VersionChanged: '2.18' Include: - app/models/**/*.rb @@ -226,6 +211,9 @@ Rails/BelongsTo: Description: >- Use `optional: true` instead of `required: false` for `belongs_to` relations. + Reference: + - https://guides.rubyonrails.org/5_0_release_notes.html + - https://github.com/rails/rails/pull/18937 Enabled: true VersionAdded: '0.62' @@ -244,6 +232,9 @@ Rails/Blank: Rails/BulkChangeTable: Description: 'Check whether alter queries are combinable.' + Reference: + - https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table + - https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Table.html Enabled: true VersionAdded: '0.57' Database: null @@ -330,9 +321,10 @@ Rails/DelegateAllowBlank: Rails/DeprecatedActiveModelErrorsMethods: Description: 'Avoid manipulating ActiveModel errors hash directly.' Enabled: pending + Severity: warning Safe: false VersionAdded: '2.14' - VersionChanged: '2.15' + VersionChanged: '2.18' Rails/DotSeparatedKeys: Description: 'Enforces the use of dot-separated keys instead of `:scope` options in `I18n` translation methods.' @@ -343,12 +335,16 @@ Rails/DotSeparatedKeys: Rails/DuplicateAssociation: Description: "Don't repeat associations in a model." Enabled: pending + Severity: warning VersionAdded: '2.14' + VersionChanged: '2.18' Rails/DuplicateScope: Description: 'Multiple scopes share this same where clause.' Enabled: pending + Severity: warning VersionAdded: '2.14' + VersionChanged: '2.18' Rails/DurationArithmetic: Description: 'Do not use duration as arithmetic operand with `Time.current`.' @@ -463,7 +459,7 @@ Rails/FindById: VersionAdded: '2.7' Rails/FindEach: - Description: 'Prefer all.find_each over all.find.' + Description: 'Prefer all.find_each over all.each.' StyleGuide: 'https://rails.rubystyle.guide#find-each' Enabled: true VersionAdded: '0.30' @@ -477,13 +473,6 @@ Rails/FindEach: - select - lock AllowedPatterns: [] - # Deprecated. - IgnoredMethods: - # Methods that don't work well with `find_each`. - - order - - limit - - select - - lock Rails/FreezeTime: Description: 'Prefer `freeze_time` over `travel_to` with an argument of the current time.' @@ -592,6 +581,9 @@ Rails/Inquiry: Rails/InverseOf: Description: 'Checks for associations where the inverse cannot be determined automatically.' + Reference: + - https://guides.rubyonrails.org/association_basics.html#bi-directional-associations + - https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Setting+Inverses Enabled: true VersionAdded: '0.52' IgnoreScopes: false @@ -695,7 +687,9 @@ Rails/Pluck: Description: 'Prefer `pluck` over `map { ... }`.' StyleGuide: 'https://rails.rubystyle.guide#pluck' Enabled: 'pending' + Safe: false VersionAdded: '2.7' + VersionChanged: '2.18' Rails/PluckId: Description: 'Use `ids` instead of `pluck(:id)` or `pluck(primary_key)`.' @@ -847,6 +841,17 @@ Rails/RequireDependency: Enabled: false VersionAdded: '2.10' +Rails/ResponseParsedBody: + Description: Prefer `response.parsed_body` to `JSON.parse(response.body)`. + Enabled: pending + SafeAutoCorrect: false + VersionAdded: '2.18' + Include: + - spec/controllers/**/*.rb + - spec/requests/**/*.rb + - test/controllers/**/*.rb + - test/integration/**/*.rb + Rails/ReversibleMigration: Description: 'Checks whether the change method of the migration file is reversible.' StyleGuide: 'https://rails.rubystyle.guide#reversible-migration' @@ -1038,10 +1043,14 @@ Rails/TopLevelHashWithIndifferentAccess: Description: 'Identifies top-level `HashWithIndifferentAccess`.' Reference: 'https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#top-level-hashwithindifferentaccess-is-soft-deprecated' Enabled: pending + Severity: warning VersionAdded: '2.16' + VersionChanged: '2.18' Rails/TransactionExitStatement: Description: 'Avoid the usage of `return`, `break` and `throw` in transaction blocks.' + Reference: + - https://github.com/rails/rails/commit/15aa4200e083 Enabled: pending VersionAdded: '2.14' @@ -1066,7 +1075,9 @@ Rails/UniqueValidationWithoutIndex: Rails/UnknownEnv: Description: 'Use correct environment name.' Enabled: true + Severity: warning VersionAdded: '0.51' + VersionChanged: '2.18' Environments: - development - test @@ -1121,12 +1132,27 @@ Rails/WhereNot: Rails/WhereNotWithMultipleConditions: Description: 'Do not use `where.not(...)` with multiple conditions.' Enabled: 'pending' + Severity: warning VersionAdded: '2.17' + VersionChanged: '2.18' # Accept `redirect_to(...) and return` and similar cases. Style/AndOr: EnforcedStyle: conditionals +Style/FormatStringToken: + AllowedMethods: + - redirect + +Style/InverseMethods: + # `InverseMethods` are methods that can be inverted by a not (`not` or `!`) + # The relationship of inverse methods only needs to be defined in one direction. + # Keys and values both need to be defined as symbols. + InverseMethods: + :present?: :blank? + :include?: :exclude? + :valid?: :invalid? + Style/SymbolProc: AllowedMethods: - define_method diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/config/obsoletion.yml similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/config/obsoletion.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/config/obsoletion.yml diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop-rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop-rails.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop-rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop-rails.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/active_record_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/mixin/active_record_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/active_record_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/active_record_migrations_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/active_record_migrations_helper.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/active_record_migrations_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/active_record_migrations_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/class_send_node_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/class_send_node_helper.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/class_send_node_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/class_send_node_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/enforce_superclass.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/mixin/enforce_superclass.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/enforce_superclass.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/index_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/mixin/index_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/index_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/migrations_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/migrations_helper.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/migrations_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/migrations_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/mixin/target_rails_version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/mixin/target_rails_version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/mixin/target_rails_version.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_flash_before_render.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_flash_before_render.rb similarity index 88% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_flash_before_render.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_flash_before_render.rb index 4a30ac97e1..589d33795d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_flash_before_render.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_flash_before_render.rb @@ -67,9 +67,11 @@ module RuboCop private def followed_by_render?(flash_node) - flash_assigment_node = find_ancestor(flash_node, type: :send) - context = flash_assigment_node + flash_assignment_node = find_ancestor(flash_node, type: :send) + context = flash_assignment_node if (node = context.each_ancestor(:if, :rescue).first) + return false if use_redirect_to?(context) + context = node elsif context.right_siblings.empty? return true @@ -95,6 +97,12 @@ module RuboCop def_node || block_node end + def use_redirect_to?(context) + context.right_siblings.compact.any? do |sibling| + sibling.send_type? && sibling.method?(:redirect_to) + end + end + def find_ancestor(node, type:) node.each_ancestor(type).first end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_test_case.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_test_case.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_test_case.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_test_case.rb index 6ea52cdc21..a78d1d12f4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_controller_test_case.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_controller_test_case.rb @@ -30,7 +30,7 @@ module RuboCop def_node_matcher :action_controller_test_case?, <<~PATTERN (class - (const {nil? cbase} _) + (const _ _) (const (const {nil? cbase} :ActionController) :TestCase) _) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_filter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_order.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/action_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/action_order.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_record_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_record_aliases.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_record_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_record_aliases.rb index 6f81e3b6d7..8d0e802fa3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_record_aliases.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_record_aliases.rb @@ -26,6 +26,8 @@ module RuboCop RESTRICT_ON_SEND = ALIASES.keys.freeze def on_send(node) + return if node.arguments.empty? + method_name = node.method_name alias_method = ALIASES[method_name] diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_record_callbacks_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/active_record_callbacks_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/active_record_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/active_record_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_record_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_support_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/active_support_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_support_aliases.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_support_on_load.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_support_on_load.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/active_support_on_load.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/active_support_on_load.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/add_column_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/add_column_index.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/add_column_index.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/after_commit_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/after_commit_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/after_commit_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/application_controller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/application_controller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/application_controller.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/application_job.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/application_job.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/application_job.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/application_mailer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/application_mailer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/application_mailer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/application_record.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/application_record.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/application_record.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/arel_star.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/arel_star.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/arel_star.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/assert_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/assert_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/assert_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/attribute_default_block_value.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/attribute_default_block_value.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/belongs_to.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/belongs_to.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/belongs_to.rb index 37d4ea255a..ad315131e8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/belongs_to.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/belongs_to.rb @@ -47,9 +47,6 @@ module RuboCop # class Post < ApplicationRecord # belongs_to :blog, optional: false # end - # - # @see https://guides.rubyonrails.org/5_0_release_notes.html - # @see https://github.com/rails/rails/pull/18937 class BelongsTo < Base extend AutoCorrector extend TargetRailsVersion diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/blank.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/blank.rb index 1c0825a790..e5d0232821 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/blank.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/blank.rb @@ -8,7 +8,7 @@ module RuboCop # # Interaction with `Style/UnlessElse`: # The configuration of `NotPresent` will not produce an offense in the - # context of `unless else` if `Style/UnlessElse` is inabled. This is + # context of `unless else` if `Style/UnlessElse` is enabled. This is # to prevent interference between the autocorrection of the two cops. # # @safety diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/bulk_change_table.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/bulk_change_table.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/bulk_change_table.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/bulk_change_table.rb index a97f0485a3..a076958ddb 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/bulk_change_table.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/bulk_change_table.rb @@ -62,9 +62,6 @@ module RuboCop # t.string :nickname # end # end - # - # @see https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table - # @see https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Table.html class BulkChangeTable < Base MSG_FOR_CHANGE_TABLE = <<~MSG.chomp You can combine alter queries using `bulk: true` options. @@ -216,7 +213,7 @@ module RuboCop true when POSTGRESQL # Add bulk alter support for PostgreSQL in 5.2.0 - # @see https://github.com/rails/rails/pull/31331 + # See: https://github.com/rails/rails/pull/31331 target_rails_version >= 5.2 else false diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/compact_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/compact_blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/compact_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/compact_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/content_tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/content_tag.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/content_tag.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/content_tag.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/create_table_with_timestamps.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/create_table_with_timestamps.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/date.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/date.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/date.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/date.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/default_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/default_scope.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/default_scope.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/delegate.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/delegate.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/delegate.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/delegate.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/delegate_allow_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/delegate_allow_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/delegate_allow_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb index f07dc156f1..302532a488 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb @@ -160,7 +160,7 @@ module RuboCop end def model_file? - processed_source.buffer.name.include?('/models/') + processed_source.file_path.include?('/models/') end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/dot_separated_keys.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/dot_separated_keys.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/dot_separated_keys.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/dot_separated_keys.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duplicate_association.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duplicate_association.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duplicate_association.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duplicate_association.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duplicate_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duplicate_scope.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duplicate_scope.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duplicate_scope.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duration_arithmetic.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duration_arithmetic.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/duration_arithmetic.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/duration_arithmetic.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/dynamic_find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/dynamic_find_by.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/dynamic_find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/dynamic_find_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/eager_evaluation_log_message.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/eager_evaluation_log_message.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/enum_hash.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/enum_hash.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/enum_hash.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/enum_uniqueness.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/enum_uniqueness.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/enum_uniqueness.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/environment_comparison.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/environment_comparison.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/environment_comparison.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/environment_variable_access.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/environment_variable_access.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/environment_variable_access.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/exit.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/exit.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/exit.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/exit.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/expanded_date_range.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/expanded_date_range.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/expanded_date_range.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/file_path.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/find_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/find_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/find_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/find_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/find_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/find_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/find_each.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/freeze_time.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/freeze_time.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/freeze_time.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/freeze_time.rb index fff5b37a4e..3a9bc863b6 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/freeze_time.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/freeze_time.rb @@ -26,6 +26,9 @@ module RuboCop # class FreezeTime < Base extend AutoCorrector + extend TargetRailsVersion + + minimum_target_rails_version 5.2 MSG = 'Use `freeze_time` instead of `travel_to`.' NOW_METHODS = %i[now new current].freeze diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/has_and_belongs_to_many.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/has_and_belongs_to_many.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/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.18.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb index 9491d47eb0..a00f93c52c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb @@ -41,11 +41,11 @@ module RuboCop PATTERN def_node_matcher :association_without_options?, <<~PATTERN - (send nil? {:has_many :has_one} _) + (send _ {:has_many :has_one} _) PATTERN def_node_matcher :association_with_options?, <<~PATTERN - (send nil? {:has_many :has_one} ... (hash $...)) + (send _ {:has_many :has_one} ... (hash $...)) PATTERN def_node_matcher :dependent_option?, <<~PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/helper_instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/helper_instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/helper_instance_variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/http_positional_arguments.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/http_positional_arguments.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/http_positional_arguments.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/http_positional_arguments.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/http_status.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/i18n_lazy_lookup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/i18n_lazy_lookup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/i18n_lazy_lookup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/i18n_lazy_lookup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/i18n_locale_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/i18n_locale_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/i18n_locale_texts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/i18n_locale_texts.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/i18n_locale_texts.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/i18n_locale_texts.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/ignored_columns_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/ignored_columns_assignment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/ignored_columns_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/ignored_columns_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb index de824f54f1..17bddcbd44 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb @@ -35,8 +35,6 @@ module RuboCop # skip_before_action :login_required, # if: -> { trusted_origin? && action_name != "admin" } # end - # - # @see https://api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html#method-i-_normalize_callback_options class IgnoredSkipActionFilterOption < Base MSG = <<~MSG.chomp.freeze `%s` option will be ignored when `%s` and `%s` are used together. diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/index_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/index_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/index_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/index_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/index_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/index_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/inquiry.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/inquiry.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/inquiry.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/inquiry.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/inverse_of.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/inverse_of.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/inverse_of.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/inverse_of.rb index b2db3d0f1c..c4dbd0e8eb 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/inverse_of.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/inverse_of.rb @@ -137,9 +137,6 @@ module RuboCop # class Blog < ApplicationRecord # has_many :posts, -> { order(published_at: :desc) } # end - # - # @see https://guides.rubyonrails.org/association_basics.html#bi-directional-associations - # @see https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Setting+Inverses class InverseOf < Base SPECIFY_MSG = 'Specify an `:inverse_of` option.' NIL_MSG = 'You specified `inverse_of: nil`, you probably meant to use `inverse_of: false`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb similarity index 89% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb index 25cb6e2ffa..a79713f513 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb @@ -144,19 +144,29 @@ module RuboCop 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 - + alias_methods = alias_methods(node) defined_methods.each_with_object([]) do |defined_method, aliased_method| - if (new_method_name = hash_of_alias_methods[defined_method]) + if (new_method_name = alias_methods[defined_method]) aliased_method << new_method_name end end end + def alias_methods(node) + result = {} + node.each_child_node(:send, :alias) do |child_node| + case child_node.type + when :send + if child_node.method?(:alias_method) + result[child_node.last_argument.value] = child_node.first_argument.value + end + when :alias + result[child_node.old_identifier.value] = child_node.new_identifier.value + end + end + result + 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.17.4/lib/rubocop/cop/rails/link_to_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/link_to_blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/link_to_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/link_to_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/mailer_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/mailer_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/mailer_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/match_route.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/match_route.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/match_route.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/migration_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/migration_class_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/migration_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/migration_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/negate_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/negate_include.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/negate_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/negate_include.rb index 1aed7adf45..cf48cda252 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/negate_include.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/negate_include.rb @@ -26,7 +26,7 @@ module RuboCop RESTRICT_ON_SEND = %i[!].freeze def_node_matcher :negate_include_call?, <<~PATTERN - (send (send $_ :include? $_) :!) + (send (send $!nil? :include? $_) :!) PATTERN def on_send(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/not_null_column.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/not_null_column.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/not_null_column.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/not_null_column.rb index 9c22495df5..7f8e41c8be 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/not_null_column.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/not_null_column.rb @@ -21,7 +21,7 @@ module RuboCop RESTRICT_ON_SEND = %i[add_column add_reference].freeze def_node_matcher :add_not_null_column?, <<~PATTERN - (send nil? :add_column _ _ _ (hash $...)) + (send nil? :add_column _ _ $_ (hash $...)) PATTERN def_node_matcher :add_not_null_reference?, <<~PATTERN @@ -44,17 +44,20 @@ module RuboCop private def check_add_column(node) - pairs = add_not_null_column?(node) - check_pairs(pairs) + add_not_null_column?(node) do |type, pairs| + return if type.value == :virtual || type.value == 'virtual' + + check_pairs(pairs) + end end def check_add_reference(node) - pairs = add_not_null_reference?(node) - check_pairs(pairs) + add_not_null_reference?(node) do |pairs| + check_pairs(pairs) + end end def check_pairs(pairs) - return unless pairs return if pairs.any? { |pair| default_option?(pair) } null_false = pairs.find { |pair| null_false?(pair) } diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/order_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/order_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/order_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/output_safety.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/output_safety.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/output_safety.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pick.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pick.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pick.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pick.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluck.rb similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluck.rb index 3c47cc1316..4cd3bca6e0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluck.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluck.rb @@ -9,6 +9,18 @@ module RuboCop # element in an enumerable. When called on an Active Record relation, it # results in a more efficient query that only selects the necessary key. # + # @safety + # This cop is unsafe because model can use column aliases. + # + # [source,ruby] + # ---- + # # Original code + # User.select('name AS nickname').map { |user| user[:nickname] } # => array of nicknames + # + # # After autocorrection + # User.select('name AS nickname').pluck(:nickname) # => raises ActiveRecord::StatementInvalid + # ---- + # # @example # # bad # Post.published.map { |post| post[:title] } diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluck_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/pluck_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluck_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluck_in_where.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/pluck_in_where.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluck_in_where.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluralization_grammar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluralization_grammar.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/pluralization_grammar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/pluralization_grammar.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/presence.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/presence.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/presence.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/presence.rb index ac1e69c185..6a134736ae 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/presence.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/presence.rb @@ -112,10 +112,10 @@ module RuboCop end def current(node) - if node.source.include?("\n") + if !node.ternary? && node.source.include?("\n") "#{node.loc.keyword.with(end_pos: node.condition.loc.selector.end_pos).source} ... end" else - node.source + node.source.gsub(/\n\s*/, ' ') end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/present.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/present.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/present.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/present.rb index 0eccfca32f..cc7b04140b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/present.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/present.rb @@ -8,7 +8,7 @@ module RuboCop # # Interaction with `Style/UnlessElse`: # The configuration of `NotBlank` will not produce an offense in the - # context of `unless else` if `Style/UnlessElse` is inabled. This is + # context of `unless else` if `Style/UnlessElse` is enabled. This is # to prevent interference between the autocorrection of the two cops. # # @example NotNilAndNotEmpty: true (default) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/rake_environment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/rake_environment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/rake_environment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/read_write_attribute.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/read_write_attribute.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/read_write_attribute.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_allow_nil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/redundant_allow_nil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_allow_nil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_foreign_key.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/redundant_foreign_key.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_foreign_key.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/redundant_travel_back.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_travel_back.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/redundant_travel_back.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/redundant_travel_back.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/reflection_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/reflection_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/reflection_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/refute_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/refute_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/refute_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/relative_date_constant.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/relative_date_constant.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/relative_date_constant.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/render_inline.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/render_inline.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/render_inline.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/render_plain_text.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/render_plain_text.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/render_plain_text.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/request_referer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/request_referer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/request_referer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/require_dependency.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/require_dependency.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/require_dependency.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/response_parsed_body.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/response_parsed_body.rb new file mode 100644 index 0000000000..5c74d992c3 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/response_parsed_body.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # Prefer `response.parsed_body` to `JSON.parse(response.body)`. + # + # @safety + # This cop's autocorrection is unsafe because Content-Type may not be `application/json`. For example, the + # proprietary Content-Type provided by corporate entities such as `application/vnd.github+json` is not + # supported at `response.parsed_body` by default, so you still have to use `JSON.parse(response.body)` there. + # + # @example + # # bad + # JSON.parse(response.body) + # + # # good + # response.parsed_body + class ResponseParsedBody < Base + extend AutoCorrector + extend TargetRailsVersion + + MSG = 'Prefer `response.parsed_body` to `JSON.parse(response.body)`.' + + RESTRICT_ON_SEND = %i[parse].freeze + + minimum_target_rails_version 5.0 + + # @!method json_parse_response_body?(node) + def_node_matcher :json_parse_response_body?, <<~PATTERN + (send + (const {nil? cbase} :JSON) + :parse + (send + (send nil? :response) + :body + ) + ) + PATTERN + + def on_send(node) + return unless json_parse_response_body?(node) + + add_offense(node) do |corrector| + autocorrect(corrector, node) + end + end + + private + + def autocorrect(corrector, node) + corrector.replace(node, 'response.parsed_body') + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/reversible_migration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/reversible_migration.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/reversible_migration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/reversible_migration.rb index 5af544b000..3f2ba23f9f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/reversible_migration.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/reversible_migration.rb @@ -16,23 +16,15 @@ module RuboCop # # # good # def change - # create_table :users do |t| - # t.string :name + # change_table :users do |t| + # t.remove :name, :string # end # end # # # good # def change - # reversible do |dir| - # change_table :users do |t| - # dir.up do - # t.column :name, :string - # end - # - # dir.down do - # t.remove :name - # end - # end + # create_table :users do |t| + # t.string :name # end # end # @@ -114,21 +106,6 @@ module RuboCop # end # end # - # # good - # def change - # reversible do |dir| - # change_table :users do |t| - # dir.up do - # t.change :price, :string - # end - # - # dir.down do - # t.change :price, :integer - # end - # end - # end - # end - # # @example # # remove_columns # @@ -173,8 +150,6 @@ module RuboCop # def change # remove_index :users, column: :email # end - # - # @see https://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html class ReversibleMigration < Base include MigrationsHelper diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/reversible_migration_method_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/reversible_migration_method_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/root_join_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_join_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/root_join_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_join_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/root_pathname_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_pathname_methods.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/root_pathname_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_pathname_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/root_public_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_public_path.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/root_public_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/root_public_path.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/safe_navigation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/safe_navigation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/safe_navigation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/safe_navigation_with_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/safe_navigation_with_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/save_bang.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/save_bang.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/save_bang.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/schema_comment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/schema_comment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/schema_comment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/schema_comment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/scope_args.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/scope_args.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/scope_args.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/scope_args.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/short_i18n.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/short_i18n.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/short_i18n.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/skips_model_validations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/skips_model_validations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/skips_model_validations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/squished_sql_heredocs.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/squished_sql_heredocs.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb index 55f5654baf..55d2fd5b16 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/squished_sql_heredocs.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb @@ -48,6 +48,7 @@ module RuboCop SQL = 'SQL' SQUISH = '.squish' MSG = 'Use `%s` instead of `%s`.' + SQL_IDENTIFIER_MARKERS = /(".+?")|('.+?')|(\[.+?\])/.freeze def on_heredoc(node) return unless offense_detected?(node) @@ -60,7 +61,7 @@ module RuboCop private def offense_detected?(node) - sql_heredoc?(node) && !using_squish?(node) + sql_heredoc?(node) && !using_squish?(node) && !singleline_comments_present?(node) end def sql_heredoc?(node) @@ -71,6 +72,12 @@ module RuboCop node.parent&.send_type? && node.parent&.method?(:squish) end + def singleline_comments_present?(node) + sql = node.children.map { |c| c.is_a?(String) ? c : c.source }.join('\n') + + sql.gsub(SQL_IDENTIFIER_MARKERS, '').include?('--') + end + def message(node) format(MSG, expect: "#{node.source}#{SQUISH}", current: node.source) end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/strip_heredoc.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/strip_heredoc.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/strip_heredoc.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/strip_heredoc.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/table_name_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/table_name_assignment.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/table_name_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/table_name_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/time_zone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/time_zone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/time_zone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/time_zone_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/time_zone_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/time_zone_assignment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/to_formatted_s.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/to_formatted_s.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/to_formatted_s.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/to_formatted_s.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/to_s_with_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/to_s_with_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/to_s_with_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/to_s_with_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/transaction_exit_statement.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/transaction_exit_statement.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/transaction_exit_statement.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/transaction_exit_statement.rb index d21241e6b3..d5f22cfb82 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/transaction_exit_statement.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/transaction_exit_statement.rb @@ -45,8 +45,6 @@ module RuboCop # # Commit # next if user.active? # end - # - # @see https://github.com/rails/rails/commit/15aa4200e083 class TransactionExitStatement < Base MSG = <<~MSG.chomp Exit statement `%s` is not allowed. Use `raise` (rollback) or `next` (commit). diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/uniq_before_pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/uniq_before_pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/uniq_before_pluck.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/unique_validation_without_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/unique_validation_without_index.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/unknown_env.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/unknown_env.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/unknown_env.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/unused_ignored_columns.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/unused_ignored_columns.rb similarity index 88% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/unused_ignored_columns.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/unused_ignored_columns.rb index 02a0caa4c6..c099b97a4d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/unused_ignored_columns.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/unused_ignored_columns.rb @@ -28,12 +28,16 @@ module RuboCop (send self :ignored_columns= $array) PATTERN + def_node_matcher :appended_ignored_columns, <<~PATTERN + (op-asgn (send self :ignored_columns) :+ $array) + PATTERN + def_node_matcher :column_name, <<~PATTERN ({str sym} $_) PATTERN def on_send(node) - return unless (columns = ignored_columns(node)) + return unless (columns = ignored_columns(node) || appended_ignored_columns(node)) return unless schema table = table(node) @@ -43,6 +47,7 @@ module RuboCop check_column_existence(column_node, table) end end + alias on_op_asgn on_send private diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/validation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/validation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/validation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/validation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_equals.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/where_equals.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_equals.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_exists.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/where_exists.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_exists.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_missing.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_missing.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_missing.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_missing.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/cop/rails/where_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails_cops.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails_cops.rb index 24908f0516..fa167e1811 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/cop/rails_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/cop/rails_cops.rb @@ -99,6 +99,7 @@ require_relative 'rails/render_inline' require_relative 'rails/render_plain_text' require_relative 'rails/request_referer' require_relative 'rails/require_dependency' +require_relative 'rails/response_parsed_body' require_relative 'rails/reversible_migration' require_relative 'rails/reversible_migration_method_definition' require_relative 'rails/root_join_chain' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails.rb similarity index 79% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails.rb index f94bb9658d..3a7f79350a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails.rb @@ -5,7 +5,7 @@ module RuboCop module Rails PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze - CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze + CONFIG = YAML.safe_load(CONFIG_DEFAULT.read, permitted_classes: [Regexp, Symbol]).freeze private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/schema_loader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/schema_loader.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/schema_loader.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/schema_loader.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/schema_loader/schema.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4/lib/rubocop/rails/schema_loader/schema.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/schema_loader/schema.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/version.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.0/lib/rubocop/rails/version.rb index e6e4e360e0..4517b3af13 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.17.4/lib/rubocop/rails/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.18.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.17.4' + STRING = '2.18.0' def self.document_version STRING.match('\d+\.\d+').to_s From 34c51be5bca29ee35b055741eacb848a281e352c Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Tue, 28 Feb 2023 19:07:33 +0000 Subject: [PATCH 3/9] Update RBI files for rubocop-rails. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- ...ls@2.17.4.rbi => rubocop-rails@2.18.0.rbi} | 22 ++++++ .../sorbet/rbi/hidden-definitions/hidden.rbi | 74 +++++++++++++++++++ 2 files changed, 96 insertions(+) rename Library/Homebrew/sorbet/rbi/gems/{rubocop-rails@2.17.4.rbi => rubocop-rails@2.18.0.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.4.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.18.0.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.4.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.18.0.rbi index 69efbe0502..71a908cfcc 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.4.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.18.0.rbi @@ -140,6 +140,7 @@ class RuboCop::Cop::Rails::ActionControllerFlashBeforeRender < ::RuboCop::Cop::B def followed_by_render?(flash_node); end def inherit_action_controller_base?(node); end def instance_method_or_block?(node); end + def use_redirect_to?(context); end end RuboCop::Cop::Rails::ActionControllerFlashBeforeRender::MSG = T.let(T.unsafe(nil), String) @@ -919,6 +920,7 @@ RuboCop::Cop::Rails::FindEach::SCOPE_METHODS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::FreezeTime < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def on_send(node); end def time_now?(param0 = T.unsafe(nil)); end @@ -1185,6 +1187,7 @@ class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base private + def alias_methods(node); end def aliased_action_methods(node, defined_methods); end def array_values(node); end def defined_action_methods(block); end @@ -1714,6 +1717,21 @@ end RuboCop::Cop::Rails::RequireDependency::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Rails::RequireDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +class RuboCop::Cop::Rails::ResponseParsedBody < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + def json_parse_response_body?(param0 = T.unsafe(nil)); end + def on_send(node); end + + private + + def autocorrect(corrector, node); end +end + +RuboCop::Cop::Rails::ResponseParsedBody::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::ResponseParsedBody::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::ReversibleMigration < ::RuboCop::Cop::Base include ::RuboCop::Cop::MigrationsHelper @@ -1967,12 +1985,14 @@ class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base def message(node); end def offense_detected?(node); end + def singleline_comments_present?(node); end def sql_heredoc?(node); end def using_squish?(node); end end RuboCop::Cop::Rails::SquishedSQLHeredocs::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL_IDENTIFIER_MARKERS = T.let(T.unsafe(nil), Regexp) RuboCop::Cop::Rails::SquishedSQLHeredocs::SQUISH = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::StripHeredoc < ::RuboCop::Cop::Base @@ -2164,8 +2184,10 @@ RuboCop::Cop::Rails::UnknownEnv::MSG_SIMILAR = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::UnusedIgnoredColumns < ::RuboCop::Cop::Base include ::RuboCop::Cop::ActiveRecordHelper + def appended_ignored_columns(param0 = T.unsafe(nil)); end def column_name(param0 = T.unsafe(nil)); end def ignored_columns(param0 = T.unsafe(nil)); end + def on_op_asgn(node); end def on_send(node); end private diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index bf86eb897a..3bb86d9c84 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -8298,18 +8298,80 @@ module Stdenv end class String + def acts_like_string?(); end + + def at(position); end + + def camelcase(first_letter=T.unsafe(nil)); end + + def camelize(first_letter=T.unsafe(nil)); end + + def classify(); end + + def constantize(); end + + def dasherize(); end + + def deconstantize(); end + + def demodulize(); end + def exclude?(string); end def fast_xs(); end + def first(limit=T.unsafe(nil)); end + + def foreign_key(separate_class_name_and_id_with_underscore=T.unsafe(nil)); end + + def from(position); end + + def html_safe(); end + + def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + def indent(amount, indent_string=T.unsafe(nil), indent_empty_lines=T.unsafe(nil)); end def indent!(amount, indent_string=T.unsafe(nil), indent_empty_lines=T.unsafe(nil)); end + def is_utf8?(); end + + def last(limit=T.unsafe(nil)); end + + def mb_chars(); end + + def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + def pluralize(count=T.unsafe(nil), locale=T.unsafe(nil)); end + + def remove(*patterns); end + + def remove!(*patterns); end + + def safe_constantize(); end + def shellescape(); end def shellsplit(); end + def singularize(locale=T.unsafe(nil)); end + + def squish(); end + + def squish!(); end + + def tableize(); end + + def titlecase(keep_id_suffix: T.unsafe(nil)); end + + def titleize(keep_id_suffix: T.unsafe(nil)); end + + def to(position); end + + def to_date(); end + + def to_datetime(); end + def to_nfc(); end def to_nfd(); end @@ -8317,6 +8379,18 @@ class String def to_nfkc(); end def to_nfkd(); end + + def to_time(form=T.unsafe(nil)); end + + def truncate(truncate_at, options=T.unsafe(nil)); end + + def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end + + def truncate_words(words_count, options=T.unsafe(nil)); end + + def underscore(); end + + def upcase_first(); end end class StringScanner From 6d7ff7afee9c8cb5eb198118dd962e67c2e0fdda Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 1 Mar 2023 07:30:11 -0800 Subject: [PATCH 4/9] Rename rubocop:disable --- Library/Homebrew/startup/bootsnap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/startup/bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb index ddecf639ef..f0fe9ca391 100644 --- a/Library/Homebrew/startup/bootsnap.rb +++ b/Library/Homebrew/startup/bootsnap.rb @@ -5,7 +5,7 @@ homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_B # portable ruby doesn't play nice with bootsnap # Can't use .exclude? here because we haven't required active_support yet. -homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/") # rubocop:disable Rails/NegateInclude +homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/") # rubocop:disable Style/InverseMethods homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"] # Apple Silicon doesn't play nice with bootsnap From 985b0c1b2af3a048c16b8a42ce2ca111d82840da Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 1 Mar 2023 07:34:53 -0800 Subject: [PATCH 5/9] Disable Rails cops in bootsnap --- Library/Homebrew/startup/bootsnap.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/startup/bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb index f0fe9ca391..a6d53b6571 100644 --- a/Library/Homebrew/startup/bootsnap.rb +++ b/Library/Homebrew/startup/bootsnap.rb @@ -1,10 +1,12 @@ # typed: false # frozen_string_literal: true +# Disable Rails cops, as we haven't required active_support yet. +# rubocop:disable Rails homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_BOOTSNAP"].nil? # portable ruby doesn't play nice with bootsnap -# Can't use .exclude? here because we haven't required active_support yet. + homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/") # rubocop:disable Style/InverseMethods homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"] @@ -32,8 +34,7 @@ if homebrew_bootsnap_enabled if defined?(Bootsnap) cache = ENV.fetch("HOMEBREW_CACHE", nil) || ENV.fetch("HOMEBREW_DEFAULT_CACHE", nil) - # Can't use .blank? here because we haven't required active_support yet. - raise "Needs HOMEBREW_CACHE or HOMEBREW_DEFAULT_CACHE!" if cache.nil? || cache.empty? # rubocop:disable Rails/Blank + raise "Needs HOMEBREW_CACHE or HOMEBREW_DEFAULT_CACHE!" if cache.nil? || cache.empty? Bootsnap.setup( cache_dir: cache, @@ -45,3 +46,4 @@ if homebrew_bootsnap_enabled $stderr.puts "Error: HOMEBREW_BOOTSNAP could not `require \"bootsnap\"`!\n\n" end end +# rubocop:enable Rails From 71402a9a41bc5e8cb1fab652cca6354fc6854f3f Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 1 Mar 2023 07:39:36 -0800 Subject: [PATCH 6/9] Disable false positive violation --- Library/Homebrew/rubocops/shared/desc_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/rubocops/shared/desc_helper.rb b/Library/Homebrew/rubocops/shared/desc_helper.rb index 38462b59e1..215075a1dd 100644 --- a/Library/Homebrew/rubocops/shared/desc_helper.rb +++ b/Library/Homebrew/rubocops/shared/desc_helper.rb @@ -53,7 +53,7 @@ module RuboCop desc_problem "Description shouldn't start with an article." if regex_match_group(desc, /^(the|an?)(?=\s)/i) # Check if invalid lowercase words are at the start of a desc. - if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && + if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && # rubocop:disable Style/InverseMethods (false positive) regex_match_group(desc, /^[a-z]/) desc_problem "Description should start with a capital letter." end From a5aef9785106c86f5a573a527715f32d93315fe9 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 1 Mar 2023 09:13:42 -0800 Subject: [PATCH 7/9] brew style --fix --- Library/Homebrew/build_options.rb | 2 +- Library/Homebrew/utils/curl.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb index 5f173ad2d2..10149e805a 100644 --- a/Library/Homebrew/build_options.rb +++ b/Library/Homebrew/build_options.rb @@ -29,7 +29,7 @@ class BuildOptions if option_defined? "with-#{name}" include? "with-#{name}" elsif option_defined? "without-#{name}" - !include? "without-#{name}" # rubocop:disable Rails/NegateInclude + !include? "without-#{name}" else false end diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index 472b53db94..80cf0517dc 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -132,7 +132,7 @@ module Utils timeout: end_time&.remaining, **command_options - return result if result.success? || !args.exclude?("--http1.1") + return result if result.success? || args.include?("--http1.1") raise Timeout::Error, result.stderr.lines.last.chomp if timeout && result.status.exitstatus == 28 From ef2baee7995f5f6088098a9d2e25def30f76751d Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 1 Mar 2023 09:15:54 -0800 Subject: [PATCH 8/9] disable false positive --- Library/Homebrew/rubocops/components_order.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/rubocops/components_order.rb b/Library/Homebrew/rubocops/components_order.rb index d1a92fe3da..4661aed6fa 100644 --- a/Library/Homebrew/rubocops/components_order.rb +++ b/Library/Homebrew/rubocops/components_order.rb @@ -112,7 +112,7 @@ module RuboCop end def check_on_system_block_content(component_precedence_list, on_system_block) - if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) + if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) # rubocop:disable Style/InverseMethods (false positive) offending_node(on_system_block) problem "Nest `#{on_system_block.method_name}` blocks inside `#{on_system_block.body.method_name}` " \ "blocks when there is only one inner block." do |corrector| From 6bca00e5427263f7be1a93c58e351a60ba853b60 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 2 Mar 2023 20:00:16 +0000 Subject: [PATCH 9/9] Update RBI files for rubocop-rails. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- Library/Homebrew/sorbet/rbi/parlour.rbi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/sorbet/rbi/parlour.rbi b/Library/Homebrew/sorbet/rbi/parlour.rbi index ceba77d5a0..0f043573bc 100644 --- a/Library/Homebrew/sorbet/rbi/parlour.rbi +++ b/Library/Homebrew/sorbet/rbi/parlour.rbi @@ -138,6 +138,11 @@ module Cask def token_conflicts?; end end + class Cask + sig { returns(T::Boolean) } + def loaded_from_api?; end + end + class Installer sig { returns(T::Boolean) } def binaries?; end