puppet-lint-topscope-variable-check 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bba7e72103955d229936058c4d9e8243a35ea6282e519f0cdf667586584b55b8
4
- data.tar.gz: 43eed19d3b88fd0480b5e720969cdc67377deb45f3007607fdad90acec3333ca
3
+ metadata.gz: 1fc4c9fad102c69f34007e5ba9251dc01d21e026504fe8cd5d5758001260858e
4
+ data.tar.gz: afa1a825948a96aafc053c309d0c65bb7914c9cb4a72d3b0b9017897f30e8cca
5
5
  SHA512:
6
- metadata.gz: c733eeba2facfaab46f1538cc909c539b6af2cb1563c7b0cd8596bf4587e115284767834b55cfdb23b2604e8ae542b7ccda55d2c5470d1450cfe0000e5797f3a
7
- data.tar.gz: b27d7fedd03fedd7f0a20a25c9d638edefc93fc702930bfe8c9222b9adb66771c4bbf0c7f597ff4e0d73d2011ca62c82cb008aba107d5bdea2295b91a9758b53
6
+ metadata.gz: 7a545487b53ac6a268ef378e6adeae71b754085a3af3d29d07af5fa525bf9ec2169f37035c3fcf9ad81a8a9111858600f579346ac08706a63fa67081b67c8772
7
+ data.tar.gz: 1b40c7be69c3211843fe72821cd2a1fd90706bac4562ec25a6c987d343ee1b6e058f04e8ec2967beda4994c1579068acdfe2b07cc0be71d023e48b60806e46de
@@ -153,6 +153,16 @@ describe 'topscope_variable' do
153
153
  PUP
154
154
  end
155
155
 
156
+ let(:fixed) do
157
+ <<~PUP
158
+ class foo::blub {
159
+ notify { 'foo':
160
+ message => $foo::bar
161
+ }
162
+ }
163
+ PUP
164
+ end
165
+
156
166
  it 'detects one problem' do
157
167
  expect(problems).to have(1).problem
158
168
  end
@@ -162,13 +172,7 @@ describe 'topscope_variable' do
162
172
  end
163
173
 
164
174
  it 'removes :: after the $' do
165
- expect(manifest).to eq <<~PUP
166
- class foo::blub {
167
- notify { 'foo':
168
- message => $foo::bar
169
- }
170
- }
171
- PUP
175
+ expect(manifest).to eq fixed
172
176
  end
173
177
  end
174
178
 
@@ -183,6 +187,16 @@ describe 'topscope_variable' do
183
187
  PUP
184
188
  end
185
189
 
190
+ let(:fixed) do
191
+ <<~PUP
192
+ class profile::foo {
193
+ notify { 'foo':
194
+ message => $some_component_module::bar
195
+ }
196
+ }
197
+ PUP
198
+ end
199
+
186
200
  it 'detects one problem' do
187
201
  expect(problems).to have(1).problem
188
202
  end
@@ -192,13 +206,7 @@ describe 'topscope_variable' do
192
206
  end
193
207
 
194
208
  it 'removes :: after the $' do
195
- expect(manifest).to eq <<~PUP
196
- class profile::foo {
197
- notify { 'foo':
198
- message => $some_component_module::bar
199
- }
200
- }
201
- PUP
209
+ expect(manifest).to eq fixed
202
210
  end
203
211
  end
204
212
 
@@ -213,6 +221,16 @@ describe 'topscope_variable' do
213
221
  PUP
214
222
  end
215
223
 
224
+ let(:fixed) do
225
+ <<~PUP
226
+ class foo::blub {
227
+ notify { 'foo':
228
+ message => ">${foo::bar}<"
229
+ }
230
+ }
231
+ PUP
232
+ end
233
+
216
234
  it 'detects one problem' do
217
235
  expect(problems).to have(1).problem
218
236
  end
@@ -222,13 +240,7 @@ describe 'topscope_variable' do
222
240
  end
223
241
 
224
242
  it 'removes :: after the $' do
225
- expect(manifest).to eq <<~PUP
226
- class foo::blub {
227
- notify { 'foo':
228
- message => ">${foo::bar}<"
229
- }
230
- }
231
- PUP
243
+ expect(manifest).to eq fixed
232
244
  end
233
245
  end
234
246
  end
data/spec/spec_helper.rb CHANGED
@@ -1,29 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- begin
4
- require 'simplecov'
5
- require 'simplecov-console'
6
- require 'codecov'
7
- rescue LoadError
8
- else
9
- SimpleCov.start do
10
- track_files 'lib/**/*.rb'
11
-
12
- add_filter '/spec'
13
-
14
- enable_coverage :branch
15
-
16
- # do not track vendored files
17
- add_filter '/vendor'
18
- add_filter '/.vendor'
19
- end
20
-
21
- SimpleCov.formatters = [
22
- SimpleCov::Formatter::Console,
23
- SimpleCov::Formatter::Codecov,
24
- ]
25
- end
26
-
27
3
  require 'puppet-lint'
4
+ require 'rspec/collection_matchers'
28
5
 
29
6
  PuppetLint::Plugins.load_spec_helper
metadata CHANGED
@@ -1,35 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-topscope-variable-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-04-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: puppet-lint
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '3'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5'
18
+ version: '5.1'
23
19
  type: :runtime
24
20
  prerelease: false
25
21
  version_requirements: !ruby/object:Gem::Requirement
26
22
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '3'
30
- - - "<"
23
+ - - "~>"
31
24
  - !ruby/object:Gem::Version
32
- version: '5'
25
+ version: '5.1'
33
26
  description: " A puppet-lint plugin to check that topscope variable names don't
34
27
  start with ::.\n"
35
28
  email: voxpupuli@groups.io
@@ -46,7 +39,6 @@ homepage: https://github.com/voxpupuli/puppet-lint-topscope-variable-check
46
39
  licenses:
47
40
  - MIT
48
41
  metadata: {}
49
- post_install_message:
50
42
  rdoc_options: []
51
43
  require_paths:
52
44
  - lib
@@ -54,15 +46,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
46
  requirements:
55
47
  - - ">="
56
48
  - !ruby/object:Gem::Version
57
- version: 2.7.0
49
+ version: '3.2'
58
50
  required_rubygems_version: !ruby/object:Gem::Requirement
59
51
  requirements:
60
52
  - - ">="
61
53
  - !ruby/object:Gem::Version
62
54
  version: '0'
63
55
  requirements: []
64
- rubygems_version: 3.2.33
65
- signing_key:
56
+ rubygems_version: 3.6.9
66
57
  specification_version: 4
67
58
  summary: A puppet-lint plugin to check topscope variables.
68
59
  test_files: []