puppet-lint-manifest_whitespace-check 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfd370ff80d1f947b2ff60f2328ec106465b4dbc6aa43b3e9b90d029cc217912
4
- data.tar.gz: 03ad9c1bbc4c4620a82201068606984ea7229165af7bd00572920ae5af0c4316
3
+ metadata.gz: 3a88d7225a7ea73adc00bc91018d5b78e220ad0a8056c221690e7373ed5f26ab
4
+ data.tar.gz: 01a9be5a5bbecf5c4c3c668d2afd5e41f41dabcd6e4369134ce23695f725c2fc
5
5
  SHA512:
6
- metadata.gz: deec8f90369d519039c09c721087c289dd9c4c7225c2caa760b21cdaeacd4611f7b95470a2c3c2732fdd3e045f78d872ac8f8935d200e2a48b9e578bac4f0745
7
- data.tar.gz: 0b008268fd5686720c5e9d4173e78543f741dc8a41a7f9b97d2656cb4eae52a9b9b897fe07b59464d6f542a9f485bb9fdeaa5707e1650a21eb13f674467e9f4b
6
+ metadata.gz: 9682a9aa02a6110d8204ec9035f92e958be68d55489ae7a46548bb133fd0d2f002130e9150f1de31e885d3dcb044e64e6068f9f934e2ac5b1dd704edf46ed26c
7
+ data.tar.gz: e22271195239f6e9c25d631853734379c8f911899379e1f2c805cf7e195cf4679d5d73e4da01b6f8563f20fb07ff023559b1009d0989c9be368230bb02cb8fc5
@@ -153,9 +153,28 @@ describe 'manifest_whitespace_closing_bracket_before' do
153
153
  end
154
154
 
155
155
  describe 'manifest_whitespace_closing_bracket_after' do
156
- let(:closing_bracket_msg) {
156
+ let(:closing_bracket_msg) do
157
157
  'there should be either a bracket, punctuation mark, closing quote or a newline after a closing bracket, or whitespace and none of the aforementioned'
158
- }
158
+ end
159
+
160
+ context 'inside heredoc' do
161
+ let(:code) do
162
+ <<~EOF
163
+ class test::heredoc {
164
+ $unsupported = @("MESSAGE"/L)
165
+ This does not support ${facts['os']['name']} ${$facts['os']['release']['major']}; \
166
+ see ${support_urls['supported_platforms']} for more information\
167
+ | MESSAGE
168
+
169
+ fail($unsupported)
170
+ }
171
+ EOF
172
+ end
173
+
174
+ it 'should detect no problems' do
175
+ expect(problems).to be_empty
176
+ end
177
+ end
159
178
 
160
179
  context 'with many brackets' do
161
180
  let(:code) do
@@ -5,6 +5,25 @@ require 'spec_helper'
5
5
  describe 'manifest_whitespace_opening_bracket_before' do
6
6
  let(:opening_bracket_msg) { 'there should be a single space before an opening bracket' }
7
7
 
8
+ context 'inside heredoc' do
9
+ let(:code) do
10
+ <<~EOF
11
+ class test::heredoc {
12
+ $unsupported = @("MESSAGE"/L)
13
+ This does not support ${facts['os']['name']} ${$facts['os']['release']['major']}; \
14
+ see ${support_urls['supported_platforms']} for more information\
15
+ | MESSAGE
16
+
17
+ fail($unsupported)
18
+ }
19
+ EOF
20
+ end
21
+
22
+ it 'should detect no problems' do
23
+ expect(problems).to be_empty
24
+ end
25
+ end
26
+
8
27
  context 'with comment' do
9
28
  let(:code) do
10
29
  <<~EOF
@@ -87,6 +106,7 @@ describe 'manifest_whitespace_opening_bracket_before' do
87
106
  if fact["${var}"] != $var2.keys[0] {
88
107
  # noop
89
108
  }
109
+ $variable_customfact = $facts['customfact_name'][$variable]
90
110
 
91
111
  $value = [{ 'key' => 'value' }]
92
112
  $value2 = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-manifest_whitespace-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-19 00:00:00.000000000 Z
11
+ date: 2022-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '3.0'
22
+ version: '4'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '3.0'
32
+ version: '4'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: coveralls
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.3.7
169
+ rubygems_version: 3.3.5
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: A puppet-lint check to validate whitespace in manifests