Skip to content

Commit

Permalink
(maint) - Regenerate todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Oct 2, 2023
1 parent a3ffefa commit 9ce0a83
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
29 changes: 15 additions & 14 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-09-29 10:39:55 UTC using RuboCop version 1.56.4.
# on 2023-10-02 09:19:14 UTC using RuboCop version 1.56.4.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -59,7 +59,7 @@ Lint/UselessAssignment:
- 'lib/rspec-puppet/matchers/create_generic.rb'
- 'lib/rspec-puppet/monkey_patches.rb'

# Offense count: 29
# Offense count: 27
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 47
Expand All @@ -70,7 +70,7 @@ Metrics/AbcSize:
Metrics/BlockLength:
Max: 111

# Offense count: 3
# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4
Expand All @@ -80,20 +80,20 @@ Metrics/BlockNesting:
Metrics/ClassLength:
Max: 297

# Offense count: 19
# Offense count: 18
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 18

# Offense count: 53
# Offense count: 50
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 37

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
Max: 422
Max: 411

# Offense count: 2
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Expand Down Expand Up @@ -181,7 +181,7 @@ RSpec/BeforeAfterAll:
- '**/spec/support/**/*.rb'
- 'spec/unit/coverage_spec.rb'

# Offense count: 76
# Offense count: 75
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Expand All @@ -192,7 +192,7 @@ RSpec/ContextWording:
RSpec/DescribeClass:
Enabled: false

# Offense count: 25
# Offense count: 24
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 12
Expand All @@ -207,9 +207,9 @@ RSpec/FilePath:
- 'spec/raw_string_spec.rb'
- 'spec/support_spec.rb'
- 'spec/unit/coverage_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/facter_impl_spec.rb'
- 'spec/unit/matchers/allow_value_spec.rb'
- 'spec/unit/matchers/compile_spec.rb'
- 'spec/unit/matchers/count_generic_spec.rb'
- 'spec/unit/matchers/parameter_matcher_spec.rb'
- 'spec/unit/matchers/raise_error_spec.rb'
Expand Down Expand Up @@ -240,7 +240,7 @@ RSpec/InstanceVariable:
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 7
# Offense count: 8
RSpec/MultipleDescribes:
Exclude:
- 'spec/classes/facts_spec.rb'
Expand All @@ -249,6 +249,7 @@ RSpec/MultipleDescribes:
- 'spec/defines/sysctl_before_spec.rb'
- 'spec/functions/test_function_spec.rb'
- 'spec/unit/adapters_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/monkey_patches_spec.rb'

# Offense count: 46
Expand All @@ -260,13 +261,13 @@ RSpec/MultipleExpectations:
RSpec/MultipleMemoizedHelpers:
Max: 7

# Offense count: 284
# Offense count: 282
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Enabled: false

# Offense count: 20
# Offense count: 26
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 5
Expand Down Expand Up @@ -308,9 +309,9 @@ RSpec/SpecFilePathFormat:
- 'spec/raw_string_spec.rb'
- 'spec/support_spec.rb'
- 'spec/unit/coverage_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/facter_impl_spec.rb'
- 'spec/unit/matchers/allow_value_spec.rb'
- 'spec/unit/matchers/compile_spec.rb'
- 'spec/unit/matchers/count_generic_spec.rb'
- 'spec/unit/matchers/parameter_matcher_spec.rb'
- 'spec/unit/matchers/raise_error_spec.rb'
Expand Down Expand Up @@ -378,7 +379,7 @@ Style/FormatString:
Exclude:
- 'lib/rspec-puppet/coverage.rb'

# Offense count: 15
# Offense count: 14
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec-puppet/adapters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def setup_puppet(example_group)
{
environments: loader,
current_environment: env,
loaders: (Puppet::Pops::Loaders.new(env))
loaders: Puppet::Pops::Loaders.new(env)
},
'Setup rspec-puppet environments'
)
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec-puppet/example/function_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def find_function(function_name = self.class.top_level_description)
loaders = Puppet.lookup(:loaders)
Puppet.override(context_overrides, 'rspec-test scope') do
func = V4FunctionWrapper.new(function_name,
loaders.private_environment_loader.load(:function, function_name), context_overrides)
loaders.private_environment_loader.load(:function, function_name), context_overrides)
@scope = context_overrides[:global_scope]
end

Expand Down Expand Up @@ -175,7 +175,7 @@ def build_compiler
compiler
end

def build_scope(compiler, node_name)
def build_scope(compiler, _node_name)
compiler.context_overrides[:global_scope]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec-puppet/monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class Pops::Lookup::ModuleDataProvider
unless mod
raise Puppet::DataBinding::LookupError,
format(_("Environment '%<env>s', cannot find module '%<module_name>s'"), env: env.name,
module_name: module_name)
module_name: module_name)
end

return Pathname.new(mod.hiera_conf_file)
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/hash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
context 'puppet 4 or greater' do
it {
expect(subject).to contain_structured_data__def('thing').with(
{ 'data' => { 1 => 'uno', 2 => 'dos' } }
{ 'data' => { 1 => 'uno', 2 => 'dos' } }
)
}
end
Expand Down
2 changes: 2 additions & 0 deletions spec/unit/example/function_example_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

describe 'when calling with params' do
subject { described_class.new(name, func, overrides) }

it do
expect(func).to receive(:call).with(global_scope, 1, 2).once
subject.call({}, 1, 2)
Expand All @@ -18,6 +19,7 @@

describe 'when executing with params' do
subject { described_class.new(name, func, overrides) }

it do
expect(func).to receive(:call).with(global_scope, 1, 2).once
subject.execute(1, 2)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/matchers/compile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@
let(:expected_error) do
"Evaluation Error: Error while evaluating a Function Call, #{error_detail} on node rspec::puppet::manifestmatchers::compile"
end
let(:error_detail) { 'failure (line: 52, column: 1)' }

before { subject.and_raise_error(expected_error) }

let(:error_detail) { 'failure (line: 52, column: 1)' }
it('matches') { is_expected.to be_matches catalogue }

it {
Expand Down

0 comments on commit 9ce0a83

Please sign in to comment.