cucumber-puppet 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/cucumber-puppet +36 -85
- metadata +6 -6
data/VERSION.yml
CHANGED
data/bin/cucumber-puppet
CHANGED
@@ -1,106 +1,57 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
4
|
+
|
3
5
|
require 'rubygems'
|
4
6
|
require 'cucumber-puppet'
|
5
7
|
require 'cucumber-puppet/helper'
|
6
|
-
require 'optparse'
|
7
8
|
|
8
9
|
include CucumberPuppet::Helper
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
o.on('-b', '--backtrace', 'Show full backtrace for all errors') do
|
15
|
-
options << "--backtrace "
|
16
|
-
end
|
17
|
-
|
18
|
-
o.on('-e', '--exclude PATTERN',
|
19
|
-
'Exclude files matching PATTERN') do |pattern|
|
20
|
-
options << "--exclude #{pattern}"
|
21
|
-
end
|
22
|
-
|
23
|
-
o.on('-f', '--format FORMAT',
|
24
|
-
'How to format features (default: pretty)',
|
25
|
-
' see "cucumber --help" for details') do |format|
|
26
|
-
options << "--format #{format}"
|
27
|
-
end
|
28
|
-
|
29
|
-
o.on('-h', '--help', 'Show this message') do
|
30
|
-
puts opts
|
31
|
-
exit
|
32
|
-
end
|
33
|
-
|
34
|
-
o.on('-n', '--name NAME',
|
35
|
-
'Only run matching feature elements',
|
36
|
-
' see "cucumber --help" for details') do |n|
|
37
|
-
options << "--name #{n}"
|
38
|
-
end
|
39
|
-
|
40
|
-
o.on('-o', '--out FILE|DIR',
|
41
|
-
'Write output to file/directory',
|
42
|
-
' see "cucumber --help" for details') do |f|
|
43
|
-
options << "--out #{f}"
|
44
|
-
end
|
45
|
-
|
46
|
-
o.on('-t', '--tags TAG_EXPRESSION',
|
47
|
-
'Only run features/scenarios matching expr',
|
48
|
-
' see "cucumber --help" for details') do |t|
|
49
|
-
options << "--tags #{t}"
|
50
|
-
end
|
51
|
-
|
52
|
-
o.on('-v', '--verbose', 'Show files and features loaded') do
|
53
|
-
options << "--verbose"
|
54
|
-
end
|
11
|
+
def usage
|
12
|
+
puts <<EOH
|
13
|
+
Usage: cucumber-puppet [options] <feature> [<feature> ...]
|
55
14
|
|
56
|
-
|
57
|
-
|
58
|
-
exit
|
59
|
-
end
|
15
|
+
-h, --help Show this help.
|
16
|
+
--version Show version.
|
60
17
|
|
61
|
-
|
62
|
-
options << "--expand"
|
63
|
-
end
|
64
|
-
end
|
18
|
+
All other options are passed directly to cucumber.
|
65
19
|
|
66
|
-
|
67
|
-
opts.parse!
|
68
|
-
rescue OptionParser::InvalidOption
|
69
|
-
puts opts
|
70
|
-
exit 1
|
20
|
+
EOH
|
71
21
|
end
|
72
22
|
|
73
23
|
unless ARGV[0]
|
74
|
-
|
24
|
+
usage
|
75
25
|
exit 1
|
76
26
|
end
|
77
27
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
28
|
+
rootdir = File.expand_path(find_root)
|
29
|
+
args = Array.new(ARGV)
|
30
|
+
args.each do |arg|
|
31
|
+
if arg == '--version'
|
32
|
+
puts CucumberPuppet::VERSION
|
33
|
+
exit
|
34
|
+
elsif arg == '-h' or arg == '--help'
|
35
|
+
usage
|
36
|
+
else
|
37
|
+
next if arg =~ /^-/
|
38
|
+
# this arg should be a filename
|
39
|
+
next if not File.exists?(arg)
|
40
|
+
|
41
|
+
file = File.expand_path(arg).split('/')
|
42
|
+
until file.empty?
|
43
|
+
if file.last == 'features'
|
44
|
+
ARGV.unshift "--require", file.join('/')
|
45
|
+
break
|
46
|
+
elsif file.join('/') == rootdir
|
47
|
+
break
|
48
|
+
end
|
49
|
+
file.pop
|
99
50
|
end
|
100
|
-
abs_f.pop
|
101
51
|
end
|
102
|
-
|
103
|
-
command << f
|
104
52
|
end
|
105
53
|
|
106
|
-
|
54
|
+
ARGV.unshift "--require", "#{rootdir}/features"
|
55
|
+
ARGV.unshift "--strict"
|
56
|
+
|
57
|
+
load Gem.bin_path('cucumber')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nikolay Sturm
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-17 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements: []
|
127
127
|
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.
|
129
|
+
rubygems_version: 1.6.2
|
130
130
|
signing_key:
|
131
131
|
specification_version: 3
|
132
132
|
summary: Puppet catalog testing with Cucumber
|