barthes 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/barthes/cli.rb CHANGED
@@ -16,6 +16,7 @@ module Barthes
16
16
  on 'd', 'dryrun', 'not run test but show just structure', argument: :optional, as: :count
17
17
  on 'c', 'cache', 'cache path', argument: :optional, default: './barthes-cache.json'
18
18
  on 'r', 'reporters', 'reporters to use', argument: :optional, as: Array
19
+ on 'j', 'junit-xml', 'junit xml output path', argument: :optional
19
20
  end
20
21
  @opt.to_hash
21
22
  end
@@ -31,22 +31,20 @@ module Barthes
31
31
  end
32
32
  end
33
33
  when 'action'
34
- @xml.testsuite(name: json[1], tests: 1) do
35
- name = [parents, "##{json.last['number'].to_s} #{json[1]}"].join('.')
36
- @xml.testcase(name: name) do
37
- case json.last['status']
38
- when 'skipped'
39
- @xml.skipped
40
- when 'failure'
41
- when 'error'
42
- end
43
- if json.last['status'] != 'skipped' && json.last['request'] && json.last['response']
44
- stdout = "request:\n"
45
- stdout += "#{JSON.pretty_generate(json.last['request'])}\n"
46
- stdout += "response:\n"
47
- stdout += "#{JSON.pretty_generate(json.last['response'])}\n"
48
- @xml.tag!(:'system-out', stdout)
49
- end
34
+ name = [parents, "##{json.last['number'].to_s} #{json[1]}"].join('.')
35
+ @xml.testcase(name: name) do
36
+ case json.last['status']
37
+ when 'skipped'
38
+ @xml.skipped
39
+ when 'failure'
40
+ when 'error'
41
+ end
42
+ if json.last['status'] != 'skipped' && json.last['request'] && json.last['response']
43
+ stdout = "request:\n"
44
+ stdout += "#{JSON.pretty_generate(json.last['request'])}\n"
45
+ stdout += "response:\n"
46
+ stdout += "#{JSON.pretty_generate(json.last['response'])}\n"
47
+ @xml.tag!(:'system-out', stdout)
50
48
  end
51
49
  end
52
50
  else
@@ -1,3 +1,3 @@
1
1
  module Barthes
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
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.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: