diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index f3e24eedad..6bfd4b1237 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -123,7 +123,7 @@ GEM rubocop-performance (1.11.3) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.10.1) + rubocop-rails (2.11.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.10.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.0.rbi similarity index 87% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.10.1.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.0.rbi index 72141d3af9..df9b555e38 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.10.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.0.rbi @@ -4,14 +4,11 @@ # typed: true -module RuboCop -end - -module RuboCop::Cop -end +module RuboCop; end +module RuboCop::Cop; end module RuboCop::Cop::ActiveRecordHelper - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def active_record?(param0 = T.unsafe(nil)); end def external_dependency_checksum; end @@ -100,13 +97,11 @@ class RuboCop::Cop::IndexMethod::Captures < ::Struct end RuboCop::Cop::IndexMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Rails -end +module RuboCop::Cop::Rails; end class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def on_send(node); end @@ -120,28 +115,23 @@ class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ActionFilter::ACTION_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ActionFilter::FILTER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ActionFilter::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ActiveRecordAliases < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_csend(node); end def on_send(node); end end RuboCop::Cop::Rails::ActiveRecordAliases::ALIASES = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::ActiveRecordAliases::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ActiveRecordAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_class(class_node); end @@ -161,9 +151,7 @@ class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_IN_ORDER = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_ORDER_MAP = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ActiveRecordOverride < ::RuboCop::Cop::Base @@ -178,13 +166,11 @@ class RuboCop::Cop::Rails::ActiveRecordOverride < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ActiveRecordOverride::ACTIVE_RECORD_CLASSES = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ActiveRecordOverride::BAD_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ActiveRecordOverride::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def append(param0 = T.unsafe(nil)); end def ends_with?(param0 = T.unsafe(nil)); end @@ -194,11 +180,24 @@ class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ActiveSupportAliases::ALIASES = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::ActiveSupportAliases::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ActiveSupportAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +class RuboCop::Cop::Rails::AddColumnIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + def add_column_with_index(param0 = T.unsafe(nil)); end + def on_send(node); end + + private + + def index_range(pair_node); end +end + +RuboCop::Cop::Rails::AddColumnIndex::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::AddColumnIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base def on_class(class_node); end @@ -211,27 +210,24 @@ class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::AfterCommitOverride::AFTER_COMMIT_CALLBACKS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::AfterCommitOverride::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ApplicationController < ::RuboCop::Cop::Base - include(::RuboCop::Cop::EnforceSuperclass) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector def class_definition(param0 = T.unsafe(nil)); end def class_new_definition(param0 = T.unsafe(nil)); end end RuboCop::Cop::Rails::ApplicationController::BASE_PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationController::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationController::SUPERCLASS = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ApplicationJob < ::RuboCop::Cop::Base - include(::RuboCop::Cop::EnforceSuperclass) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def autocorrect(node); end def class_definition(param0 = T.unsafe(nil)); end @@ -239,54 +235,47 @@ class RuboCop::Cop::Rails::ApplicationJob < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ApplicationJob::BASE_PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationJob::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationJob::SUPERCLASS = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ApplicationMailer < ::RuboCop::Cop::Base - include(::RuboCop::Cop::EnforceSuperclass) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def class_definition(param0 = T.unsafe(nil)); end def class_new_definition(param0 = T.unsafe(nil)); end end RuboCop::Cop::Rails::ApplicationMailer::BASE_PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationMailer::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationMailer::SUPERCLASS = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ApplicationRecord < ::RuboCop::Cop::Base - include(::RuboCop::Cop::EnforceSuperclass) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def class_definition(param0 = T.unsafe(nil)); end def class_new_definition(param0 = T.unsafe(nil)); end end RuboCop::Cop::Rails::ApplicationRecord::BASE_PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationRecord::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ApplicationRecord::SUPERCLASS = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ArelStar < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def star_bracket?(param0 = T.unsafe(nil)); end end RuboCop::Cop::Rails::ArelStar::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ArelStar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::AssertNot < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def offensive?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -297,11 +286,10 @@ class RuboCop::Cop::Rails::AssertNot < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::AssertNot::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::AssertNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::AttributeDefaultBlockValue < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def attribute(param0 = T.unsafe(nil)); end def default_attribute(param0 = T.unsafe(nil)); end @@ -309,27 +297,23 @@ class RuboCop::Cop::Rails::AttributeDefaultBlockValue < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::AttributeDefaultBlockValue::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::AttributeDefaultBlockValue::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::AttributeDefaultBlockValue::TYPE_OFFENDERS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::BelongsTo < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def match_belongs_to_with_options(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Rails::BelongsTo::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_FALSE_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_TRUE_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::Blank < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def defining_blank?(param0 = T.unsafe(nil)); end def nil_or_empty?(param0 = T.unsafe(nil)); end @@ -347,11 +331,8 @@ class RuboCop::Cop::Rails::Blank < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Blank::MSG_NIL_OR_EMPTY = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Blank::MSG_NOT_PRESENT = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Blank::MSG_UNLESS_PRESENT = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base @@ -381,31 +362,21 @@ class RuboCop::Cop::Rails::BulkChangeTable::AlterMethodsRecorder end RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::MIGRATION_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_ALTER_METHODS = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_CHANGE_TABLE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::BulkChangeTable::MYSQL = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def on_new_investigation; end def on_send(node); end @@ -420,7 +391,6 @@ class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ContentTag::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ContentTag::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::CreateTableWithTimestamps < ::RuboCop::Cop::Base @@ -436,11 +406,10 @@ class RuboCop::Cop::Rails::CreateTableWithTimestamps < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::CreateTableWithTimestamps::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::CreateTableWithTimestamps::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def on_const(node); end def on_csend(node); end @@ -448,6 +417,7 @@ class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base private + def allow_to_time?; end def bad_days; end def bad_methods; end def check_date_node(node); end @@ -461,15 +431,10 @@ class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Date::BAD_DAYS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::Date::DEPRECATED_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::Date::DEPRECATED_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Date::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Date::MSG_SEND = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Date::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::DefaultScope < ::RuboCop::Cop::Base @@ -482,11 +447,10 @@ class RuboCop::Cop::Rails::DefaultScope < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::DefaultScope::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::DefaultScope::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Delegate < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def delegate?(param0 = T.unsafe(nil)); end def on_def(node); end @@ -507,19 +471,18 @@ end RuboCop::Cop::Rails::Delegate::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::DelegateAllowBlank < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def allow_blank_option(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Rails::DelegateAllowBlank::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::DelegateAllowBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ActiveRecordHelper) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector def on_csend(node); end def on_send(node); end @@ -537,12 +500,27 @@ class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base def whitelisted?(node); end end +RuboCop::Cop::Rails::DynamicFindBy::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) RuboCop::Cop::Rails::DynamicFindBy::METHOD_PATTERN = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::DynamicFindBy::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Rails::EagerEvaluationLogMessage < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + def interpolated_string_passed_to_debug(param0 = T.unsafe(nil)); end + def on_send(node); end + + private + + def replacement_range(node); end + def replacement_source(node, arguments); end +end + +RuboCop::Cop::Rails::EagerEvaluationLogMessage::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::EagerEvaluationLogMessage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def array_pair?(param0 = T.unsafe(nil)); end def enum?(param0 = T.unsafe(nil)); end @@ -555,11 +533,10 @@ class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::EnumHash::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::EnumHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base - include(::RuboCop::Cop::Duplication) + include ::RuboCop::Cop::Duplication def enum?(param0 = T.unsafe(nil)); end def enum_values(param0 = T.unsafe(nil)); end @@ -571,11 +548,10 @@ class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::EnumUniqueness::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::EnumUniqueness::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::EnvironmentComparison < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def comparing_str_env_with_rails_env_on_lhs?(param0 = T.unsafe(nil)); end def comparing_str_env_with_rails_env_on_rhs?(param0 = T.unsafe(nil)); end @@ -594,9 +570,7 @@ class RuboCop::Cop::Rails::EnvironmentComparison < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::EnvironmentComparison::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::EnvironmentComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::EnvironmentComparison::SYM_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::EnvironmentVariableAccess < ::RuboCop::Cop::Base @@ -611,11 +585,10 @@ class RuboCop::Cop::Rails::EnvironmentVariableAccess < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::EnvironmentVariableAccess::READ_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::EnvironmentVariableAccess::WRITE_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::Exit < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def on_send(node); end @@ -627,14 +600,29 @@ class RuboCop::Cop::Rails::Exit < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Exit::EXPLICIT_RECEIVERS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::Exit::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Exit::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +class RuboCop::Cop::Rails::ExpandedDateRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + def expanded_date_range(param0 = T.unsafe(nil)); end + def on_irange(node); end + + private + + def same_receiver?(begin_node, end_node); end + def use_mapped_methods?(beginning_method, end_method); end +end + +RuboCop::Cop::Rails::ExpandedDateRange::MAPPED_DATE_RANGE_METHODS = T.let(T.unsafe(nil), Hash) +RuboCop::Cop::Rails::ExpandedDateRange::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::ExpandedDateRange::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp def file_join_nodes?(param0 = T.unsafe(nil)); end def on_dstr(node); end @@ -653,31 +641,28 @@ class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::FilePath::MSG_ARGUMENTS = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::FilePath::MSG_SLASHES = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::FilePath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_csend(node); end def on_send(node); end - def where_first?(param0 = T.unsafe(nil)); end private def autocorrect(corrector, node); end + def ignore_where_first?; end end RuboCop::Cop::Rails::FindBy::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::FindBy::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def find_by?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -694,12 +679,11 @@ class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::FindById::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::FindById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::FindEach < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ActiveRecordHelper) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end @@ -709,9 +693,7 @@ class RuboCop::Cop::Rails::FindEach < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::FindEach::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::FindEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::FindEach::SCOPE_METHODS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HasAndBelongsToMany < ::RuboCop::Cop::Base @@ -719,7 +701,6 @@ class RuboCop::Cop::Rails::HasAndBelongsToMany < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::HasAndBelongsToMany::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HasAndBelongsToMany::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HasManyOrHasOneDependent < ::RuboCop::Cop::Base @@ -743,7 +724,6 @@ class RuboCop::Cop::Rails::HasManyOrHasOneDependent < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::HasManyOrHasOneDependent::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HasManyOrHasOneDependent::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HelperInstanceVariable < ::RuboCop::Cop::Base @@ -759,9 +739,9 @@ end RuboCop::Cop::Rails::HelperInstanceVariable::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def http_request?(param0 = T.unsafe(nil)); end def kwsplat_hash?(param0 = T.unsafe(nil)); end @@ -779,14 +759,12 @@ class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::HttpPositionalArguments::KEYWORD_ARGS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::HttpPositionalArguments::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HttpPositionalArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def http_status(param0 = T.unsafe(nil)); end def on_send(node); end @@ -813,11 +791,8 @@ class RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker end RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::PERMITTED_STATUS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker @@ -836,9 +811,16 @@ class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker end RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Rails::I18nLocaleAssignment < ::RuboCop::Cop::Base + def i18n_locale_assignment?(param0 = T.unsafe(nil)); end + def on_send(node); end +end + +RuboCop::Cop::Rails::I18nLocaleAssignment::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::I18nLocaleAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base def filter_options(param0 = T.unsafe(nil)); end def on_send(node); end @@ -851,14 +833,12 @@ class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::FILTERS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::IndexBy < ::RuboCop::Cop::Base - include(::RuboCop::Cop::IndexMethod) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::IndexMethod + extend ::RuboCop::Cop::AutoCorrector def on_bad_each_with_object(param0 = T.unsafe(nil)); end def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end @@ -871,9 +851,9 @@ class RuboCop::Cop::Rails::IndexBy < ::RuboCop::Cop::Base end class RuboCop::Cop::Rails::IndexWith < ::RuboCop::Cop::Base - include(::RuboCop::Cop::IndexMethod) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + include ::RuboCop::Cop::IndexMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def on_bad_each_with_object(param0 = T.unsafe(nil)); end def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end @@ -890,7 +870,6 @@ class RuboCop::Cop::Rails::Inquiry < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Inquiry::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Inquiry::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::InverseOf < ::RuboCop::Cop::Base @@ -917,9 +896,7 @@ class RuboCop::Cop::Rails::InverseOf < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::InverseOf::NIL_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::InverseOf::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::InverseOf::SPECIFY_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base @@ -933,13 +910,11 @@ class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::LexicallyScopedActionFilter::FILTERS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::LexicallyScopedActionFilter::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::LexicallyScopedActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def blank_target?(param0 = T.unsafe(nil)); end def includes_noopener?(param0 = T.unsafe(nil)); end @@ -955,11 +930,10 @@ class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::LinkToBlank::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::LinkToBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::MailerName < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def class_definition?(param0 = T.unsafe(nil)); end def class_new_definition?(param0 = T.unsafe(nil)); end @@ -976,7 +950,7 @@ end RuboCop::Cop::Rails::MailerName::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::MatchRoute < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def match_method_call?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -994,20 +968,17 @@ class RuboCop::Cop::Rails::MatchRoute < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::MatchRoute::HTTP_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::MatchRoute::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::MatchRoute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::NegateInclude < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def negate_include_call?(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Rails::NegateInclude::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base @@ -1025,11 +996,10 @@ class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::NotNullColumn::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::NotNullColumn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::OrderById < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RangeHelp def on_send(node); end def order_by_id?(param0 = T.unsafe(nil)); end @@ -1040,7 +1010,6 @@ class RuboCop::Cop::Rails::OrderById < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::OrderById::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::OrderById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base @@ -1054,7 +1023,6 @@ class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Output::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Output::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::OutputSafety < ::RuboCop::Cop::Base @@ -1070,12 +1038,11 @@ class RuboCop::Cop::Rails::OutputSafety < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::OutputSafety::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::OutputSafety::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def on_send(node); end def pick_candidate?(param0 = T.unsafe(nil)); end @@ -1086,12 +1053,11 @@ class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Pick::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Pick::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::Pluck < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRailsVersion) + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion def on_block(node); end def pluck_candidate?(param0 = T.unsafe(nil)); end @@ -1105,9 +1071,9 @@ end RuboCop::Cop::Rails::Pluck::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::ActiveRecordHelper) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def pluck_id_call?(param0 = T.unsafe(nil)); end @@ -1118,13 +1084,12 @@ class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::PluckId::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::PluckId::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ActiveRecordHelper) - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ActiveRecordHelper + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end @@ -1134,11 +1099,10 @@ class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::PluckInWhere::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::PluckInWhere::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end @@ -1158,16 +1122,13 @@ class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::PluralizationGrammar::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::PluralizationGrammar::PLURAL_DURATION_METHODS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::PluralizationGrammar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::PluralizationGrammar::SINGULAR_DURATION_METHODS = T.let(T.unsafe(nil), Hash) class RuboCop::Cop::Rails::Presence < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_if(node); end def redundant_negative_receiver_and_other(param0 = T.unsafe(nil)); end @@ -1186,7 +1147,7 @@ end RuboCop::Cop::Rails::Presence::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def autocorrect(corrector, node); end def exists_and_not_empty?(param0 = T.unsafe(nil)); end @@ -1204,15 +1165,12 @@ class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Present::MSG_EXISTS_AND_NOT_EMPTY = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Present::MSG_NOT_BLANK = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Present::MSG_UNLESS_BLANK = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Present::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RakeEnvironment < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def task_definition?(param0 = T.unsafe(nil)); end @@ -1228,7 +1186,7 @@ end RuboCop::Cop::Rails::RakeEnvironment::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::ReadWriteAttribute < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def read_write_attribute?(param0 = T.unsafe(nil)); end @@ -1241,12 +1199,11 @@ class RuboCop::Cop::Rails::ReadWriteAttribute < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ReadWriteAttribute::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end @@ -1261,14 +1218,12 @@ class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RedundantAllowNil::MSG_ALLOW_NIL_FALSE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RedundantAllowNil::MSG_SAME = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RedundantAllowNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RedundantForeignKey < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def association_with_foreign_key(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1281,12 +1236,11 @@ class RuboCop::Cop::Rails::RedundantForeignKey < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RedundantForeignKey::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RedundantForeignKey::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RedundantReceiverInWithOptions < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def all_block_nodes_in(param0); end def all_send_nodes_in(param0); end @@ -1314,14 +1268,12 @@ class RuboCop::Cop::Rails::ReflectionClassName < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ReflectionClassName::ALLOWED_REFLECTION_CLASS_TYPES = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::ReflectionClassName::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ReflectionClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RefuteMethods < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def offensive?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1334,36 +1286,31 @@ class RuboCop::Cop::Rails::RefuteMethods < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RefuteMethods::ASSERT_NOT_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::RefuteMethods::CORRECTIONS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::RefuteMethods::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RefuteMethods::REFUTE_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::RefuteMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RelativeDateConstant < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_casgn(node); end def on_masgn(node); end def on_or_asgn(node); end - def relative_date?(param0 = T.unsafe(nil)); end - def relative_date_or_assignment?(param0 = T.unsafe(nil)); end + def relative_date(param0 = T.unsafe(nil)); end + def relative_date_or_assignment(param0 = T.unsafe(nil)); end private def autocorrect(corrector, node); end def message(method_name); end + def nested_relative_date(node, &callback); end def offense_range(name, value); end - def relative_date_method?(method_name); end end RuboCop::Cop::Rails::RelativeDateConstant::MSG = T.let(T.unsafe(nil), String) - -RuboCop::Cop::Rails::RelativeDateConstant::RELATIVE_DATE_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::Cop::Rails::RelativeDateConstant::RELATIVE_DATE_METHODS = T.let(T.unsafe(nil), Set) class RuboCop::Cop::Rails::RenderInline < ::RuboCop::Cop::Base def on_send(node); end @@ -1371,11 +1318,10 @@ class RuboCop::Cop::Rails::RenderInline < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RenderInline::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RenderInline::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def render_plain_text?(param0 = T.unsafe(nil)); end @@ -1388,12 +1334,11 @@ class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RenderPlainText::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RenderPlainText::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RequestReferer < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def referer?(param0 = T.unsafe(nil)); end @@ -1405,18 +1350,16 @@ class RuboCop::Cop::Rails::RequestReferer < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::RequestReferer::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::RequestReferer::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::RequireDependency < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::TargetRailsVersion) + extend ::RuboCop::Cop::TargetRailsVersion def on_send(node); end def require_dependency_call?(param0 = T.unsafe(nil)); end 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::ReversibleMigration < ::RuboCop::Cop::Base @@ -1459,8 +1402,8 @@ end RuboCop::Cop::Rails::ReversibleMigrationMethodDefinition::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::SafeNavigation < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def try_call(param0 = T.unsafe(nil)); end @@ -1476,11 +1419,10 @@ class RuboCop::Cop::Rails::SafeNavigation < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::SafeNavigation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::SafeNavigation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::SafeNavigationWithBlank < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_if(node); end def safe_navigation_blank_in_conditional?(param0 = T.unsafe(nil)); end @@ -1489,8 +1431,8 @@ end RuboCop::Cop::Rails::SafeNavigationWithBlank::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base - include(::RuboCop::Cop::NegativeConditional) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector def after_leaving_scope(scope, _variable_table); end def check_assignment(assignment); end @@ -1528,15 +1470,10 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::SaveBang::CREATE_CONDITIONAL_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::SaveBang::CREATE_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::SaveBang::CREATE_PERSIST_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::SaveBang::MODIFY_PERSIST_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::SaveBang::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::SaveBang::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base @@ -1545,21 +1482,18 @@ class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::ScopeArgs::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ScopeArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::ShortI18n < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def long_i18n?(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Rails::ShortI18n::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::ShortI18n::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Rails::ShortI18n::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base @@ -1579,12 +1513,11 @@ class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::SkipsModelValidations::METHODS_WITH_ARGUMENTS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::SkipsModelValidations::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base - include(::RuboCop::Cop::Heredoc) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector def on_heredoc(node); end @@ -1597,14 +1530,12 @@ class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base 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::SQUISH = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_const(node); end @@ -1631,17 +1562,11 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::TimeZone::ACCEPTED_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::TimeZone::DANGEROUS_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::TimeZone::GOOD_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::TimeZone::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::TimeZone::MSG_ACCEPTABLE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::TimeZone::MSG_LOCALTIME = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::TimeZone::TIMEZONE_SPECIFIER = T.let(T.unsafe(nil), Regexp) class RuboCop::Cop::Rails::TimeZoneAssignment < ::RuboCop::Cop::Base @@ -1650,13 +1575,12 @@ class RuboCop::Cop::Rails::TimeZoneAssignment < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::TimeZoneAssignment::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::TimeZoneAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def aggressive_node_match(param0 = T.unsafe(nil)); end def conservative_node_match(param0 = T.unsafe(nil)); end @@ -1670,15 +1594,12 @@ class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::UniqBeforePluck::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::UniqBeforePluck::NEWLINE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::UniqBeforePluck::PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::UniqBeforePluck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ActiveRecordHelper) + include ::RuboCop::Cop::ActiveRecordHelper def on_send(node); end @@ -1698,7 +1619,6 @@ class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::UniqueValidationWithoutIndex::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::UniqueValidationWithoutIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::UnknownEnv < ::RuboCop::Cop::Base @@ -1717,11 +1637,27 @@ class RuboCop::Cop::Rails::UnknownEnv < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::UnknownEnv::MSG = T.let(T.unsafe(nil), String) - 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 column_name(param0 = T.unsafe(nil)); end + def ignored_columns(param0 = T.unsafe(nil)); end + def on_send(node); end + + private + + def check_column_existence(column_node, table); end + def class_node(node); end + def table(node); end +end + +RuboCop::Cop::Rails::UnusedIgnoredColumns::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Rails::UnusedIgnoredColumns::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end @@ -1738,16 +1674,13 @@ class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::Validation::ALLOWLIST = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::Validation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::Validation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Rails::Validation::TYPES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def where_method_call?(param0 = T.unsafe(nil)); end @@ -1760,22 +1693,16 @@ class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::WhereEquals::EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereEquals::EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereEquals::IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereEquals::IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereEquals::IS_NULL_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereEquals::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def exists_with_args?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1794,12 +1721,11 @@ class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::WhereExists::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::WhereExists::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def where_method_call?(param0 = T.unsafe(nil)); end @@ -1812,17 +1738,11 @@ class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base end RuboCop::Cop::Rails::WhereNot::IS_NOT_NULL_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereNot::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Rails::WhereNot::NOT_EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereNot::NOT_EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereNot::NOT_IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereNot::NOT_IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Rails::WhereNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::TargetRailsVersion @@ -1831,13 +1751,10 @@ module RuboCop::Cop::TargetRailsVersion end RuboCop::NodePattern = RuboCop::AST::NodePattern - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -module RuboCop::Rails -end - +module RuboCop::Rails; end RuboCop::Rails::CONFIG = T.let(T.unsafe(nil), Hash) +RuboCop::Rails::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) module RuboCop::Rails::Inject class << self @@ -1845,8 +1762,10 @@ module RuboCop::Rails::Inject end end +RuboCop::Rails::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + module RuboCop::Rails::SchemaLoader - extend(::RuboCop::Rails::SchemaLoader) + extend ::RuboCop::Rails::SchemaLoader def db_schema_path; end def load(target_ruby_version); end @@ -1927,5 +1846,4 @@ module RuboCop::Rails::Version end RuboCop::Rails::Version::STRING = T.let(T.unsafe(nil), String) - RuboCop::Token = RuboCop::AST::Token diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 7728e6d190..cc928ede9c 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -26789,8 +26789,10 @@ class RuboCop::AST::NodePattern::Parser end module RuboCop::AST::NodePattern::Sets + SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) + SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) SET_EQL_EQ_BE = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 8ed22cd5e7..f333d921be 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -81,7 +81,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11 $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.17.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.10.1/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/config/default.yml similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/config/default.yml index 82881fcdb4..27e926b27d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/config/default.yml @@ -83,6 +83,16 @@ Rails/ActiveSupportAliases: Enabled: true VersionAdded: '0.48' +Rails/AddColumnIndex: + Description: >- + Rails migrations don't make use of a given `index` key, but also + doesn't given an error when it's used, so it makes it seem like an + index might be used. + Enabled: pending + VersionAdded: '2.11' + Include: + - db/migrate/*.rb + Rails/AfterCommitOverride: Description: >- This cop enforces that there is only one call to `after_commit` @@ -193,7 +203,7 @@ Rails/Date: such as Date.today, Date.current etc. Enabled: true VersionAdded: '0.30' - VersionChanged: '0.33' + VersionChanged: '2.11' # The value `strict` disallows usage of `Date.today`, `Date.current`, # `Date#to_time` etc. # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc @@ -203,6 +213,7 @@ Rails/Date: SupportedStyles: - strict - flexible + AllowToTime: true Rails/DefaultScope: Description: 'Avoid use of `default_scope`.' @@ -240,6 +251,12 @@ Rails/DynamicFindBy: AllowedReceivers: - Gem::Specification +Rails/EagerEvaluationLogMessage: + Description: 'Checks that blocks are used for interpolated strings passed to `Rails.logger.debug`.' + Reference: 'https://guides.rubyonrails.org/debugging_rails_applications.html#impact-of-logs-on-performance' + Enabled: pending + VersionAdded: '2.11' + Rails/EnumHash: Description: 'Prefer hash syntax over array syntax when defining enums.' StyleGuide: 'https://rails.rubystyle.guide#enums' @@ -262,8 +279,10 @@ Rails/EnvironmentComparison: Rails/EnvironmentVariableAccess: Description: 'Do not access `ENV` directly after initialization.' - Enabled: pending + # TODO: Set to `pending` status in RuboCop Rails 2 series when migration doc will be written. + Enabled: false VersionAdded: '2.10' + VersionChanged: '2.11' Include: - app/**/*.rb - lib/**/*.rb @@ -286,6 +305,11 @@ Rails/Exit: Exclude: - lib/**/*.rake +Rails/ExpandedDateRange: + Description: 'Checks for expanded date range.' + Enabled: pending + VersionAdded: '2.11' + Rails/FilePath: Description: 'Use `Rails.root.join` for file path joining.' Enabled: true @@ -301,6 +325,8 @@ Rails/FindBy: StyleGuide: 'https://rails.rubystyle.guide#find_by' Enabled: true VersionAdded: '0.30' + VersionChanged: '2.11' + IgnoreWhereFirst: true Include: - app/models/**/*.rb @@ -362,11 +388,20 @@ Rails/HttpStatus: Description: 'Enforces use of symbolic or numeric value to define HTTP status.' Enabled: true VersionAdded: '0.54' + VersionChanged: '2.11' EnforcedStyle: symbolic SupportedStyles: - numeric - symbolic +Rails/I18nLocaleAssignment: + Description: 'Prefer the usage of `I18n.with_locale` instead of manually updating `I18n.locale` value.' + Enabled: 'pending' + VersionAdded: '2.11' + Include: + - spec/**/*.rb + - test/**/*.rb + Rails/IgnoredSkipActionFilterOption: Description: 'Checks that `if` and `only` (or `except`) are not used together as options of `skip_*` action filter.' Reference: 'https://api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html#method-i-_normalize_callback_options' @@ -784,6 +819,13 @@ Rails/UnknownEnv: - test - production +Rails/UnusedIgnoredColumns: + Description: 'Remove a column that does not exist from `ignored_columns`.' + Enabled: pending + VersionAdded: '2.11' + Include: + - app/models/**/*.rb + Rails/Validation: Description: 'Use validates :attribute, hash of validations.' Enabled: true diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/config/obsoletion.yml similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/config/obsoletion.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/config/obsoletion.yml diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop-rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop-rails.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop-rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop-rails.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/mixin/active_record_helper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/mixin/active_record_helper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/mixin/active_record_helper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/mixin/enforce_superclass.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/mixin/enforce_superclass.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/mixin/enforce_superclass.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/mixin/index_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/mixin/index_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/mixin/index_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/mixin/target_rails_version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/mixin/target_rails_version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/mixin/target_rails_version.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/action_filter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/active_record_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/active_record_aliases.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/active_record_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/active_record_aliases.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/active_record_callbacks_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/active_record_callbacks_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/active_record_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/active_record_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/active_record_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/active_support_aliases.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/active_support_aliases.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/active_support_aliases.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/add_column_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/add_column_index.rb new file mode 100644 index 0000000000..e7816d5fa6 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/add_column_index.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop checks for migrations using `add_column` that have an `index` + # key. `add_column` does not accept `index`, but also does not raise an + # error for extra keys, so it is possible to mistakenly add the key without + # realizing it will not actually add an index. + # + # @example + # # bad (will not add an index) + # add_column :table, :column, :integer, index: true + # + # # good + # add_column :table, :column, :integer + # add_index :table, :column + # + class AddColumnIndex < Base + extend AutoCorrector + include RangeHelp + + MSG = '`add_column` does not accept an `index` key, use `add_index` instead.' + RESTRICT_ON_SEND = %i[add_column].freeze + + # @!method add_column_with_index(node) + def_node_matcher :add_column_with_index, <<~PATTERN + ( + send nil? :add_column $_table $_column + <(hash <$(pair {(sym :index) (str "index")} $_) ...>) ...> + ) + PATTERN + + def on_send(node) + table, column, pair, value = add_column_with_index(node) + return unless pair + + add_offense(pair) do |corrector| + corrector.remove(index_range(pair)) + + add_index = "add_index #{table.source}, #{column.source}" + add_index_opts = '' + + if value.hash_type? + hash = value.loc.expression.adjust(begin_pos: 1, end_pos: -1).source.strip + add_index_opts = ", #{hash}" + end + + corrector.insert_after(node, "\n#{add_index}#{add_index_opts}") + end + end + + private + + def index_range(pair_node) + range_with_surrounding_comma( + range_with_surrounding_space(range: pair_node.loc.expression, side: :left), + :left + ) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/after_commit_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/after_commit_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/after_commit_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/application_controller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/application_controller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/application_controller.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/application_job.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/application_job.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/application_job.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/application_mailer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/application_mailer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/application_mailer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/application_record.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/application_record.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/application_record.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/arel_star.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/arel_star.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/arel_star.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/assert_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/assert_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/assert_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/attribute_default_block_value.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/attribute_default_block_value.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/belongs_to.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/belongs_to.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/belongs_to.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/belongs_to.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/blank.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/bulk_change_table.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/bulk_change_table.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/bulk_change_table.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/bulk_change_table.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/content_tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/content_tag.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/content_tag.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/create_table_with_timestamps.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/create_table_with_timestamps.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/date.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/date.rb similarity index 88% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/date.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/date.rb index 79b074e78a..decc517d5d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/date.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/date.rb @@ -12,20 +12,21 @@ module RuboCop # The cop also reports warnings when you are using `to_time` method, # because it doesn't know about Rails time zone either. # - # Two styles are supported for this cop. When EnforcedStyle is 'strict' + # Two styles are supported for this cop. When `EnforcedStyle` is 'strict' # then the Date methods `today`, `current`, `yesterday`, and `tomorrow` # are prohibited and the usage of both `to_time` # and 'to_time_in_current_zone' are reported as warning. # - # When EnforcedStyle is 'flexible' then only `Date.today` is prohibited - # and only `to_time` is reported as warning. + # When `EnforcedStyle` is `flexible` then only `Date.today` is prohibited. + # + # And you can set a warning for `to_time` with `AllowToTime: false`. + # `AllowToTime` is `true` by default to prevent false positive on `DateTime` object. # # @example EnforcedStyle: strict # # bad # Date.current # Date.yesterday # Date.today - # date.to_time # # # good # Time.zone.today @@ -34,7 +35,6 @@ module RuboCop # @example EnforcedStyle: flexible (default) # # bad # Date.today - # date.to_time # # # good # Time.zone.today @@ -43,6 +43,13 @@ module RuboCop # Date.yesterday # date.in_time_zone # + # @example AllowToTime: true (default) + # # good + # date.to_time + # + # @example AllowToTime: false + # # bad + # date.to_time class Date < Base include ConfigurableEnforcedStyle @@ -73,7 +80,7 @@ module RuboCop def on_send(node) return unless node.receiver && bad_methods.include?(node.method_name) - + return if allow_to_time? && node.method?(:to_time) return if safe_chain?(node) || safe_to_time?(node) check_deprecated_methods(node) @@ -139,6 +146,10 @@ module RuboCop end end + def allow_to_time? + cop_config.fetch('AllowToTime', true) + end + def good_days style == :strict ? [] : %i[current yesterday tomorrow] end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/default_scope.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/default_scope.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/default_scope.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/delegate.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/delegate.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/delegate.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/delegate.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/delegate_allow_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/delegate_allow_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/delegate_allow_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/dynamic_find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/dynamic_find_by.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/dynamic_find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/dynamic_find_by.rb index 87a06c4ad6..75358c8367 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/dynamic_find_by.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/dynamic_find_by.rb @@ -37,6 +37,7 @@ module RuboCop MSG = 'Use `%s` instead of dynamic `%s`.' METHOD_PATTERN = /^find_by_(.+?)(!)?$/.freeze + IGNORED_ARGUMENT_TYPES = %i[hash splat].freeze def on_send(node) return if node.receiver.nil? && !inherit_active_record_base?(node) || allowed_invocation?(node) @@ -44,7 +45,7 @@ module RuboCop method_name = node.method_name static_name = static_method_name(method_name) return unless static_name - return if node.arguments.any?(&:splat_type?) + return if node.arguments.any? { |argument| IGNORED_ARGUMENT_TYPES.include?(argument.type) } message = format(MSG, static_name: static_name, method: method_name) add_offense(node, message: message) do |corrector| diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb new file mode 100644 index 0000000000..a5d0ebe51f --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/eager_evaluation_log_message.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop checks that blocks are used for interpolated strings passed to + # `Rails.logger.debug`. + # + # By default, Rails production environments use the `:info` log level. + # At the `:info` log level, `Rails.logger.debug` statements do not result + # in log output. However, Ruby must eagerly evaluate interpolated string + # arguments passed as method arguments. Passing a block to + # `Rails.logger.debug` prevents costly evaluation of interpolated strings + # when no output would be produced anyway. + # + # @example + # #bad + # Rails.logger.debug "The time is #{Time.zone.now}." + # + # #good + # Rails.logger.debug { "The time is #{Time.zone.now}." } + # + class EagerEvaluationLogMessage < Base + extend AutoCorrector + + MSG = 'Pass a block to `Rails.logger.debug`.' + RESTRICT_ON_SEND = %i[debug].freeze + + def_node_matcher :interpolated_string_passed_to_debug, <<~PATTERN + (send + (send + (const {cbase nil?} :Rails) + :logger + ) + :debug + $(dstr ...) + ) + PATTERN + + def on_send(node) + return if node.parent&.block_type? + + interpolated_string_passed_to_debug(node) do |arguments| + message = format(MSG) + + range = replacement_range(node) + replacement = replacement_source(node, arguments) + + add_offense(range, message: message) do |corrector| + corrector.replace(range, replacement) + end + end + end + + private + + def replacement_range(node) + stop = node.loc.expression.end + start = node.loc.selector.end + + if node.parenthesized_call? + stop.with(begin_pos: start.begin_pos) + else + stop.with(begin_pos: start.begin_pos + 1) + end + end + + def replacement_source(node, arguments) + if node.parenthesized_call? + " { #{arguments.source} }" + else + "{ #{arguments.source} }" + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/enum_hash.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/enum_hash.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/enum_hash.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/enum_uniqueness.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/enum_uniqueness.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/enum_uniqueness.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/environment_comparison.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/environment_comparison.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/environment_comparison.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/environment_variable_access.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/environment_variable_access.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/environment_variable_access.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/exit.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/exit.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/exit.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/exit.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/expanded_date_range.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/expanded_date_range.rb new file mode 100644 index 0000000000..34e1d341af --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/expanded_date_range.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop checks for expanded date range. It only compatible `..` range is targeted. + # Incompatible `...` range is ignored. + # + # @example + # # bad + # date.beginning_of_day..date.end_of_day + # date.beginning_of_week..date.end_of_week + # date.beginning_of_month..date.end_of_month + # date.beginning_of_quarter..date.end_of_quarter + # date.beginning_of_year..date.end_of_year + # + # # good + # date.all_day + # date.all_week + # date.all_month + # date.all_quarter + # date.all_year + # + class ExpandedDateRange < Base + extend AutoCorrector + extend TargetRailsVersion + + MSG = 'Use `%s` instead.' + + minimum_target_rails_version 5.1 + + def_node_matcher :expanded_date_range, <<~PATTERN + (irange + (send + $_ {:beginning_of_day :beginning_of_week :beginning_of_month :beginning_of_quarter :beginning_of_year}) + (send + $_ {:end_of_day :end_of_week :end_of_month :end_of_quarter :end_of_year})) + PATTERN + + PREFERRED_METHODS = { + beginning_of_day: 'all_day', + beginning_of_week: 'all_week', + beginning_of_month: 'all_month', + beginning_of_quarter: 'all_quarter', + beginning_of_year: 'all_year' + }.freeze + + MAPPED_DATE_RANGE_METHODS = { + beginning_of_day: :end_of_day, + beginning_of_week: :end_of_week, + beginning_of_month: :end_of_month, + beginning_of_quarter: :end_of_quarter, + beginning_of_year: :end_of_year + }.freeze + + def on_irange(node) + return unless expanded_date_range(node) + + begin_node = node.begin + end_node = node.end + return unless same_receiver?(begin_node, end_node) + + beginning_method = begin_node.method_name + end_method = end_node.method_name + return unless use_mapped_methods?(beginning_method, end_method) + + preferred_method = "#{begin_node.receiver.source}.#{PREFERRED_METHODS[beginning_method]}" + + add_offense(node, message: format(MSG, preferred_method: preferred_method)) do |corrector| + corrector.replace(node, preferred_method) + end + end + + private + + def same_receiver?(begin_node, end_node) + begin_node.receiver.source == end_node.receiver.source + end + + def use_mapped_methods?(beginning_method, end_method) + MAPPED_DATE_RANGE_METHODS[beginning_method] == end_method + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/file_path.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/find_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/find_by.rb similarity index 61% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/find_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/find_by.rb index aa58f63371..14a4bdd1b3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/find_by.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/find_by.rb @@ -3,16 +3,27 @@ module RuboCop module Cop module Rails - # This cop is used to identify usages of `where.first` and - # change them to use `find_by` instead. + # This cop is used to identify usages of `where.take` and change them to use `find_by` instead. + # + # And `where(...).first` can return different results from `find_by`. + # (They order records differently, so the "first" record can be different.) + # + # If you also want to detect `where.first`, you can set `IgnoreWhereFirst` to false. # # @example # # bad - # User.where(name: 'Bruce').first # User.where(name: 'Bruce').take # # # good # User.find_by(name: 'Bruce') + # + # @example IgnoreWhereFirst: true (default) + # # good + # User.where(name: 'Bruce').first + # + # @example IgnoreWhereFirst: false + # # bad + # User.where(name: 'Bruce').first class FindBy < Base include RangeHelp extend AutoCorrector @@ -20,12 +31,8 @@ module RuboCop MSG = 'Use `find_by` instead of `where.%s`.' RESTRICT_ON_SEND = %i[first take].freeze - def_node_matcher :where_first?, <<~PATTERN - (send ({send csend} _ :where ...) {:first :take}) - PATTERN - def on_send(node) - return unless where_first?(node) + return if ignore_where_first? && node.method?(:first) range = range_between(node.receiver.loc.selector.begin_pos, node.loc.selector.end_pos) @@ -38,9 +45,6 @@ module RuboCop private def autocorrect(corrector, node) - # Don't autocorrect where(...).first, because it can return different - # results from find_by. (They order records differently, so the - # 'first' record can be different.) return if node.method?(:first) where_loc = node.receiver.loc.selector @@ -49,6 +53,10 @@ module RuboCop corrector.replace(where_loc, 'find_by') corrector.replace(first_loc, '') end + + def ignore_where_first? + cop_config.fetch('IgnoreWhereFirst', true) + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/find_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/find_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/find_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/find_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/find_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/find_each.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/has_and_belongs_to_many.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/has_and_belongs_to_many.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/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.11.0/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/helper_instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/helper_instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/helper_instance_variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/http_positional_arguments.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/http_positional_arguments.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/http_positional_arguments.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/http_status.rb similarity index 89% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/http_status.rb index d24a1178fd..adc4047a8c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/http_status.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/http_status.rb @@ -11,12 +11,14 @@ module RuboCop # render json: { foo: 'bar' }, status: 200 # render plain: 'foo/bar', status: 304 # redirect_to root_url, status: 301 + # head 200 # # # good # render :foo, status: :ok # render json: { foo: 'bar' }, status: :ok # render plain: 'foo/bar', status: :not_modified # redirect_to root_url, status: :moved_permanently + # head :ok # # @example EnforcedStyle: numeric # # bad @@ -24,23 +26,26 @@ module RuboCop # render json: { foo: 'bar' }, status: :not_found # render plain: 'foo/bar', status: :not_modified # redirect_to root_url, status: :moved_permanently + # head :ok # # # good # render :foo, status: 200 # render json: { foo: 'bar' }, status: 404 # render plain: 'foo/bar', status: 304 # redirect_to root_url, status: 301 + # head 200 # class HttpStatus < Base include ConfigurableEnforcedStyle extend AutoCorrector - RESTRICT_ON_SEND = %i[render redirect_to].freeze + RESTRICT_ON_SEND = %i[render redirect_to head].freeze def_node_matcher :http_status, <<~PATTERN { (send nil? {:render :redirect_to} _ $hash) (send nil? {:render :redirect_to} $hash) + (send nil? :head ${int sym} ...) } PATTERN @@ -49,8 +54,12 @@ module RuboCop PATTERN def on_send(node) - http_status(node) do |hash_node| - status = status_code(hash_node) + http_status(node) do |hash_node_or_status_code| + status = if hash_node_or_status_code.hash_type? + status_code(hash_node_or_status_code) + else + hash_node_or_status_code + end return unless status checker = checker_class.new(status) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb new file mode 100644 index 0000000000..6b3dfb9eaf --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/i18n_locale_assignment.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop checks for the use of `I18n.locale=` method. + # + # The `locale` attribute persists for the rest of the Ruby runtime, potentially causing + # unexpected behavior at a later time. + # Using `I18n.with_locale` ensures the code passed in the block is the only place `I18n.locale` is affected. + # It eliminates the possibility of a `locale` sticking around longer than intended. + # + # @example + # # bad + # I18n.locale = :fr + # + # # good + # I18n.with_locale(:fr) do + # end + # + class I18nLocaleAssignment < Base + MSG = 'Use `I18n.with_locale` with block instead of `I18n.locale=`.' + RESTRICT_ON_SEND = %i[locale=].freeze + + def_node_matcher :i18n_locale_assignment?, <<~PATTERN + (send (const {nil? cbase} :I18n) :locale= ...) + PATTERN + + def on_send(node) + return unless i18n_locale_assignment?(node) + + add_offense(node) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/index_by.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/index_by.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/index_by.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/index_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/index_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/index_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/inquiry.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/inquiry.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/inquiry.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/inquiry.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/inverse_of.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/inverse_of.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/inverse_of.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/inverse_of.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/link_to_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/link_to_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/link_to_blank.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/mailer_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/mailer_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/mailer_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/match_route.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/match_route.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/match_route.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/negate_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/negate_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/negate_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/negate_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/not_null_column.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/not_null_column.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/not_null_column.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/not_null_column.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/order_by_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/order_by_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/order_by_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/output_safety.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/output_safety.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/output_safety.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pick.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pick.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pick.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pick.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pluck.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pluck.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pluck_id.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/pluck_id.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pluck_id.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pluck_in_where.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/pluck_in_where.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pluck_in_where.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/pluralization_grammar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/pluralization_grammar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/pluralization_grammar.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/presence.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/presence.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/presence.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/presence.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/present.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/present.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/present.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/present.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/rake_environment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/rake_environment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/rake_environment.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/read_write_attribute.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/read_write_attribute.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/read_write_attribute.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/redundant_allow_nil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/redundant_allow_nil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/redundant_allow_nil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/redundant_foreign_key.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/redundant_foreign_key.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/redundant_foreign_key.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/reflection_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/reflection_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reflection_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/refute_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/refute_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/refute_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/relative_date_constant.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/relative_date_constant.rb similarity index 71% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/relative_date_constant.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/relative_date_constant.rb index 6e00fe1fde..45beecf00f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/relative_date_constant.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/relative_date_constant.rb @@ -33,16 +33,12 @@ module RuboCop MSG = 'Do not assign `%s` to constants as it ' \ 'will be evaluated only once.' - RELATIVE_DATE_METHODS = %i[since from_now after ago until before yesterday tomorrow].freeze + RELATIVE_DATE_METHODS = %i[since from_now after ago until before yesterday tomorrow].to_set.freeze def on_casgn(node) - return if node.children[2]&.block_type? - - node.each_descendant(:send) do |send_node| - relative_date?(send_node) do |method_name| - add_offense(node, message: message(method_name)) do |corrector| - autocorrect(corrector, node) - end + nested_relative_date(node) do |method_name| + add_offense(node, message: message(method_name)) do |corrector| + autocorrect(corrector, node) end end end @@ -55,7 +51,7 @@ module RuboCop lhs.children.zip(rhs.children).each do |(name, value)| next unless name.casgn_type? - relative_date?(value) do |method_name| + nested_relative_date(value) do |method_name| add_offense(offense_range(name, value), message: message(method_name)) do |corrector| autocorrect(corrector, node) end @@ -64,7 +60,7 @@ module RuboCop end def on_or_asgn(node) - relative_date_or_assignment?(node) do |method_name| + relative_date_or_assignment(node) do |method_name| add_offense(node, message: format(MSG, method_name: method_name)) end end @@ -93,20 +89,22 @@ module RuboCop range_between(name.loc.expression.begin_pos, value.loc.expression.end_pos) end - def relative_date_method?(method_name) - RELATIVE_DATE_METHODS.include?(method_name) + def nested_relative_date(node, &callback) + return if node.block_type? + + node.each_child_node do |child| + nested_relative_date(child, &callback) + end + + relative_date(node, &callback) end - def_node_matcher :relative_date_or_assignment?, <<~PATTERN - (:or_asgn (casgn _ _) (send _ $#relative_date_method?)) + def_node_matcher :relative_date_or_assignment, <<~PATTERN + (:or_asgn (casgn _ _) (send _ $RELATIVE_DATE_METHODS)) PATTERN - def_node_matcher :relative_date?, <<~PATTERN - { - ({erange irange} _ (send _ $#relative_date_method?)) - ({erange irange} (send _ $#relative_date_method?) _) - (send _ $#relative_date_method?) - } + def_node_matcher :relative_date, <<~PATTERN + (send _ $RELATIVE_DATE_METHODS) PATTERN end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/render_inline.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/render_inline.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/render_inline.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/render_plain_text.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/render_plain_text.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/render_plain_text.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/request_referer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/request_referer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/request_referer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/require_dependency.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/require_dependency.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/require_dependency.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/reversible_migration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reversible_migration.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/reversible_migration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reversible_migration.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/reversible_migration_method_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/reversible_migration_method_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb index 4a2b90d1ba..29914b49d5 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/reversible_migration_method_definition.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/reversible_migration_method_definition.rb @@ -50,7 +50,7 @@ module RuboCop (class (const nil? _) (send - (const (const nil? :ActiveRecord) :Migration) + (const (const {nil? cbase} :ActiveRecord) :Migration) :[] (float _)) _) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/safe_navigation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/safe_navigation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/safe_navigation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/safe_navigation_with_blank.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/safe_navigation_with_blank.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/save_bang.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/save_bang.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/save_bang.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/scope_args.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/scope_args.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/scope_args.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/short_i18n.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/short_i18n.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/short_i18n.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/skips_model_validations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/skips_model_validations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/skips_model_validations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/squished_sql_heredocs.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/squished_sql_heredocs.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/squished_sql_heredocs.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone.rb index 4182aa562d..90ef9d5ff9 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone.rb @@ -8,41 +8,33 @@ module RuboCop # Built on top of Ruby on Rails style guide (https://rails.rubystyle.guide#time) # and the article http://danilenko.org/2012/7/6/rails_timezones/ # - # Two styles are supported for this cop. When EnforcedStyle is 'strict' - # then only use of Time.zone is allowed. + # Two styles are supported for this cop. When `EnforcedStyle` is 'strict' + # then only use of `Time.zone` is allowed. # # When EnforcedStyle is 'flexible' then it's also allowed - # to use Time.in_time_zone. + # to use `Time#in_time_zone`. + # + # @example + # # bad + # Time.now + # Time.parse('2015-03-02T19:05:37') + # + # # good + # Time.current + # Time.zone.now + # Time.zone.parse('2015-03-02T19:05:37') + # Time.zone.parse('2015-03-02T19:05:37Z') # Respect ISO 8601 format with timezone specifier. # # @example EnforcedStyle: strict # # `strict` means that `Time` should be used with `zone`. # # # bad - # Time.now - # Time.parse('2015-03-02T19:05:37') - # - # # bad - # Time.current # Time.at(timestamp).in_time_zone # - # # good - # Time.zone.now - # Time.zone.parse('2015-03-02T19:05:37') - # Time.zone.parse('2015-03-02T19:05:37Z') # Respect ISO 8601 format with timezone specifier. - # # @example EnforcedStyle: flexible (default) # # `flexible` allows usage of `in_time_zone` instead of `zone`. # - # # bad - # Time.now - # Time.parse('2015-03-02T19:05:37') - # # # good - # Time.zone.now - # Time.zone.parse('2015-03-02T19:05:37') - # - # # good - # Time.current # Time.at(timestamp).in_time_zone class TimeZone < Base include ConfigurableEnforcedStyle @@ -59,7 +51,7 @@ module RuboCop GOOD_METHODS = %i[zone zone_default find_zone find_zone!].freeze - DANGEROUS_METHODS = %i[now local new parse at current].freeze + DANGEROUS_METHODS = %i[now local new parse at].freeze ACCEPTED_METHODS = %i[in_time_zone utc getlocal xmlschema iso8601 jisx0301 rfc3339 httpdate to_i to_f].freeze diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone_assignment.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone_assignment.rb similarity index 78% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone_assignment.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone_assignment.rb index b3a78ef58c..d279d4565e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/time_zone_assignment.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/time_zone_assignment.rb @@ -6,8 +6,8 @@ module RuboCop # This cop checks for the use of `Time.zone=` method. # # The `zone` attribute persists for the rest of the Ruby runtime, potentially causing - # unexpected behaviour at a later time. - # Using `Time.use_zone` ensures the code passed in block is the only place Time.zone is affected. + # unexpected behavior at a later time. + # Using `Time.use_zone` ensures the code passed in the block is the only place Time.zone is affected. # It eliminates the possibility of a `zone` sticking around longer than intended. # # @example @@ -19,7 +19,7 @@ module RuboCop # end # class TimeZoneAssignment < Base - MSG = 'Use `Time.use_zone` with blocks instead of `Time.zone=`.' + MSG = 'Use `Time.use_zone` with block instead of `Time.zone=`.' RESTRICT_ON_SEND = %i[zone=].freeze def_node_matcher :time_zone_assignement?, <<~PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/uniq_before_pluck.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/uniq_before_pluck.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/uniq_before_pluck.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/unique_validation_without_index.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/unique_validation_without_index.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/unknown_env.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/unknown_env.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/unknown_env.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/unused_ignored_columns.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/unused_ignored_columns.rb new file mode 100644 index 0000000000..5fa569b855 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/unused_ignored_columns.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Rails + # This cop suggests you remove a column that does not exist in the schema from `ignored_columns`. + # `ignored_columns` is necessary to drop a column from RDBMS, but you don't need it after the migration + # to drop the column. You avoid forgetting to remove `ignored_columns` by this cop. + # + # @example + # # bad + # class User < ApplicationRecord + # self.ignored_columns = [:already_removed_column] + # end + # + # # good + # class User < ApplicationRecord + # self.ignored_columns = [:still_existing_column] + # end + # + class UnusedIgnoredColumns < Base + include ActiveRecordHelper + + MSG = 'Remove `%s` from `ignored_columns` because the column does not exist.' + RESTRICT_ON_SEND = %i[ignored_columns=].freeze + + def_node_matcher :ignored_columns, <<~PATTERN + (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 schema + + table = table(node) + return unless table + + columns.children.each do |column_node| + check_column_existence(column_node, table) + end + end + + private + + def check_column_existence(column_node, table) + column_name = column_name(column_node) + return unless column_name + return if table.with_column?(name: column_name.to_s) + + message = format(MSG, column_name: column_name) + add_offense(column_node, message: message) + end + + def class_node(node) + node.each_ancestor.find(&:class_type?) + end + + def table(node) + klass = class_node(node) + schema.table_by(name: table_name(klass)) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/validation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/validation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/validation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/validation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/where_equals.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/where_equals.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/where_equals.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/where_exists.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/where_exists.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/where_exists.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails/where_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1/lib/rubocop/cop/rails/where_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails/where_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails_cops.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails_cops.rb index 5c07a66421..f86c3b1818 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/cop/rails_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/cop/rails_cops.rb @@ -10,6 +10,7 @@ require_relative 'rails/active_record_aliases' require_relative 'rails/active_record_callbacks_order' require_relative 'rails/active_record_override' require_relative 'rails/active_support_aliases' +require_relative 'rails/add_column_index' require_relative 'rails/after_commit_override' require_relative 'rails/application_controller' require_relative 'rails/application_job' @@ -28,11 +29,13 @@ require_relative 'rails/default_scope' require_relative 'rails/delegate' require_relative 'rails/delegate_allow_blank' require_relative 'rails/dynamic_find_by' +require_relative 'rails/eager_evaluation_log_message' require_relative 'rails/enum_hash' require_relative 'rails/enum_uniqueness' require_relative 'rails/environment_comparison' require_relative 'rails/environment_variable_access' require_relative 'rails/exit' +require_relative 'rails/expanded_date_range' require_relative 'rails/file_path' require_relative 'rails/find_by' require_relative 'rails/find_by_id' @@ -42,6 +45,7 @@ require_relative 'rails/has_many_or_has_one_dependent' require_relative 'rails/helper_instance_variable' require_relative 'rails/http_positional_arguments' require_relative 'rails/http_status' +require_relative 'rails/i18n_locale_assignment' require_relative 'rails/ignored_skip_action_filter_option' require_relative 'rails/index_by' require_relative 'rails/index_with' @@ -89,6 +93,7 @@ require_relative 'rails/time_zone_assignment' require_relative 'rails/uniq_before_pluck' require_relative 'rails/unique_validation_without_index' require_relative 'rails/unknown_env' +require_relative 'rails/unused_ignored_columns' require_relative 'rails/validation' require_relative 'rails/where_equals' require_relative 'rails/where_exists' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/schema_loader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/schema_loader.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/schema_loader.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/schema_loader.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/schema_loader/schema.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/schema_loader/schema.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/schema_loader/schema.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/schema_loader/schema.rb index c641a0ebd8..8c9b62022f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/schema_loader/schema.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/schema_loader/schema.rb @@ -114,7 +114,7 @@ module RuboCop attr_reader :name, :type, :not_null def initialize(node) - @name = node.first_argument.value + @name = node.first_argument.str_content @type = node.method_name @not_null = nil diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/version.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.0/lib/rubocop/rails/version.rb index 495e12daad..76f6391b00 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.10.1/lib/rubocop/rails/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.11.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.10.1' + STRING = '2.11.0' def self.document_version STRING.match('\d+\.\d+').to_s