buildkite-test_collector 1.1.2 → 1.1.3

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: '09168f300d0d7fe87764a70906ac21693f9de504b68ac9cc547e42481d370173'
4
- data.tar.gz: 3daa78abca6baab5cf000a01e1e49e699c02575ad7c10d4ac0d3aae9d0a760ef
3
+ metadata.gz: 84d13e5fb256a07aa96a3f19b17ee2f27c7c362d4cbbaa9e7f0efb6d4af8420d
4
+ data.tar.gz: e5fe4f34fb6fc3a0c7494e65e6b43a9ffe9dd094a8f589ad3efa85e2b7e7849f
5
5
  SHA512:
6
- metadata.gz: dbe1aa57f2b575a339bc2af259bdac5f73e98075b75de6dfb711f97262ea90c10284f06792e49e88462405bacc8e916fd5b6e0f138a073e4db9569cf147c5ca0
7
- data.tar.gz: 49e27c93a9e23c4d6d38384f2a1dbe1be93d88b7e86a19b462fe942041bbac8da4e3adb47b9482f6741ed7faf96850ef4990e4733ecc21ee3f077c15d6c6176b
6
+ metadata.gz: 0cfff8a4aef5369cd83075425b233c109f92bb55c790daea12d9bea9d6ce75e6860d3e12c922dae9b676cf7791f12d41f2d17d463a4d561f888ba3df0fca9bc9
7
+ data.tar.gz: 7b01fdf26eed8c739685a78b135db2ea0ef964810b435a2897b0f1c61bb5e75ff695d344df5d9c89d1d04d37188f6125e1062c590d748ef7bec80a1790a7f15f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.1.3
4
+ - Use a private reference to JSON.parse to prevent it being mocked #149 - @ghcan
5
+
3
6
  ## v1.1.2
4
7
 
5
8
  - Remove branch reference prefix in Github Actions #136 - @gchan
@@ -7,6 +7,10 @@ module Buildkite::TestCollector
7
7
  MAX_RECONNECTION_ATTEMPTS = ENV.fetch("BUILDKITE_ANALYTICS_RECONNECTION_ATTEMPTS") { 3 }.to_i
8
8
  WAIT_BETWEEN_RECONNECTIONS = ENV.fetch("BUILDKITE_ANALYTICS_RECONNECTION_WAIT") { 5 }.to_i
9
9
 
10
+ # We keep a private reference so that mocking libraries won't break JSON
11
+ JSON_PARSE = JSON.method(:parse)
12
+ private_constant :JSON_PARSE
13
+
10
14
  class RejectedSubscription < StandardError; end
11
15
  class InitialConnectionFailure < StandardError; end
12
16
 
@@ -120,7 +124,7 @@ module Buildkite::TestCollector
120
124
  end
121
125
 
122
126
  def handle(_connection, data)
123
- data = JSON.parse(data)
127
+ data = JSON_PARSE.call(data)
124
128
  case data["type"]
125
129
  when "ping"
126
130
  # In absence of other message, the server sends us a ping every 3 seconds
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Buildkite
4
4
  module TestCollector
5
- VERSION = "1.1.2"
5
+ VERSION = "1.1.3"
6
6
  NAME = "buildkite-test_collector"
7
7
  end
8
8
  end
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.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buildkite
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport