puppet-ghostbuster 0.8.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +17 -0
- data/.github/workflows/release.yml +33 -0
- data/.github/workflows/test.yml +57 -0
- data/.gitignore +5 -4
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +170 -0
- data/CHANGELOG.md +209 -90
- data/Gemfile +13 -1
- data/README.md +15 -5
- data/Rakefile +31 -9
- data/lib/puppet-ghostbuster/puppetdb.rb +31 -8
- data/lib/puppet-ghostbuster/version.rb +1 -1
- data/lib/puppet-lint/plugins/check_ghostbuster_classes.rb +4 -4
- data/lib/puppet-lint/plugins/check_ghostbuster_defines.rb +5 -6
- data/lib/puppet-lint/plugins/check_ghostbuster_facts.rb +14 -15
- data/lib/puppet-lint/plugins/check_ghostbuster_files.rb +17 -20
- data/lib/puppet-lint/plugins/check_ghostbuster_functions.rb +8 -8
- data/lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb +31 -30
- data/lib/puppet-lint/plugins/check_ghostbuster_templates.rb +13 -10
- data/lib/puppet-lint/plugins/check_ghostbuster_types.rb +5 -5
- data/puppet-ghostbuster.gemspec +21 -19
- data/spec/fixtures/hiera.yaml +11 -12
- data/spec/fixtures/modules/foo/lib/facter/bar.rb +2 -0
- data/spec/fixtures/modules/foo/lib/facter/baz.rb +2 -0
- data/spec/fixtures/modules/foo/lib/facter/foo.rb +2 -0
- data/spec/fixtures/modules/foo/lib/facter/multi.rb +2 -0
- data/spec/fixtures/modules/foo/lib/facter/quux.rb +2 -0
- data/spec/fixtures/modules/foo/lib/puppet/parser/functions/bar.rb +8 -2
- data/spec/fixtures/modules/foo/lib/puppet/parser/functions/baz.rb +8 -2
- data/spec/fixtures/modules/foo/lib/puppet/parser/functions/foo.rb +8 -2
- data/spec/fixtures/modules/foo/lib/puppet/parser/functions/quux.rb +8 -2
- data/spec/fixtures/modules/foo/lib/puppet/type/bar.rb +2 -0
- data/spec/fixtures/modules/foo/lib/puppet/type/foo.rb +2 -0
- data/spec/puppet-lint/plugins/ghostbuster_classes_spec.rb +10 -9
- data/spec/puppet-lint/plugins/ghostbuster_defines_spec.rb +11 -11
- data/spec/puppet-lint/plugins/ghostbuster_facts_spec.rb +21 -20
- data/spec/puppet-lint/plugins/ghostbuster_files_spec.rb +25 -25
- data/spec/puppet-lint/plugins/ghostbuster_functions_spec.rb +16 -15
- data/spec/puppet-lint/plugins/ghostbuster_hiera_files_spec.rb +30 -30
- data/spec/puppet-lint/plugins/ghostbuster_templates_spec.rb +17 -16
- data/spec/puppet-lint/plugins/ghostbuster_types_spec.rb +10 -9
- data/spec/spec_helper.rb +45 -4
- metadata +78 -38
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3ec9b23a16d99a0943b30208b38c1445112a1bd359f26c3c161d3b7721f95b90
|
4
|
+
data.tar.gz: c5fb473512bc43557378a83f318911709a1d475f81727da4f25e9beb96de47d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf4b7b687a058bb87c4af83be99d25deb8f2dc8fc48780a4c798dbe52a4ce5180f374cc023dc362e9c414327d298a942896c42deb2d6411a0ec357649ead7969
|
7
|
+
data.tar.gz: 5e9a5b44cb3e34c09d68e8e332144568b92cb8cfdd20fed57e3206fbec9b4e11e0cabea9752622640109b70cc2fd26d6f8134548444ec7c699729965cfaaf38c
|
@@ -0,0 +1,17 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
# raise PRs for gem updates
|
4
|
+
- package-ecosystem: bundler
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: daily
|
8
|
+
time: "13:00"
|
9
|
+
open-pull-requests-limit: 10
|
10
|
+
|
11
|
+
# Maintain dependencies for GitHub Actions
|
12
|
+
- package-ecosystem: github-actions
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: daily
|
16
|
+
time: "13:00"
|
17
|
+
open-pull-requests-limit: 10
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
if: github.repository_owner == 'voxpupuli'
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- name: Install Ruby 3.0
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: '3.0'
|
18
|
+
bundler: 'none'
|
19
|
+
env:
|
20
|
+
BUNDLE_WITHOUT: release:development:rubocop
|
21
|
+
- name: Build gem
|
22
|
+
run: gem build --strict --verbose *.gemspec
|
23
|
+
- name: Publish gem to rubygems.org
|
24
|
+
run: gem push *.gem
|
25
|
+
env:
|
26
|
+
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
|
27
|
+
- name: Setup GitHub packages access
|
28
|
+
run: |
|
29
|
+
mkdir -p ~/.gem
|
30
|
+
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
|
31
|
+
chmod 0600 ~/.gem/credentials
|
32
|
+
- name: Publish gem to GitHub packages
|
33
|
+
run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
|
@@ -0,0 +1,57 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request: {}
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- master
|
8
|
+
- main
|
9
|
+
|
10
|
+
env:
|
11
|
+
BUNDLE_WITHOUT: release
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
rubocop:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
- name: Setup ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: '3.0'
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Run rake rubocop
|
24
|
+
run: bundle exec rake rubocop
|
25
|
+
test:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
strategy:
|
28
|
+
fail-fast: false
|
29
|
+
matrix:
|
30
|
+
include:
|
31
|
+
- ruby: "2.7"
|
32
|
+
- ruby: "3.0"
|
33
|
+
- ruby: "3.1"
|
34
|
+
coverage: "yes"
|
35
|
+
- ruby: "3.2"
|
36
|
+
env:
|
37
|
+
COVERAGE: ${{ matrix.coverage }}
|
38
|
+
name: Ruby ${{ matrix.ruby }}
|
39
|
+
steps:
|
40
|
+
- uses: actions/checkout@v4
|
41
|
+
- name: Install Ruby ${{ matrix.ruby }}
|
42
|
+
uses: ruby/setup-ruby@v1
|
43
|
+
with:
|
44
|
+
ruby-version: ${{ matrix.ruby }}
|
45
|
+
bundler-cache: true
|
46
|
+
- name: Run tests
|
47
|
+
run: bundle exec rake spec
|
48
|
+
- name: Verify gem builds
|
49
|
+
run: gem build --strict --verbose *.gemspec
|
50
|
+
tests:
|
51
|
+
needs:
|
52
|
+
- rubocop
|
53
|
+
- test
|
54
|
+
runs-on: ubuntu-latest
|
55
|
+
name: Test suite
|
56
|
+
steps:
|
57
|
+
- run: echo Test suite completed
|
data/.gitignore
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Gemfile.lock
|
4
|
-
|
1
|
+
/.bundle/
|
2
|
+
/vendor/gems/
|
3
|
+
/Gemfile.lock
|
4
|
+
vendor/bundle
|
5
|
+
.vendor/
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2024-01-08 10:34:35 UTC using RuboCop version 1.59.0.
|
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
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
11
|
+
# Configuration parameters: AllowSafeAssignment.
|
12
|
+
Lint/AssignmentInCondition:
|
13
|
+
Exclude:
|
14
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
15
|
+
|
16
|
+
# Offense count: 6
|
17
|
+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
18
|
+
Lint/EmptyBlock:
|
19
|
+
Exclude:
|
20
|
+
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/bar.rb'
|
21
|
+
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/baz.rb'
|
22
|
+
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/foo.rb'
|
23
|
+
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/quux.rb'
|
24
|
+
- 'spec/fixtures/modules/foo/lib/puppet/type/bar.rb'
|
25
|
+
- 'spec/fixtures/modules/foo/lib/puppet/type/foo.rb'
|
26
|
+
|
27
|
+
# Offense count: 12
|
28
|
+
Lint/NonLocalExitFromIterator:
|
29
|
+
Exclude:
|
30
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
|
31
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
|
32
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
33
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
34
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
35
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
36
|
+
|
37
|
+
# Offense count: 1
|
38
|
+
# Configuration parameters: AllowKeywordBlockArguments.
|
39
|
+
Lint/UnderscorePrefixedVariableName:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
42
|
+
|
43
|
+
# Offense count: 1
|
44
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
45
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
46
|
+
Naming/MethodParameterName:
|
47
|
+
Exclude:
|
48
|
+
- 'spec/spec_helper.rb'
|
49
|
+
|
50
|
+
# Offense count: 8
|
51
|
+
# Configuration parameters: IgnoredMetadata.
|
52
|
+
RSpec/DescribeClass:
|
53
|
+
Exclude:
|
54
|
+
- '**/spec/features/**/*'
|
55
|
+
- '**/spec/requests/**/*'
|
56
|
+
- '**/spec/routing/**/*'
|
57
|
+
- '**/spec/system/**/*'
|
58
|
+
- '**/spec/views/**/*'
|
59
|
+
- 'spec/puppet-lint/plugins/ghostbuster_classes_spec.rb'
|
60
|
+
- 'spec/puppet-lint/plugins/ghostbuster_defines_spec.rb'
|
61
|
+
- 'spec/puppet-lint/plugins/ghostbuster_facts_spec.rb'
|
62
|
+
- 'spec/puppet-lint/plugins/ghostbuster_files_spec.rb'
|
63
|
+
- 'spec/puppet-lint/plugins/ghostbuster_functions_spec.rb'
|
64
|
+
- 'spec/puppet-lint/plugins/ghostbuster_hiera_files_spec.rb'
|
65
|
+
- 'spec/puppet-lint/plugins/ghostbuster_templates_spec.rb'
|
66
|
+
- 'spec/puppet-lint/plugins/ghostbuster_types_spec.rb'
|
67
|
+
|
68
|
+
# Offense count: 2
|
69
|
+
RSpec/RepeatedDescription:
|
70
|
+
Exclude:
|
71
|
+
- 'spec/puppet-lint/plugins/ghostbuster_facts_spec.rb'
|
72
|
+
|
73
|
+
# Offense count: 9
|
74
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
75
|
+
# Configuration parameters: EnforcedStyle.
|
76
|
+
# SupportedStyles: nested, compact
|
77
|
+
Style/ClassAndModuleChildren:
|
78
|
+
Exclude:
|
79
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
|
80
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
|
81
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
|
82
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
83
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
84
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
85
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
86
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'
|
87
|
+
- 'spec/spec_helper.rb'
|
88
|
+
|
89
|
+
# Offense count: 5
|
90
|
+
Style/ClassVars:
|
91
|
+
Exclude:
|
92
|
+
- 'lib/puppet-ghostbuster/puppetdb.rb'
|
93
|
+
|
94
|
+
# Offense count: 9
|
95
|
+
# Configuration parameters: AllowedConstants.
|
96
|
+
Style/Documentation:
|
97
|
+
Exclude:
|
98
|
+
- 'spec/**/*'
|
99
|
+
- 'test/**/*'
|
100
|
+
- 'lib/puppet-ghostbuster/puppetdb.rb'
|
101
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
|
102
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
|
103
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
|
104
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
105
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
106
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
107
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
108
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'
|
109
|
+
|
110
|
+
# Offense count: 11
|
111
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
112
|
+
# Configuration parameters: EnforcedStyle.
|
113
|
+
# SupportedStyles: always, always_true, never
|
114
|
+
Style/FrozenStringLiteralComment:
|
115
|
+
Exclude:
|
116
|
+
- 'lib/puppet-ghostbuster/puppetdb.rb'
|
117
|
+
- 'lib/puppet-ghostbuster/version.rb'
|
118
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
|
119
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
|
120
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
|
121
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
122
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
123
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
124
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
125
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'
|
126
|
+
- 'spec/spec_helper.rb'
|
127
|
+
|
128
|
+
# Offense count: 2
|
129
|
+
# This cop supports safe autocorrection (--autocorrect).
|
130
|
+
Style/IfUnlessModifier:
|
131
|
+
Exclude:
|
132
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
133
|
+
|
134
|
+
# Offense count: 1
|
135
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
136
|
+
# Configuration parameters: EnforcedStyle.
|
137
|
+
# SupportedStyles: literals, strict
|
138
|
+
Style/MutableConstant:
|
139
|
+
Exclude:
|
140
|
+
- 'lib/puppet-ghostbuster/version.rb'
|
141
|
+
|
142
|
+
# Offense count: 15
|
143
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
144
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
145
|
+
# SupportedStyles: predicate, comparison
|
146
|
+
Style/NumericPredicate:
|
147
|
+
Exclude:
|
148
|
+
- 'spec/**/*'
|
149
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
|
150
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
151
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
152
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
153
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
154
|
+
|
155
|
+
# Offense count: 15
|
156
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
157
|
+
Style/ZeroLengthPredicate:
|
158
|
+
Exclude:
|
159
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
|
160
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
|
161
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
|
162
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
|
163
|
+
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
|
164
|
+
|
165
|
+
# Offense count: 4
|
166
|
+
# This cop supports safe autocorrection (--autocorrect).
|
167
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
168
|
+
# URISchemes: http, https
|
169
|
+
Layout/LineLength:
|
170
|
+
Max: 189
|