rspec-buildkite 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +16 -0
- data/lib/rspec/buildkite/annotation_formatter.rb +11 -3
- data/lib/rspec/buildkite/recolorizer.rb +0 -47
- data/lib/rspec/buildkite/version.rb +1 -1
- metadata +11 -11
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a43becdaaf39c19db34533f388d73738d983eda1e834c8dddacb22b42329cded
|
4
|
+
data.tar.gz: 0b5503027025f2c3e1fcb19ccc54c5a2bba839ee56baaa008f98f1490920bb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10eebedf3562ee3bf7715a6a6777fab65b02488729f6f3309aa7be7e8713845daa3c16f2c60278c9b5474fb424fb834dd9b90adf916f7aa691344103af9847a8
|
7
|
+
data.tar.gz: b2737efe40e99e9c1902ba848f36e4c697b4f06cd5a0cc391bde99019d3ab2e0397cd4907a576230f531854f6a2ec48353125d377d5127c4d7a184251fdad289
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -38,6 +38,22 @@ Add it to your `.rspec` alongside your favorite formatter:
|
|
38
38
|
|
39
39
|
Now run your specs on Buildkite!
|
40
40
|
|
41
|
+
### Docker & Docker Compose
|
42
|
+
|
43
|
+
If you run your RSpec builds inside Docker or Docker Compose then you'll need to make sure some environment variables are progpagated into the running containers. If you're using [the docker-compose-buildkite-plugin][dcbp] you can pass the environment using [plugin configuration][dcbp-env]. Or you can add them to the [environment section][dc-env] in your `docker-compose.yml`, or supply [env arguments][d-env] to your docker command.
|
44
|
+
|
45
|
+
The following environment variables are required:
|
46
|
+
|
47
|
+
- `BUILDKITE`
|
48
|
+
- `BUILDKITE_BUILD_URL`
|
49
|
+
- `BUILDKITE_JOB_ID`
|
50
|
+
- `BUILDKITE_AGENT_ACCESS_TOKEN`
|
51
|
+
|
52
|
+
[dcbp]: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin
|
53
|
+
[dcbp-env]: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin#environment
|
54
|
+
[dc-env]: https://docs.docker.com/compose/environment-variables/
|
55
|
+
[d-env]: https://docs.docker.com/engine/reference/run/#env-environment-variables
|
56
|
+
|
41
57
|
## Development
|
42
58
|
|
43
59
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -56,11 +56,19 @@ module RSpec::Buildkite
|
|
56
56
|
job_url = "#{build_url}##{job_id}"
|
57
57
|
|
58
58
|
%{<details>\n} <<
|
59
|
-
%{<summary>#{notification.description.encode(:xml => :text)}</summary>\n
|
60
|
-
%{<
|
61
|
-
|
59
|
+
%{<summary>#{notification.description.encode(:xml => :text)}</summary>\n} <<
|
60
|
+
%{<pre class="term">#{Recolorizer.recolorize(notification.colorized_message_lines.join("\n").encode(:xml => :text))}</pre>\n} <<
|
61
|
+
format_rerun(notification) <<
|
62
|
+
%{<p>in <a href=#{job_url.encode(:xml => :attr)}>Job ##{job_id.encode(:xml => :text)}</a></p>\n} <<
|
62
63
|
%{</details>} <<
|
63
64
|
%{\n\n\n}
|
64
65
|
end
|
66
|
+
|
67
|
+
def format_rerun(notification)
|
68
|
+
%{<pre class="term">} <<
|
69
|
+
%{<span class="term-fg31">rspec #{notification.example.location_rerun_argument.encode(:xml => :text)}</span>} <<
|
70
|
+
%{ <span class="term-fg36"># #{notification.example.full_description.encode(:xml => :text)}</span>} <<
|
71
|
+
%{</pre>\n}
|
72
|
+
end
|
65
73
|
end
|
66
74
|
end
|
@@ -49,52 +49,5 @@ module RSpec::Buildkite
|
|
49
49
|
end
|
50
50
|
end << ("</span>" * level)
|
51
51
|
end
|
52
|
-
# Re-color an ANSI-colorized string using terminal CSS classes:
|
53
|
-
# https://github.com/buildkite/terminal/blob/05a77905c468b9150cac41298fdb8a0735024d42/style.go#L34
|
54
|
-
def recolorize(string)
|
55
|
-
level = 0
|
56
|
-
string.gsub(/\e\[(\d+(?:;\d+)*)m/) do
|
57
|
-
"".tap do |buffer|
|
58
|
-
codes = $1.split(";").map(&:to_i)
|
59
|
-
|
60
|
-
classes = []
|
61
|
-
while code = codes.shift
|
62
|
-
case code
|
63
|
-
when 0
|
64
|
-
classes.clear
|
65
|
-
buffer << ("</span>" * level)
|
66
|
-
level = 0
|
67
|
-
when 1..5, 9, 30..37
|
68
|
-
classes << "term-fg#{code}"
|
69
|
-
when 38
|
70
|
-
if codes[0] == 5
|
71
|
-
codes.shift
|
72
|
-
if codes[0]
|
73
|
-
classes << "term-fgx#{codes.shift}"
|
74
|
-
end
|
75
|
-
end
|
76
|
-
when 40..47
|
77
|
-
classes << "term-bg#{code}"
|
78
|
-
when 48
|
79
|
-
if codes[0] == 5
|
80
|
-
codes.shift
|
81
|
-
if codes[0]
|
82
|
-
classes << "term-bgx#{codes.shift}"
|
83
|
-
end
|
84
|
-
end
|
85
|
-
when 90..97
|
86
|
-
classes << "term-fgi#{code}"
|
87
|
-
when 100..107
|
88
|
-
classes << "term-bgi#{code}"
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
if classes.any?
|
93
|
-
level += 1
|
94
|
-
buffer << %{<span class=#{classes.map { |klass| klass }.join(" ").encode(:xml => :attr)}>}
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end << ("</span>" * level)
|
98
|
-
end
|
99
52
|
end
|
100
53
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-buildkite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
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
|
-
|
13
|
+
MIIDKDCCAhCgAwIBAgIBBjANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
|
14
14
|
MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0x
|
15
|
-
|
15
|
+
ODA4MTYwNTE4NDBaFw0xOTA4MTYwNTE4NDBaMDoxDTALBgNVBAMMBHNqMjYxFDAS
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
m3ZsDWrNC80wDQYJKoZIhvcNAQELBQADggEBAEwUQFizoyvm/1/iX8i/+oK6hr5m
|
25
|
+
wd7ZEzIV32JRyaqkPFeWjBylRXZyoXsE2u1H9ofIw8b/5/M+uMIfR8jlJSuulGB7
|
26
|
+
rs3ixWpkwRW8Knz2A5zufM3uPypwDYbEUbTdhzqY9hCzCz4moHu2E5f5bz7zrp+g
|
27
|
+
kpFjMoo851LRGr5vEQMZ/U+Paq8ROLzAiOa72mNxIFzvnGcSDyBVixdewi7HoZWD
|
28
|
+
ccrr0sGoLnfK6DappOwH1I5uPvQohOATNmmU0MSSWOeiggLlEWmUYE7CvzoMc8R6
|
29
|
+
DlumKi5y9wE+XnxtyLbe6GlT3AkVGnhwPdwq2QBFLEWkTVogdCYomBCKfjY=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2018-
|
31
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec-core
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.7.
|
149
|
+
rubygems_version: 2.7.8
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: RSpec formatter creating Buildkite annotations for failures
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
.��>�D^`�_yay�u2u�ܯ��0��
|
2
|
+
��r�H{(��ц��)��-���k�m�� �U|<O������~�kҲp��?�E�k�KG�����̃���s(*���/*�z�%gWކR��hX�9g���q�G�X>����k+��&��=���"�>9�R9�J|����h�.k�>+�B�bX���U��^@�_Z�PJ���GF.�܆����i�E�EUVu��y�l���ʠ�����b'j�֤�H-� j
|