rspec_junit_formatter 0.4.1 → 0.5.0

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: a35b79c4d14c6ff0380efafa05837e554c5e6c0e20d59179c9b75357e0aded03
4
- data.tar.gz: cb519dfcac329b330f98d7306364990f4f1c11dc2cb63ced83cb979a42b4f30a
3
+ metadata.gz: ea46534b4275bee49fd9211ab8d702273475b2cf8ae6ec6fadf70242036b47a6
4
+ data.tar.gz: 1095a37248d6a758198fc605ff5306efa200051d8b1526ded3b70642169a9bc6
5
5
  SHA512:
6
- metadata.gz: 905cf4462c5bfaecae9d767e637cb517668b942c07e984713cf3538126406f9cf791c5f666931c51209399cc1c65b47e16aa59a9e645d47870df4eaa9f35f347
7
- data.tar.gz: d27fa3c3802d698da97bf45f38dd14061700cb92a0e99542d79f93fea918613354094735487a6408deceae1adb5cce1286662a8f62e1fa8c1149b6f49d78113c
6
+ metadata.gz: 87a3d85fa44c45b8721b65115636a1d3eaf53dde58077aeb1d37417136350440edf0a1e20b3260604a7135482b710f45a25ed8853755f1bf3c9ca255ab47ef52
7
+ data.tar.gz: '09b6904589c20fdff3470e7a243b2d018d283fff53cacc60f7c9f6a646506e2c3148e6aa08e825acf56dd4c453a0bca14d9177f6648cb5a17087dfa1fa272ada'
checksums.yaml.gz.sig CHANGED
Binary file
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2018 Samuel Cochran
1
+ Copyright (c) 2011-2022 Samuel Cochran
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # RSpec JUnit Formatter
2
2
 
3
- [![Build results](http://img.shields.io/travis/sj26/rspec_junit_formatter/master.svg)](https://travis-ci.org/sj26/rspec_junit_formatter)
3
+ [![Build results](https://github.com/sj26/rspec_junit_formatter/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sj26/rspec_junit_formatter/actions/workflows/ci.yml?branch=main)
4
4
  [![Gem version](http://img.shields.io/gem/v/rspec_junit_formatter.svg)](https://rubygems.org/gems/rspec_junit_formatter)
5
5
 
6
- [RSpec][rspec] 2 & 3 results that your CI can read. [Jenkins][jenkins-junit], [Buildkite][buildkite-junit], [CircleCI][circleci-junit], and probably more, too.
6
+ [RSpec][rspec] 2 & 3 results that your CI can read. [Jenkins][jenkins-junit], [Buildkite][buildkite-junit], [CircleCI][circleci-junit], [Gitlab][gitlab-junit], and probably more, too.
7
7
 
8
8
  [rspec]: http://rspec.info/
9
9
  [jenkins-junit]: https://jenkins.io/doc/pipeline/steps/junit/
10
10
  [buildkite-junit]: https://github.com/buildkite/rspec-junit-example
11
11
  [circleci-junit]: https://circleci.com/docs/2.0/collect-test-data/
12
+ [gitlab-junit]: https://docs.gitlab.com/ee/ci/junit_test_reports.html#ruby-example
12
13
 
13
14
  ## Usage
14
15
 
@@ -89,16 +90,14 @@ RSpec.configure do |config|
89
90
  end
90
91
  ```
91
92
 
93
+ Note that this example captures all output from every example all the time, potentially interfering with local debugging. You might like to restrict this to only on CI, or by using [rspec filters](https://relishapp.com/rspec/rspec-core/docs/hooks/filters).
94
+
92
95
  ## Caveats
93
96
 
94
97
  * XML can only represent a [limited subset of characters][xml-charsets] which excludes null bytes and most control characters. This gem will use character entities where possible and fall back to replacing invalid characters with Ruby-like escape codes otherwise. For example, the null byte becomes `\0`.
95
98
 
96
99
  [xml-charsets]: https://www.w3.org/TR/xml/#charsets
97
100
 
98
- ## Roadmap
99
-
100
- * It would be nice to split things up into individual test suites, although would this correspond to example groups? The subject? The spec file? Not sure yet.
101
-
102
101
  ## Development
103
102
 
104
103
  Run the specs with `bundle exec rake`, which uses [Appraisal][appraisal] to run the specs against all supported versions of rspec.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class RSpecJUnitFormatter < RSpec::Core::Formatters::BaseFormatter
2
4
  attr_reader :started
3
5
 
@@ -62,6 +64,10 @@ private
62
64
  "#{message}\n#{backtrace.join("\n")}"
63
65
  end
64
66
 
67
+ def error_count
68
+ 0
69
+ end
70
+
65
71
  def find_shared_group(example)
66
72
  group_and_parent_groups(example).find { |group| group.metadata[:shared_group_name] }
67
73
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class RSpecJUnitFormatter < RSpec::Core::Formatters::BaseFormatter
2
4
  RSpec::Core::Formatters.register self,
3
5
  :start,
@@ -43,6 +45,15 @@ private
43
45
  @examples_notification.notifications
44
46
  end
45
47
 
48
+ def error_count
49
+ # Introduced in rspec 3.6
50
+ if @summary_notification.respond_to?(:errors_outside_of_examples_count)
51
+ @summary_notification.errors_outside_of_examples_count
52
+ else
53
+ 0
54
+ end
55
+ end
56
+
46
57
  def result_of(notification)
47
58
  notification.example.execution_result.status
48
59
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "socket"
2
4
  require "time"
3
5
 
@@ -18,7 +20,7 @@ private
18
20
  output << %{ tests="#{example_count}"}
19
21
  output << %{ skipped="#{pending_count}"}
20
22
  output << %{ failures="#{failure_count}"}
21
- output << %{ errors="0"}
23
+ output << %{ errors="#{error_count}"}
22
24
  output << %{ time="#{escape("%.6f" % duration)}"}
23
25
  output << %{ timestamp="#{escape(started.iso8601)}"}
24
26
  output << %{ hostname="#{escape(Socket.gethostname)}"}
@@ -91,7 +93,7 @@ private
91
93
 
92
94
  # Inversion of character range from https://www.w3.org/TR/xml/#charsets
93
95
  ILLEGAL_REGEXP = Regexp.new(
94
- "[^" <<
96
+ +"[^" <<
95
97
  "\u{9}" << # => \t
96
98
  "\u{a}" << # => \n
97
99
  "\u{d}" << # => \r
@@ -123,7 +125,7 @@ private
123
125
  # Discouraged characters from https://www.w3.org/TR/xml/#charsets
124
126
  # Plus special characters with well-known entity replacements
125
127
  DISCOURAGED_REGEXP = Regexp.new(
126
- "[" <<
128
+ +"[" <<
127
129
  "\u{22}" << # => "
128
130
  "\u{26}" << # => &
129
131
  "\u{27}" << # => '
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_junit_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDKDCCAhCgAwIBAgIBBTANBgkqhkiG9w0BAQUFADA6MQ0wCwYDVQQDDARzajI2
14
- MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0x
15
- NzA3MzEwNTQ3MDVaFw0xODA3MzEwNTQ3MDVaMDoxDTALBgNVBAMMBHNqMjYxFDAS
13
+ MIIDKDCCAhCgAwIBAgIBCDANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
14
+ MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0y
15
+ MTA0MjcwMzIxMjZaFw0yMjA0MjcwMzIxMjZaMDoxDTALBgNVBAMMBHNqMjYxFDAS
16
16
  BgoJkiaJk/IsZAEZFgRzajI2MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkq
17
17
  hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr60Eo/ttCk8GMTMFiPr3GoYMIMFvLak
18
18
  xSmTk9YGCB6UiEePB4THSSA5w6IPyeaCF/nWkDp3/BAam0eZMWG1IzYQB23TqIM0
@@ -21,14 +21,14 @@ cert_chain:
21
21
  4O/FL2ChjL2CPCpLZW55ShYyrzphWJwLOJe+FJ/ZBl6YXwrzQM9HKnt4titSNvyU
22
22
  KzE3L63A3PZvExzLrN9u09kuWLLJfXB2sGOlw3n9t72rJiuBr3/OQQIDAQABozkw
23
23
  NzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU99dfRjEKFyczTeIz
24
- m3ZsDWrNC80wDQYJKoZIhvcNAQEFBQADggEBADGiXpvK754s0zTFx3y31ZRDdvAI
25
- lA209JIjUlDyr9ptCRadihyfF2l9/hb+hLemiPEYppzG6vEK1TIyzbAR36yOJ8CX
26
- 4vPkCXLuwHhs6UIRbwN+IEy41nsIlBxmjLYei8h3t/G2Vm2oOaLdbjDXS+Srl9U8
27
- shsE8ft81PxSQfzEL7Mr9cC9XvWbHW+SyTpfGm8rAtaqZkNeke4U8a0di4oz2EfA
28
- P4lSfmXxsd1C71ckIp0cyXkPhyTtpyS/5hq9HhuUNzEHkSDe36/Rd1xYKV5JxMC2
29
- YAttWFUs06lor2q1wwncPaMtUtbWwW35+1IV6xhs2rFY6DD/I6ZkK3GnHdY=
24
+ m3ZsDWrNC80wDQYJKoZIhvcNAQELBQADggEBAInkmTwBeGEJ7Xu9jjZIuFaE197m
25
+ YfvrzVoE6Q1DlWXpgyhhxbPIKg2acvM/Z18A7kQrF7paYl64Ti84dC64seOFIBNx
26
+ Qj/lxzPHMBoAYqeXYJhnYIXnvGCZ4Fkic5Bhs+VdcDP/uwYp3adqy+4bT/XDFZQg
27
+ tSjrAOTg3wck5aI+Tz90ONQJ83bnCRr1UPQ0T3PbWMjnNsEa9CAxUB845Sg+9yUz
28
+ Tvf+pbX8JT9rawFDogxPhL7eRAbjg4MH9amp5l8HTVCAsW8vqv7wM4rtMNAaXmik
29
+ LJghfDEf70fTtbs4Zv57pPhn1b7wBNf8fh+TZOlYAA6dFtQXoCwfE6bWgQU=
30
30
  -----END CERTIFICATE-----
31
- date: 2018-05-30 00:00:00.000000000 Z
31
+ date: 2022-01-04 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec-core
@@ -143,12 +143,12 @@ files:
143
143
  - lib/rspec_junit_formatter.rb
144
144
  - lib/rspec_junit_formatter/rspec2.rb
145
145
  - lib/rspec_junit_formatter/rspec3.rb
146
- homepage: http://github.com/sj26/rspec_junit_formatter
146
+ homepage: https://github.com/sj26/rspec_junit_formatter
147
147
  licenses:
148
148
  - MIT
149
149
  metadata:
150
- changelog_uri: https://github.com/sj26/rspec_junit_formatter/blob/master/CHANGELOG.md
151
- post_install_message:
150
+ changelog_uri: https://github.com/sj26/rspec_junit_formatter/blob/HEAD/CHANGELOG.md
151
+ post_install_message:
152
152
  rdoc_options: []
153
153
  require_paths:
154
154
  - lib
@@ -163,9 +163,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  - !ruby/object:Gem::Version
164
164
  version: 2.0.0
165
165
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.7.7
168
- signing_key:
166
+ rubygems_version: 3.2.26
167
+ signing_key:
169
168
  specification_version: 4
170
169
  summary: RSpec JUnit XML formatter
171
170
  test_files: []
metadata.gz.sig CHANGED
Binary file