puppet-ci-testing 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/check_file_syntax.rb +1 -1
- data/spec/check_file_syntax_spec.rb +18 -11
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 246d054d293f00e1abd2bee6212b81845e2aa71c28b2e9a7cb036aa1a9ea0af3
|
4
|
+
data.tar.gz: 82881252fa117ee253093ddfb9e35d53825d9e52633319cd155ed09d7a8cfd30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33404275920c6da9f2b37faaab69c84fc44f57c3239f7659d41f290ddaa643b1ec69951482a691611003c90e7b6571c6dafeacd1cd54bcf4d5750b6ff91a71f4
|
7
|
+
data.tar.gz: 15d3cf77e8b421287a6b3ff94b6b9c2ea2897d18fb19edeffefdf6bf06066f9e4aa724c6e37290e3f31d69b01eb8a2612b3ff6188a09b710db7ae5eaf27d7cc9
|
data/lib/check_file_syntax.rb
CHANGED
@@ -16,11 +16,10 @@ describe CheckFileSyntax do
|
|
16
16
|
:yaml => ['.yaml','.yml'],
|
17
17
|
:perl => ['.pl','.pm'],
|
18
18
|
:bash => ['.sh','.bash','.zsh','.ksh'],
|
19
|
-
:ruby => '.rb',
|
19
|
+
:ruby => ['.rb', '.rake'],
|
20
20
|
:python => '.py',
|
21
21
|
:erb => '.erb',
|
22
|
-
:puppet => '.pp',
|
23
|
-
:gitlab_ci => '.gitlab-ci.yml' }.each_pair do |type, exts|
|
22
|
+
:puppet => '.pp', }.each_pair do |type, exts|
|
24
23
|
[exts].flatten.each do |ext|
|
25
24
|
it "identifies #{type} with #{ext} extension" do
|
26
25
|
expect(CheckFileSyntax::type_of_file("foo#{ext}", type, exts)).to eq true
|
@@ -32,18 +31,26 @@ describe CheckFileSyntax do
|
|
32
31
|
:yaml => ['.yaml','.yml'],
|
33
32
|
:perl => ['.pl','.pm'],
|
34
33
|
:bash => ['.sh','.bash','.zsh','.ksh'],
|
35
|
-
:ruby => '.rb',
|
34
|
+
:ruby => ['.rb', '.rake'],
|
36
35
|
:python => '.py',
|
37
36
|
:erb => '.erb',
|
38
|
-
:puppet => '.pp',
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
expect(CheckFileSyntax::type_of_file("foo.#{bad_ext}", type, exts)).to eq false
|
44
|
-
end
|
37
|
+
:puppet => '.pp', }.each_pair do |type, exts|
|
38
|
+
bad_ext = random_string(8)
|
39
|
+
[exts].flatten.each do |ext|
|
40
|
+
it "fails identifying #{type} without #{ext} extension" do
|
41
|
+
expect(CheckFileSyntax::type_of_file("foo.#{bad_ext}", type, exts)).to eq false
|
45
42
|
end
|
46
43
|
end
|
44
|
+
end
|
45
|
+
|
46
|
+
{ :ruby => ['rakefile', 'Rakefile'],
|
47
|
+
:gitlab_ci => '.gitlab-ci.yml' }.each_pair do |type, files|
|
48
|
+
[files].flatten.each do |name|
|
49
|
+
it "identifies #{name} as #{type}" do
|
50
|
+
expect(CheckFileSyntax::type_of_file(name, type, files)).to eq true
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
47
54
|
|
48
55
|
CheckFileSyntax::ALL_CHECKS.each do |type|
|
49
56
|
bad_ext ||= random_string(8)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-ci-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerard Hickey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.17.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.17.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|