brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2021-11-08 18:06:52 +00:00
parent b8c0a2b719
commit e708302aed
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
115 changed files with 78 additions and 8 deletions

View File

@ -89,7 +89,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.22.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.22.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.12.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.12.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.12.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.12.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.5.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/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" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"

View File

@ -1,11 +1,24 @@
--- ---
RSpec: RSpec:
Enabled: true Enabled: true
Include: Include: &1
- "**/*_spec.rb" - "**/*_spec.rb"
- "**/spec/**/*" - "**/spec/**/*"
Language: Language: &2
inherit_mode:
merge:
- Expectations
- Helpers
- Hooks
- HookScopes
- Runners
- Subjects
ExampleGroups: ExampleGroups:
inherit_mode:
merge:
- Regular
- Skipped
- Focused
Regular: Regular:
- describe - describe
- context - context
@ -20,6 +33,12 @@ RSpec:
- fcontext - fcontext
- ffeature - ffeature
Examples: Examples:
inherit_mode:
merge:
- Regular
- Skipped
- Focused
- Pending
Regular: Regular:
- it - it
- specify - specify
@ -62,6 +81,10 @@ RSpec:
- all - all
- suite - suite
Includes: Includes:
inherit_mode:
merge:
- Examples
- Context
Examples: Examples:
- it_behaves_like - it_behaves_like
- it_should_behave_like - it_should_behave_like
@ -73,6 +96,10 @@ RSpec:
- to_not - to_not
- not_to - not_to
SharedGroups: SharedGroups:
inherit_mode:
merge:
- Examples
- Context
Examples: Examples:
- shared_examples - shared_examples
- shared_examples_for - shared_examples_for
@ -718,6 +745,11 @@ RSpec/Yield:
VersionAdded: '1.32' VersionAdded: '1.32'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
RSpec/Capybara:
Enabled: true
Include: *1
Language: *2
RSpec/Capybara/CurrentPathExpectation: RSpec/Capybara/CurrentPathExpectation:
Description: Checks that no expectations are set on Capybara's `current_path`. Description: Checks that no expectations are set on Capybara's `current_path`.
Enabled: true Enabled: true
@ -740,6 +772,11 @@ RSpec/Capybara/VisibilityMatcher:
VersionChanged: '2.0' VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
RSpec/FactoryBot:
Enabled: true
Include: *1
Language: *2
RSpec/FactoryBot/AttributeDefinedStatically: RSpec/FactoryBot/AttributeDefinedStatically:
Description: Always declare attribute values as blocks. Description: Always declare attribute values as blocks.
Enabled: true Enabled: true
@ -779,6 +816,11 @@ RSpec/FactoryBot/FactoryClassName:
VersionChanged: '2.0' VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
RSpec/Rails:
Enabled: true
Include: *1
Language: *2
RSpec/Rails/AvoidSetupHook: RSpec/Rails/AvoidSetupHook:
Description: Checks that tests use RSpec `before` hook over Rails `setup` method. Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
Enabled: pending Enabled: pending

View File

@ -60,7 +60,10 @@ module RuboCop
def add_wording_offense(node, message) def add_wording_offense(node, message)
docstring = docstring(node) docstring = docstring(node)
add_offense(docstring, message: message) do |corrector| add_offense(docstring, message: message) do |corrector|
next if node.heredoc?
corrector.replace(docstring, replacement_text(node)) corrector.replace(docstring, replacement_text(node))
end end
end end

View File

@ -37,6 +37,8 @@ module RuboCop
def on_send(node) def on_send(node)
example_description(node) do |description_node, message| example_description(node) do |description_node, message|
return if description_node.heredoc?
text = text(message) text = text(message)
return unless excessive_whitespace?(text) return unless excessive_whitespace?(text)
@ -49,7 +51,9 @@ module RuboCop
# @param text [String] # @param text [String]
def excessive_whitespace?(text) def excessive_whitespace?(text)
text.start_with?(' ') || text.include?(' ') || text.end_with?(' ') return true if text.start_with?(' ') || text.end_with?(' ')
text.match?(/[^\n ] +[^ ]/)
end end
# @param text [String] # @param text [String]

View File

@ -23,6 +23,7 @@ module RuboCop
# subject('user') { create_user } # subject('user') { create_user }
# let('user_name') { 'Adam' } # let('user_name') { 'Adam' }
class VariableDefinition < Base class VariableDefinition < Base
extend AutoCorrector
include ConfigurableEnforcedStyle include ConfigurableEnforcedStyle
include Variable include Variable
@ -30,14 +31,30 @@ module RuboCop
def on_send(node) def on_send(node)
variable_definition?(node) do |variable| variable_definition?(node) do |variable|
if style_violation?(variable) next unless style_violation?(variable)
add_offense(variable, message: format(MSG, style: style))
add_offense(
variable,
message: format(MSG, style: style)
) do |corrector|
corrector.replace(variable, correct_variable(variable))
end end
end end
end end
private private
def correct_variable(variable)
case variable.type
when :dsym
variable.source[1..-1]
when :sym
variable.value.to_s.inspect
else
variable.value.to_sym.inspect
end
end
def style_violation?(variable) def style_violation?(variable)
style == :symbols && string?(variable) || style == :symbols && string?(variable) ||
style == :strings && symbol?(variable) style == :strings && symbol?(variable)

Some files were not shown because too many files have changed in this diff Show More