rspec_junit_formatter 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 4ff821525517ff9e64733fd500e22399577252b5
4
- data.tar.gz: d988af0bd85a6a198d314597df587239a22e3c94
3
+ metadata.gz: e211136b00b6e387b4462d60e35440036f17176f
4
+ data.tar.gz: fce1b23563a568400b7c00570301b6103fbf2952
5
5
  SHA512:
6
- metadata.gz: 09bda5d34cd82f1ddd6c31c61a3c4249d23ef842352ad799968ac826ad498a099c561beccdd3794f3c2ebbab52582d81781beb865f7276d0d853ebf0a062727f
7
- data.tar.gz: 484ad5700266c03add749dc3a87b5805e486f51f21e965d4d11764cb312a32e66fad92ee28a6ee55eda1cb01a52f9e68588e369df5f1fe2b3ac4a259d492fee8
6
+ metadata.gz: de44113bb4223df0926d73c761ae11035747c7fdb2ee035bb8cf226d6176b8ba2491de9b5046ba48a3f196de9d269720ca6cfe86c91846d9373c3c355e21a8fa
7
+ data.tar.gz: 81456c2d3a47f96a066333129b721f3d06f8559353d8409b1155e26dcfc497b680ae729d14902bb55712f88f59aa361bef0ed58e57ac0bdc3b4c8006ed010c43
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -42,7 +42,7 @@ The MIT License, see [LICENSE][license].
42
42
  [jenkins]: http://jenkins-ci.org/
43
43
  [dgvncsz0f]: https://github.com/dgvncsz0f
44
44
  [dgvncsz0f/rspec_formatters]: https://github.com/dgvncsz0f/rspec_formatters
45
- [ci_reporter]: http://caldersphere.rubyforge.org/ci_reporter/
45
+ [ci_reporter]: https://github.com/nicksieger/ci_reporter
46
46
  [bundler]: http://gembundler.com/
47
47
  [fuubar]: http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
48
48
  [license]: https://github.com/sj26/rspec-junit-formatter/blob/master/LICENSE
@@ -1,8 +1,7 @@
1
1
  require "time"
2
-
3
2
  require "builder"
4
- require "rspec"
5
3
 
4
+ require "rspec/core/version"
6
5
  require "rspec/core/formatters/base_formatter"
7
6
 
8
7
  # Dumps rspec results as a JUnit XML file.
@@ -18,7 +17,8 @@ private
18
17
 
19
18
  def xml_dump
20
19
  xml.instruct!
21
- xml.testsuite name: "rspec", tests: example_count, failures: failure_count, errors: 0, time: "%.6f" % duration, timestamp: started.iso8601 do
20
+ xml.testsuite name: "rspec#{ENV['TEST_ENV_NUMBER']}", tests: example_count, failures: failure_count, errors: 0, time: "%.6f" % duration, timestamp: started.iso8601 do
21
+ xml.comment! "Randomized with seed #{RSpec.configuration.seed}"
22
22
  xml.properties
23
23
  xml_dump_examples
24
24
  end
@@ -52,14 +52,14 @@ private
52
52
  end
53
53
 
54
54
  def xml_dump_example(example, &block)
55
- xml.testcase classname: classname_for(example), name: description_for(example), time: "%.6f" % duration_for(example), &block
55
+ xml.testcase classname: classname_for(example), name: description_for(example), file: example_group_file_path_for(example), time: "%.6f" % duration_for(example), &block
56
56
  end
57
57
  end
58
58
 
59
59
  RspecJunitFormatter = RSpecJUnitFormatter
60
60
 
61
- if RSpec::Version::STRING.start_with? "3."
61
+ if RSpec::Core::Version::STRING.start_with? "3."
62
62
  require "rspec_junit_formatter/rspec3"
63
- else RSpec::Version::STRING.start_with? "2."
63
+ else RSpec::Core::Version::STRING.start_with? "2."
64
64
  require "rspec_junit_formatter/rspec2"
65
65
  end
@@ -23,8 +23,17 @@ private
23
23
  example.execution_result[:status]
24
24
  end
25
25
 
26
+ def example_group_file_path_for(example)
27
+ meta = example.metadata
28
+ while meta[:example_group]
29
+ meta = meta[:example_group]
30
+ end
31
+ meta[:file_path]
32
+ end
33
+
26
34
  def classname_for(example)
27
- example.file_path.sub(%r{\.[^/.]+\Z}, "").gsub("/", ".").gsub(/\A\.+|\.+\Z/, "")
35
+ fp = example_group_file_path_for(example)
36
+ fp.sub(%r{\.[^/.]+\Z}, "").gsub("/", ".").gsub(/\A\.+|\.+\Z/, "")
28
37
  end
29
38
 
30
39
  def duration_for(example)
@@ -40,15 +40,24 @@ private
40
40
  end
41
41
 
42
42
  def result_of(notification)
43
- notification.example.execution_result[:status]
43
+ notification.example.execution_result.status
44
+ end
45
+
46
+ def example_group_file_path_for(notification)
47
+ meta = notification.example.metadata
48
+ while meta[:example_group]
49
+ meta = meta[:example_group]
50
+ end
51
+ meta[:file_path]
44
52
  end
45
53
 
46
54
  def classname_for(notification)
47
- notification.example.file_path.sub(%r{\.[^/]*\Z}, "").gsub("/", ".").gsub(%r{\A\.+|\.+\Z}, "")
55
+ fp = example_group_file_path_for(notification)
56
+ fp.sub(%r{\.[^/]*\Z}, "").gsub("/", ".").gsub(%r{\A\.+|\.+\Z}, "")
48
57
  end
49
58
 
50
59
  def duration_for(notification)
51
- notification.example.execution_result[:run_time]
60
+ notification.example.execution_result.run_time
52
61
  end
53
62
 
54
63
  def description_for(notification)
@@ -56,10 +65,10 @@ private
56
65
  end
57
66
 
58
67
  def exception_for(notification)
59
- notification.example.execution_result[:exception]
68
+ notification.example.execution_result.exception
60
69
  end
61
70
 
62
71
  def formatted_backtrace_for(notification)
63
- backtrace = notification.formatted_backtrace
72
+ notification.formatted_backtrace
64
73
  end
65
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_junit_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDKDCCAhCgAwIBAgIBAjANBgkqhkiG9w0BAQUFADA6MQ0wCwYDVQQDDARzajI2
13
+ MIIDKDCCAhCgAwIBAgIBAzANBgkqhkiG9w0BAQUFADA6MQ0wCwYDVQQDDARzajI2
14
14
  MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2Nv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by/3n0WSXPBeZJfsnSdJ2qtG7iy/xqYDc1RjpKgX0RlMgeQRSE3ZDL/HZzBKDF
26
+ azaTgG9Zk1Quu59/79Z0Sltq07Z/IeccFl5j9M+1YS8VY2mOPi9g03OoOSRmhsMS
27
+ wpEF+zvJ0ESS5OPjtp6Sk4q1QYc0aVIthEznuVNMW6CPpTNhMAOFMaTC5AXCzJ3Q
28
+ 52G9HuhbVSTgE/I10H9qZBOE3qdP8ka/Fk0PUrux/DuUanNZgSKJokrQvRA4H9Au
29
+ WpPA7HJYV6msWQiukoBEhfQ2l6Fl2HUwntvX3MCcFNHeJJ5ETERp9alo88E=
30
30
  -----END CERTIFICATE-----
31
- date: 2014-06-04 00:00:00.000000000 Z
31
+ date: 2015-04-30 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
- name: rspec
34
+ name: rspec-core
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
@@ -40,6 +40,9 @@ dependencies:
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '4'
43
+ - - "!="
44
+ - !ruby/object:Gem::Version
45
+ version: 2.12.0
43
46
  type: :runtime
44
47
  prerelease: false
45
48
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,17 +53,6 @@ dependencies:
50
53
  - - "<"
51
54
  - !ruby/object:Gem::Version
52
55
  version: '4'
53
- - !ruby/object:Gem::Dependency
54
- name: rspec-core
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "!="
58
- - !ruby/object:Gem::Version
59
- version: 2.12.0
60
- type: :runtime
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
56
  - - "!="
65
57
  - !ruby/object:Gem::Version
66
58
  version: 2.12.0
@@ -123,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
115
  version: 1.3.6
124
116
  requirements: []
125
117
  rubyforge_project:
126
- rubygems_version: 2.2.2
118
+ rubygems_version: 2.4.5
127
119
  signing_key:
128
120
  specification_version: 4
129
121
  summary: RSpec JUnit XML formatter
metadata.gz.sig CHANGED
Binary file