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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f1b5a3021a7770bc36c8a7e0d469434c5504d908c7c5b98374488c30e6a8635
4
- data.tar.gz: 13f98b78fc6663d26c60868c2188d8c3b5e9abefa88ddcaa81a3e27e2c5b5f62
3
+ metadata.gz: 89090daba210cfd9ef63a21b4aa79bfa5fad0b5bab8c5d5a61b2593a9a4f73ea
4
+ data.tar.gz: 85f6dadafc8331dfd464850da7f6382a3affbf2a035cfb01d01717c16149e219
5
5
  SHA512:
6
- metadata.gz: 3b6cce53b8a2c57fede10f883d1f6e71b0b98ae40ee59b95badb025e0a3c601796e574b05b4d5061d5285c473c609dab4a0e5d5383ee761772725f921ad08102
7
- data.tar.gz: fb9f1b5f5cd61f713a1dd2e06fce15c25633066129214eed86414196f947f49d6affee47998a9d2899e6f8dd4e7ea01ba6136ef3a881c71689aa7a21f60ae006
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}/**/*.rb
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
@@ -11,18 +11,20 @@ raketask = 'spec'
11
11
  showtasks = false
12
12
 
13
13
  opts = GetoptLong.new(
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
- ["--version", "-v", GetoptLong::NO_ARGUMENT],
22
- ["--help", "-h", GetoptLong::NO_ARGUMENT],
23
- ["--raketask", "-1", GetoptLong::REQUIRED_ARGUMENT],
24
- ["--tmpdir", "-2", GetoptLong::REQUIRED_ARGUMENT],
25
- ["--tasks", "-T", GetoptLong::NO_ARGUMENT]
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"
@@ -1,3 +1,3 @@
1
1
  module ServerspecRunner
2
- VERSION = "1.3.3"
2
+ VERSION = "1.3.4"
3
3
  end
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.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-02 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serverspec