buildkite-test_collector 1.3.1 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/buildkite/test_collector/library_hooks/rspec.rb +12 -0
- data/lib/buildkite/test_collector/version.rb +1 -1
- data/lib/buildkite/test_collector.rb +3 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac106c7e21ac22bb2c504e3485b53a1986ac34399847d24e1da23e3b373f519
|
4
|
+
data.tar.gz: 738bca3b38b36b16ebd639cd9d11569835405c3347b8e471ccdbff91efc5b0e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1720f820c576654caeaab8a3513a4b8c34c1fc0ce825866e4ae4470daf20c2ffdd511037c4c57da503d2abad64a143153f8b1f2c6025b93137472c32a33f4afb
|
7
|
+
data.tar.gz: 92c8659c83f2c7dc4ad4b3bb3bcda4265f126a1f6104a399a57ea161805a364c5543abcedf5f7c6081fddad46b2f5c73c9dab50a932f8a12090779f29613ed98
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -29,6 +29,18 @@ RSpec.configure do |config|
|
|
29
29
|
trace = Buildkite::TestCollector::RSpecPlugin::Trace.new(example, history: tracer.history)
|
30
30
|
Buildkite::TestCollector.uploader.traces[example.id] = trace
|
31
31
|
end
|
32
|
+
|
33
|
+
config.after(:suite) do
|
34
|
+
if Buildkite::TestCollector.artifact_path
|
35
|
+
filename = File.join(Buildkite::TestCollector.artifact_path, "buildkite-test-collector-rspec-#{SecureRandom.uuid}.json.gz")
|
36
|
+
data_set = { results: Buildkite::TestCollector.uploader.traces.values.map(&:as_hash) }
|
37
|
+
File.open(filename, "wb") do |f|
|
38
|
+
gz = Zlib::GzipWriter.new(f)
|
39
|
+
gz.write(data_set.to_json)
|
40
|
+
gz.close
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
32
44
|
end
|
33
45
|
|
34
46
|
Buildkite::TestCollector.enable_tracing!
|
@@ -43,14 +43,16 @@ module Buildkite
|
|
43
43
|
attr_accessor :session
|
44
44
|
attr_accessor :debug_enabled
|
45
45
|
attr_accessor :tracing_enabled
|
46
|
+
attr_accessor :artifact_path
|
46
47
|
attr_accessor :env
|
47
48
|
end
|
48
49
|
|
49
|
-
def self.configure(hook:, token: nil, url: nil, debug_enabled: false, tracing_enabled: true, env: {})
|
50
|
+
def self.configure(hook:, token: nil, url: nil, debug_enabled: false, tracing_enabled: true, artifact_path: nil, env: {})
|
50
51
|
self.api_token = (token || ENV["BUILDKITE_ANALYTICS_TOKEN"])&.strip
|
51
52
|
self.url = url || DEFAULT_URL
|
52
53
|
self.debug_enabled = debug_enabled || !!(ENV["BUILDKITE_ANALYTICS_DEBUG_ENABLED"])
|
53
54
|
self.tracing_enabled = tracing_enabled
|
55
|
+
self.artifact_path = artifact_path
|
54
56
|
self.env = env
|
55
57
|
|
56
58
|
self.hook_into(hook)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildkite-test_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Buildkite
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.10'
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email:
|
71
71
|
- support+analytics@buildkite.com
|
72
72
|
executables: []
|
@@ -114,7 +114,7 @@ licenses:
|
|
114
114
|
metadata:
|
115
115
|
homepage_uri: https://github.com/buildkite/test-collector-ruby
|
116
116
|
source_code_uri: https://github.com/buildkite/test-collector-ruby
|
117
|
-
post_install_message:
|
117
|
+
post_install_message:
|
118
118
|
rdoc_options: []
|
119
119
|
require_paths:
|
120
120
|
- lib
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubygems_version: 3.1.6
|
133
|
-
signing_key:
|
133
|
+
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Track test executions and report to Buildkite Test Analytics
|
136
136
|
test_files: []
|