barthes 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/barthes/action.rb +1 -1
- data/lib/barthes/cli.rb +0 -1
- data/lib/barthes/reporter/junit_xml.rb +6 -3
- data/lib/barthes/runner.rb +1 -0
- data/lib/barthes/version.rb +1 -1
- metadata +2 -3
- data/TODO.md +0 -13
data/lib/barthes/action.rb
CHANGED
@@ -58,7 +58,7 @@ module Barthes
|
|
58
58
|
params.each do |k, v|
|
59
59
|
if v.class == String
|
60
60
|
new_v = v.gsub(/\$\{(.+?)\}/) { @env[$1] }
|
61
|
-
new_v = new_v.gsub(/\@\{(.+?)\}/) {
|
61
|
+
new_v = new_v.gsub(/\@\{(.+?)\}/) { Barthes::Cache[$1] }
|
62
62
|
else
|
63
63
|
new_v = v
|
64
64
|
end
|
data/lib/barthes/cli.rb
CHANGED
@@ -18,19 +18,22 @@ module Barthes
|
|
18
18
|
puts Nokogiri::XML(result).to_xml(indent: 2)
|
19
19
|
end
|
20
20
|
|
21
|
-
def walk_json(json)
|
21
|
+
def walk_json(json, parents=[])
|
22
22
|
case json.first
|
23
23
|
when 'feature', 'scenario'
|
24
24
|
if json.last.class == Array
|
25
25
|
@xml.testsuite(name: json[1], tests: json.last.size) do
|
26
|
+
parents.push json[1]
|
26
27
|
json.last.each do |child|
|
27
|
-
walk_json(child)
|
28
|
+
walk_json(child, parents)
|
28
29
|
end
|
30
|
+
parents.pop
|
29
31
|
end
|
30
32
|
end
|
31
33
|
when 'action'
|
32
34
|
@xml.testsuite(name: json[1], tests: 1) do
|
33
|
-
|
35
|
+
name = [parents, "##{json.last['number'].to_s} #{json[1]}"].join('.')
|
36
|
+
@xml.testcase(name: name) do
|
34
37
|
case json.last['status']
|
35
38
|
when 'skipped'
|
36
39
|
@xml.skipped
|
data/lib/barthes/runner.rb
CHANGED
@@ -108,6 +108,7 @@ module Barthes
|
|
108
108
|
env = @env.dup
|
109
109
|
env.update(content['env']) if content['env']
|
110
110
|
@reporter.report(:action, @num, name, action.last, scenarios) do
|
111
|
+
content['number'] = @num
|
111
112
|
if Barthes::Config[:dryrun] == 0 && !@failed
|
112
113
|
content = Action.new(env).action(content)
|
113
114
|
if content['expectations'] && content['expectations'].any? {|e| e['result'] == false }
|
data/lib/barthes/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barthes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -153,7 +153,6 @@ files:
|
|
153
153
|
- LICENSE.txt
|
154
154
|
- README.md
|
155
155
|
- Rakefile
|
156
|
-
- TODO.md
|
157
156
|
- barthes.gemspec
|
158
157
|
- bin/barthes
|
159
158
|
- lib/barthes.rb
|
data/TODO.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
* json schema
|
2
|
-
* embed strftime format or date command format datetime to json
|
3
|
-
--------------------------------------------
|
4
|
-
* embed or in json expectations
|
5
|
-
* あらかじめ番号を最後まで数えるようにする
|
6
|
-
* action status
|
7
|
-
* make 'to' option work
|
8
|
-
* load libraries
|
9
|
-
* テストサマリー表示
|
10
|
-
--------------------------
|
11
|
-
compare -> method, feature, scenario, action
|
12
|
-
xpath change (describe security groups)
|
13
|
-
|