Skip to content

Commit d2f95fe

Browse files
bastelfreaktraylenator
authored andcommitted
rubocop: autofix
1 parent 0b50c69 commit d2f95fe

5 files changed

Lines changed: 95 additions & 6 deletions

File tree

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
inherit_from: .rubocop_todo.yml
3+
24
# Managed by modulesync - DO NOT EDIT
35
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
46

.rubocop_todo.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2023-08-17 21:34:59 UTC using RuboCop version 1.50.2.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
11+
Lint/DuplicateBranch:
12+
Exclude:
13+
- 'lib/puppet/provider/mongodb.rb'
14+
15+
# Offense count: 1
16+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
17+
Lint/EmptyBlock:
18+
Exclude:
19+
- 'spec/unit/puppet/provider/mongodb_shard/mongodb_spec.rb'
20+
21+
# Offense count: 1
22+
Lint/SelfAssignment:
23+
Exclude:
24+
- 'lib/puppet/provider/mongodb_replset/mongo.rb'
25+
26+
# Offense count: 7
27+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
28+
# SupportedStyles: snake_case, normalcase, non_integer
29+
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
30+
Naming/VariableNumber:
31+
Exclude:
32+
- 'lib/puppet/provider/mongodb_user/mongodb.rb'
33+
- 'lib/puppet/type/mongodb_user.rb'
34+
35+
# Offense count: 1
36+
# This cop supports unsafe autocorrection (--autocorrect-all).
37+
RSpec/BeEq:
38+
Exclude:
39+
- 'spec/functions/mongodb_password_spec.rb'
40+
41+
# Offense count: 1
42+
RSpec/MultipleExpectations:
43+
Max: 2
44+
45+
# Offense count: 6
46+
RSpec/RepeatedExampleGroupBody:
47+
Exclude:
48+
- 'spec/acceptance/mongos_spec.rb'
49+
- 'spec/acceptance/server_spec.rb'
50+
51+
# Offense count: 2
52+
# Configuration parameters: EnforcedStyle, AllowedPatterns.
53+
# SupportedStyles: snake_case, camelCase
54+
RSpec/VariableName:
55+
Exclude:
56+
- 'spec/classes/server_spec.rb'
57+
58+
# Offense count: 44
59+
# This cop supports unsafe autocorrection (--autocorrect-all).
60+
# Configuration parameters: EnforcedStyle.
61+
# SupportedStyles: always, always_true, never
62+
Style/FrozenStringLiteralComment:
63+
Enabled: false
64+
65+
# Offense count: 1
66+
# This cop supports unsafe autocorrection (--autocorrect-all).
67+
# Configuration parameters: AllowedReceivers.
68+
# AllowedReceivers: Thread.current
69+
Style/HashEachMethods:
70+
Exclude:
71+
- 'lib/puppet/provider/mongodb_database/mongodb.rb'
72+
73+
# Offense count: 1
74+
# This cop supports unsafe autocorrection (--autocorrect-all).
75+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
76+
# SupportedStyles: predicate, comparison
77+
Style/NumericPredicate:
78+
Exclude:
79+
- 'spec/**/*'
80+
- 'lib/puppet/provider/mongodb.rb'
81+
82+
# Offense count: 1
83+
# This cop supports unsafe autocorrection (--autocorrect-all).
84+
# Configuration parameters: Mode.
85+
Style/StringConcatenation:
86+
Exclude:
87+
- 'lib/puppet/provider/mongodb_database/mongodb.rb'

spec/defines/db_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424

2525
it 'contains mongodb_user with proper roles' do
2626
params['roles'] = %w[testrole1 testrole2]
27-
is_expected.to contain_mongodb_user('User testuser on db testdb').\
27+
is_expected.to contain_mongodb_user('User testuser on db testdb'). \
2828
with_roles(%w[testrole1 testrole2])
2929
end
3030

3131
it 'prefers password_hash instead of password' do
3232
params['password_hash'] = 'securehash'
33-
is_expected.to contain_mongodb_user('User testuser on db testdb').\
33+
is_expected.to contain_mongodb_user('User testuser on db testdb'). \
3434
with_password_hash('securehash')
3535
end
3636

@@ -64,13 +64,13 @@
6464

6565
it 'contains mongodb_user with proper roles' do
6666
params['roles'] = %w[testrole1 testrole2]
67-
is_expected.to contain_mongodb_user('User testuser on db testdb').\
67+
is_expected.to contain_mongodb_user('User testuser on db testdb'). \
6868
with_roles(%w[testrole1 testrole2])
6969
end
7070

7171
it 'prefers password_hash instead of password' do
7272
params['password_hash'] = 'securehash'
73-
is_expected.to contain_mongodb_user('User testuser on db testdb').\
73+
is_expected.to contain_mongodb_user('User testuser on db testdb'). \
7474
with_password_hash('securehash')
7575
end
7676

spec/unit/puppet/provider/mongodb_shard/mongodb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
'version' => 4,
2626
'minCompatibleVersion' => 4,
2727
'currentVersion' => 5,
28-
'clusterId' => "ObjectId(\'548e9110f3aca177c94c5e49\')"
28+
'clusterId' => "ObjectId('548e9110f3aca177c94c5e49')"
2929
},
3030
'shards' => [
3131
{ '_id' => 'rs_test', 'host' => 'rs_test/mongo1:27018' }

spec/unit/puppet/provider/mongodb_user/mongodb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
describe 'empty self.instances from slave' do
4848
it 'doesn`t retrun array of users' do
4949
allow(provider.class).to receive(:db_ismaster).and_return(false)
50-
expect(provider.class.instances).to match_array([])
50+
expect(provider.class.instances).to be_empty
5151
end
5252
end
5353

0 commit comments

Comments
 (0)