vagrant-serverspec 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gempush.yml +2 -2
- data/README.md +3 -1
- data/lib/vagrant-serverspec/config.rb +12 -0
- data/lib/vagrant-serverspec/provisioner.rb +4 -0
- data/lib/vagrant-serverspec/version.rb +1 -1
- data/test/ubuntu/Vagrantfile +1 -0
- data/test/ubuntu/exclude_this_spec.rb +6 -0
- metadata +25 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf819c978e49dc770304f6e13a05114333290b9ffdb93d396cbf43586dabe825
|
4
|
+
data.tar.gz: d5b709e909e1c0390ee0ce6150b7c8c24b6749b3cd0d9d8b03feb5b6ab757d14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f29e2e30ccfd2260dcd637afc6a653e2aa567a2c154240228c95c74abb24bbde9ff5aec3daeb0bd5a636e6ada3d814381316d2fd0b31294d41aa3fdf4688c46
|
7
|
+
data.tar.gz: b6eae77de546da3570a0b3e30eb299ed2b78adf514adb5702b0aa0b35af721a7cbbc2c941ada26e807e51638a4a90ba6b7381c60be89b2d4c90d4a66a15b582b
|
data/README.md
CHANGED
@@ -44,7 +44,9 @@ Vagrant.configure('2') do |config|
|
|
44
44
|
config.vm.provision :serverspec do |spec|
|
45
45
|
# pattern for specfiles to search
|
46
46
|
spec.pattern = '*_spec.rb'
|
47
|
-
#
|
47
|
+
# pattern for specfiles to ignore, similar to rspec's --exclude-pattern option
|
48
|
+
spec.exclude_pattern = 'but_not_*_spec.rb'
|
49
|
+
# disable error if no specfile was found ( useful with dynamic specfile retrieving through another provisionner like Ansible Galaxy => specfiles can be saved into ansible role repository for example ). Default: true
|
48
50
|
spec.error_no_spec_files = false
|
49
51
|
# save result into html an report, saved into a 'rspec_html_reports' directory. Default: false
|
50
52
|
spec.html_output = true
|
@@ -3,6 +3,8 @@ module VagrantPlugins
|
|
3
3
|
class Config < Vagrant.plugin('2', :config)
|
4
4
|
attr_accessor :spec_files
|
5
5
|
attr_accessor :spec_pattern
|
6
|
+
attr_accessor :spec_excluded_files
|
7
|
+
attr_accessor :spec_exclude_pattern
|
6
8
|
attr_accessor :error_no_spec_files_found
|
7
9
|
attr_accessor :html_output_format
|
8
10
|
attr_accessor :junit_output_format
|
@@ -12,6 +14,8 @@ module VagrantPlugins
|
|
12
14
|
def initialize
|
13
15
|
super
|
14
16
|
@spec_files = UNSET_VALUE
|
17
|
+
@spec_excluded_files = UNSET_VALUE
|
18
|
+
@spec_exclude_pattern = UNSET_VALUE
|
15
19
|
@html_output_format = UNSET_VALUE
|
16
20
|
@error_no_spec_files_found = UNSET_VALUE
|
17
21
|
@junit_output_format = UNSET_VALUE
|
@@ -23,6 +27,11 @@ module VagrantPlugins
|
|
23
27
|
@spec_pattern = pat
|
24
28
|
end
|
25
29
|
|
30
|
+
def exclude_pattern=(pat)
|
31
|
+
@spec_excluded_files = Dir.glob(pat)
|
32
|
+
@spec_exclude_pattern = pat
|
33
|
+
end
|
34
|
+
|
26
35
|
def error_no_spec_files=(warn_spec)
|
27
36
|
if [true, false].include? warn_spec
|
28
37
|
@error_no_spec_files_found = warn_spec
|
@@ -49,6 +58,9 @@ module VagrantPlugins
|
|
49
58
|
|
50
59
|
def finalize!
|
51
60
|
@spec_files = [] if @spec_files == UNSET_VALUE
|
61
|
+
@spec_exclude_pattern = '' if @spec_exclude_pattern == UNSET_VALUE
|
62
|
+
@spec_excluded_files = [] if @spec_excluded_files == UNSET_VALUE
|
63
|
+
@spec_files = @spec_files - @spec_excluded_files
|
52
64
|
@html_output_format = false if @html_output_format == UNSET_VALUE
|
53
65
|
@error_no_spec_files_found = true if @error_no_spec_files_found == UNSET_VALUE
|
54
66
|
@junit_output_format = false if @junit_output_format == UNSET_VALUE
|
@@ -8,6 +8,8 @@ module VagrantPlugins
|
|
8
8
|
super
|
9
9
|
@spec_files = config.spec_files
|
10
10
|
@spec_pattern = config.spec_pattern
|
11
|
+
@spec_excluded_files = config.spec_excluded_files
|
12
|
+
@spec_exclude_pattern = config.spec_exclude_pattern
|
11
13
|
@error_no_spec_files_found = config.error_no_spec_files_found
|
12
14
|
end
|
13
15
|
|
@@ -69,6 +71,8 @@ module VagrantPlugins
|
|
69
71
|
RSpec.clear_examples
|
70
72
|
|
71
73
|
@spec_files = Dir.glob(@spec_pattern)
|
74
|
+
@spec_excluded_files = Dir.glob(@spec_exclude_pattern)
|
75
|
+
@spec_files = @spec_files - @spec_excluded_files
|
72
76
|
raise Vagrant::Errors::ServerSpecFilesNotFound if @spec_files.length == 0 and @error_no_spec_files_found
|
73
77
|
|
74
78
|
RSpec.configure do |rconfig|
|
data/test/ubuntu/Vagrantfile
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Voorhis
|
@@ -10,46 +10,46 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: serverspec
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '2.30'
|
22
|
-
- - "
|
22
|
+
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '2.30'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
|
-
- - "
|
29
|
+
- - "~>"
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: '2.30'
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '2.30'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: winrm
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '2.1'
|
42
|
-
- - "
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '2.1'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- - "
|
49
|
+
- - "~>"
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '2.1'
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -104,42 +104,42 @@ dependencies:
|
|
104
104
|
name: activesupport
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '5.2'
|
110
107
|
- - "~>"
|
111
108
|
- !ruby/object:Gem::Version
|
112
109
|
version: 5.2.3
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '5.2'
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '5.2'
|
120
117
|
- - "~>"
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: 5.2.3
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '5.2'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: bundler
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '1.17'
|
130
127
|
- - "~>"
|
131
128
|
- !ruby/object:Gem::Version
|
132
129
|
version: 1.17.3
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '1.17'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - ">="
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: '1.17'
|
140
137
|
- - "~>"
|
141
138
|
- !ruby/object:Gem::Version
|
142
139
|
version: 1.17.3
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '1.17'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: rake
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- test/Docker/spec_helper.rb
|
185
185
|
- test/ubuntu/.rspec
|
186
186
|
- test/ubuntu/Vagrantfile
|
187
|
+
- test/ubuntu/exclude_this_spec.rb
|
187
188
|
- test/ubuntu/sample_spec.rb
|
188
189
|
- test/ubuntu/spec_helper.rb
|
189
190
|
- test/windows/.rspec
|
@@ -210,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
211
|
- !ruby/object:Gem::Version
|
211
212
|
version: '0'
|
212
213
|
requirements: []
|
213
|
-
rubygems_version: 3.
|
214
|
+
rubygems_version: 3.1.2
|
214
215
|
signing_key:
|
215
216
|
specification_version: 4
|
216
217
|
summary: A Vagrant plugin that executes serverspec
|
@@ -222,6 +223,7 @@ test_files:
|
|
222
223
|
- test/Docker/spec_helper.rb
|
223
224
|
- test/ubuntu/.rspec
|
224
225
|
- test/ubuntu/Vagrantfile
|
226
|
+
- test/ubuntu/exclude_this_spec.rb
|
225
227
|
- test/ubuntu/sample_spec.rb
|
226
228
|
- test/ubuntu/spec_helper.rb
|
227
229
|
- test/windows/.rspec
|