serverspec-runner 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -1
- data/bin/serverspec-runner +19 -12
- data/lib/serverspec-runner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89090daba210cfd9ef63a21b4aa79bfa5fad0b5bab8c5d5a61b2593a9a4f73ea
|
4
|
+
data.tar.gz: 85f6dadafc8331dfd464850da7f6382a3affbf2a035cfb01d01717c16149e219
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9253380735028f5f45721dccf86ca933a7cc1770563050a050d83cb9ebb3c263b200edfaabd89bb50119e0d625814e96961fe0e54982c9478dfcfb8800df409c
|
7
|
+
data.tar.gz: 78a778d1faa5ac1fa832f8fc43c509eca9a4cc802fb454094b347a0b91151f98544da6faef19089029d06c26b22d9ea832099472fb50d5371fa2ea1072398153
|
data/Rakefile
CHANGED
@@ -93,6 +93,8 @@ namespace :spec do
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def exec_tasks(parent, node, real_path, platform)
|
96
|
+
spec_file_pattern = ENV['pattern'] || "**/*.rb"
|
97
|
+
spec_file_exclude_pattern = ENV['exclude_pattern']
|
96
98
|
|
97
99
|
if parent == nil
|
98
100
|
abs_node = node
|
@@ -118,8 +120,12 @@ namespace :spec do
|
|
118
120
|
|
119
121
|
if Dir.exists?("#{ENV['specpath']}/#{fpath}")
|
120
122
|
t.pattern = %W[
|
121
|
-
#{ENV['specpath']}/#{fpath}
|
123
|
+
#{ENV['specpath']}/#{fpath}/#{spec_file_pattern}
|
122
124
|
]
|
125
|
+
|
126
|
+
if spec_file_exclude_pattern
|
127
|
+
t.exclude_pattern = "#{ENV['specpath']}/#{fpath}/#{spec_file_exclude_pattern}"
|
128
|
+
end
|
123
129
|
elsif File.file?("#{ENV['specpath']}/#{fpath}.rb")
|
124
130
|
t.pattern = %W[
|
125
131
|
#{ENV['specpath']}/#{fpath}.rb
|
data/bin/serverspec-runner
CHANGED
@@ -11,18 +11,20 @@ raketask = 'spec'
|
|
11
11
|
showtasks = false
|
12
12
|
|
13
13
|
opts = GetoptLong.new(
|
14
|
-
["--scenario",
|
15
|
-
["--inventory",
|
16
|
-
["--specroot",
|
17
|
-
["--ssh_options",
|
18
|
-
["--explain",
|
19
|
-
["--tableformat",
|
20
|
-
["--parallel",
|
21
|
-
["--
|
22
|
-
["--
|
23
|
-
["--
|
24
|
-
["--
|
25
|
-
["--
|
14
|
+
["--scenario", "-s", GetoptLong::REQUIRED_ARGUMENT],
|
15
|
+
["--inventory", "-i", GetoptLong::REQUIRED_ARGUMENT],
|
16
|
+
["--specroot", "-r", GetoptLong::REQUIRED_ARGUMENT],
|
17
|
+
["--ssh_options", "-o", GetoptLong::REQUIRED_ARGUMENT],
|
18
|
+
["--explain", "-e", GetoptLong::REQUIRED_ARGUMENT],
|
19
|
+
["--tableformat", "-t", GetoptLong::REQUIRED_ARGUMENT],
|
20
|
+
["--parallel", "-p", GetoptLong::REQUIRED_ARGUMENT],
|
21
|
+
["--pattern", "-P", GetoptLong::REQUIRED_ARGUMENT],
|
22
|
+
["--exclude-pattern", "-E", GetoptLong::REQUIRED_ARGUMENT],
|
23
|
+
["--version", "-v", GetoptLong::NO_ARGUMENT],
|
24
|
+
["--help", "-h", GetoptLong::NO_ARGUMENT],
|
25
|
+
["--raketask", "-1", GetoptLong::REQUIRED_ARGUMENT],
|
26
|
+
["--tmpdir", "-2", GetoptLong::REQUIRED_ARGUMENT],
|
27
|
+
["--tasks", "-T", GetoptLong::NO_ARGUMENT]
|
26
28
|
)
|
27
29
|
|
28
30
|
opts.each do |opt, arg|
|
@@ -41,6 +43,10 @@ opts.each do |opt, arg|
|
|
41
43
|
ENV['tableformat'] = arg
|
42
44
|
when '--parallel'
|
43
45
|
ENV['parallels'] = arg
|
46
|
+
when '--pattern'
|
47
|
+
ENV['pattern'] = arg
|
48
|
+
when '--exclude-pattern'
|
49
|
+
ENV['exclude_pattern'] = arg
|
44
50
|
when '--tmpdir'
|
45
51
|
ENV['tmpdir'] = arg
|
46
52
|
when '--raketask'
|
@@ -60,6 +66,7 @@ opts.each do |opt, arg|
|
|
60
66
|
puts "-t, --tableformat (aa|mkd|csv|bool|none) specify result table type(default: aa)"
|
61
67
|
puts "-T, --tasks display the tasks with descriptions(exec rake -T)"
|
62
68
|
puts "-p, --parallel execute tasks in parallel"
|
69
|
+
puts "-P, --pattern execute pattern in spec directory"
|
63
70
|
puts "-1, --raketask RAKE_TASK_NAME execute specified rake task only(ex: spec:test::anyhost-01)"
|
64
71
|
puts "-v, --version show version"
|
65
72
|
puts "-h, --help show help"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serverspec
|