buildkite-test_collector 1.3.1 → 1.4.2

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: aed40bbc13d64e1c76b5420ad3f528efe9a47d780d2cac90c7d0689321ff68fe
4
- data.tar.gz: f158f323d0a8df32e3bb2fd1cfe04731d4b0d300747430708f8db792b0eff157
3
+ metadata.gz: c89588cb63374f9a2bd84b29cd575133aa84c2a684e10e0e7d78dd63a54ad34e
4
+ data.tar.gz: a05196237e4d03ae61f9953c94de3d54253a40c89a6f0557c3fa8e42b800e163
5
5
  SHA512:
6
- metadata.gz: 51a75be7bdd3f5a2af1569aae4986ab1691663e4639857b79fe466ee3e896c52e1d21792156608650c7937cb484d03630cfe5bd7f582a337586ce02fc91c52c0
7
- data.tar.gz: 29823155c88495478391036edd43c7e536d7388cf7578ec8c32d98a65d100cf8bf646b3cf1d50158c15a9680120ed250d57e4406618f2296036aefe00b804bf2
6
+ metadata.gz: ab0e5a4fc6a21adc7f8f240331f5a80b27fb7442ca1ae5f81b5d0721e4143007ee0b4c4d1b1122c83c0e1aeaa5bea48167a6b2c3c92b3ad4d1100f7e768e607e
7
+ data.tar.gz: d7e0ea4e7ad204b9e5e6d11136008580a435bfe43e7ea9784926e6af60c0347dd556dd4d4410e542e29eb3c7a75be0fae3f6164a2bfbd7c451d37f121f62b932
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.4.2
4
+
5
+ - Update collector argument in the Analytics::API payload #170 - @KatieWright26
6
+
7
+ ## v1.4.1
8
+ - Add in support to create file with trace data #167
9
+
3
10
  ## v1.3.1
4
11
 
5
12
  - Cope with the gem being loaded but not configured when using minitest #165 - @billhorsman
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buildkite-test_collector (1.3.1)
4
+ buildkite-test_collector (1.4.2)
5
5
  activesupport (>= 4.2)
6
6
  websocket (~> 1.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.4)
11
+ activesupport (7.0.4.1)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 1.6, < 2)
14
14
  minitest (>= 5.1)
@@ -17,7 +17,7 @@ GEM
17
17
  diff-lcs (1.4.4)
18
18
  i18n (1.12.0)
19
19
  concurrent-ruby (~> 1.0)
20
- minitest (5.16.3)
20
+ minitest (5.17.0)
21
21
  rake (13.0.6)
22
22
  rspec (3.10.0)
23
23
  rspec-core (~> 3.10.0)
data/README.md CHANGED
@@ -119,6 +119,20 @@ See [DESIGN.md](DESIGN.md) for an overview of the design of this gem.
119
119
 
120
120
  Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite/test-collector-ruby
121
121
 
122
+ ## 🚀 Releasing
123
+
124
+ 1. Bump the version in `version.rb` and run `bundle` to update the `Gemfile.lock`.
125
+ 1. Update the CHANGELOG.md with your new version and a description of your changes.
126
+ 1. Git tag your changes and push
127
+ ```
128
+ git tag v.x.x.x
129
+ git push --tags
130
+ ```
131
+ Once your PR is merged to `main`:
132
+
133
+ 1. Run `rake release` from `main`.
134
+ 1. Create a [new release in github](https://github.com/buildkite/test-collector-ruby/releases).
135
+
122
136
  ## 📜 MIT License
123
137
 
124
138
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -38,7 +38,7 @@ class Buildkite::TestCollector::CI
38
38
  "execution_name_prefix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX"],
39
39
  "execution_name_suffix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_SUFFIX"],
40
40
  "version" => Buildkite::TestCollector::VERSION,
41
- "collector" => Buildkite::TestCollector::NAME,
41
+ "collector" => "ruby-#{Buildkite::TestCollector::NAME}",
42
42
  }.compact
43
43
  end
44
44
 
@@ -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!
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Buildkite
4
4
  module TestCollector
5
- VERSION = "1.3.1"
5
+ VERSION = "1.4.2"
6
6
  NAME = "buildkite-test_collector"
7
7
  end
8
8
  end
@@ -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.3.1
4
+ version: 1.4.2
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-14 00:00:00.000000000 Z
11
+ date: 2023-01-19 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
@@ -129,8 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.1.6
133
- signing_key:
132
+ rubygems_version: 3.3.26
133
+ signing_key:
134
134
  specification_version: 4
135
135
  summary: Track test executions and report to Buildkite Test Analytics
136
136
  test_files: []