buildkite-test_collector 2.4.0 → 2.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: d1d5188350d19431be80e4d9680a9a561d4ae25f64549d5be488607d1882a5c1
4
- data.tar.gz: aece9ddaddba6792fcf2fa91f8642e5be3712bf118f154f6e152f0cbad5aa9eb
3
+ metadata.gz: '096d9a186b77909ac11460179d43bb4e57fd76ebea603f0d35d105264ae65793'
4
+ data.tar.gz: cc16f83917301ec0e20640545a985a800064777e549f434dfb56f9152efd2482
5
5
  SHA512:
6
- metadata.gz: 6eb7578e7cad14c2088b6bb522eb3548cccd6de33dd09952fc4d4fd8638a707f9abaa8b68060fefd3eab212ab7a23d114cba0f4155e9394b13277b1b67719652
7
- data.tar.gz: 6d1f20581f34336eb39e22a753661d5cd9b9feaf05a7773ca6d3171ec50ef335a61ec6697f9baeab4526810e0ed400981fae1738a78637179fbadae452a1995d
6
+ metadata.gz: 58375f6b3c26113dc18d5af87b785a891b70045c657621450baaa959120ae36923732cb8992942148c0cfe2eaf199ae9e5e675e7199000f8e39aa6ed4717ab3e
7
+ data.tar.gz: b4bd0aa37da33506ae7bfe297497230a9d87e36aea074ad3e456d32aa2f13eaf76000dc4070fd6ab6ae6dfae00faeb39680c0945b1ffc1c1d9344d93cd82de1a
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.5.0
4
+
5
+ - Remove ActiveSupport as a primary dependancy #212 - @pat
6
+
3
7
  ## v2.4.0
4
8
 
5
- - Feature release: Output links to Test Analytic tests within the rspec log @meghan-kradolfer
9
+ - Feature release: Output links to Test Analytic tests within the rspec log #209 - @meghan-kradolfer
6
10
 
7
11
  ## v2.3.2
8
12
 
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buildkite-test_collector (2.4.0)
5
- activesupport (>= 4.2)
4
+ buildkite-test_collector (2.5.0)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
@@ -38,6 +37,7 @@ PLATFORMS
38
37
  ruby
39
38
 
40
39
  DEPENDENCIES
40
+ activesupport (>= 4.2)
41
41
  buildkite-test_collector!
42
42
  rake (~> 13.0)
43
43
  rspec (~> 3.0)
@@ -24,8 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
26
26
 
27
- spec.add_dependency "activesupport", ">= 4.2"
28
-
27
+ spec.add_development_dependency "activesupport", ">= 4.2"
29
28
  spec.add_development_dependency "rspec-core", '~> 3.10'
30
29
  spec.add_development_dependency "rspec-expectations", '~> 3.10'
31
30
  end
@@ -38,7 +38,7 @@ module Buildkite::TestCollector::MinitestPlugin
38
38
  failure_reason: failure_reason,
39
39
  failure_expanded: failure_expanded,
40
40
  history: history,
41
- ).with_indifferent_access.select { |_, value| !value.nil? }
41
+ ).select { |_, value| !value.nil? }
42
42
  end
43
43
 
44
44
  private
@@ -40,6 +40,10 @@ module Buildkite::TestCollector::RSpecPlugin
40
40
  RSpec::Core::MultipleExceptionError
41
41
  ]
42
42
 
43
+ def blank?(string)
44
+ string.nil? || string.strip.empty?
45
+ end
46
+
43
47
  def failure_info(notification)
44
48
  failure_expanded = []
45
49
 
@@ -73,9 +77,9 @@ module Buildkite::TestCollector::RSpecPlugin
73
77
  def format_message_lines(message_lines)
74
78
  message_lines.map! { |l| strip_diff_colors(l) }
75
79
  # the first line is sometimes blank, depending on the error reported
76
- message_lines.shift if message_lines.first.blank?
80
+ message_lines.shift if blank?(message_lines.first)
77
81
  # the last line is sometimes blank, depending on the error reported
78
- message_lines.pop if message_lines.last.blank?
82
+ message_lines.pop if blank?(message_lines.last)
79
83
  message_lines
80
84
  end
81
85
 
@@ -32,7 +32,7 @@ module Buildkite::TestCollector::RSpecPlugin
32
32
  failure_reason: failure_reason,
33
33
  failure_expanded: failure_expanded,
34
34
  history: history,
35
- ).with_indifferent_access.select { |_, value| !value.nil? }
35
+ ).select { |_, value| !value.nil? }
36
36
  end
37
37
 
38
38
  private
@@ -60,7 +60,7 @@ module Buildkite::TestCollector::RSpecPlugin
60
60
  end
61
61
 
62
62
  def shared_example?
63
- example.metadata[:shared_group_inclusion_backtrace].any?
63
+ !example.metadata[:shared_group_inclusion_backtrace].empty?
64
64
  end
65
65
 
66
66
  def shared_example_call_location
@@ -10,7 +10,7 @@ module Buildkite::TestCollector::TestLinksPlugin
10
10
 
11
11
  def dump_failures(notification)
12
12
  # Do not display summary if no failed examples
13
- return unless notification.failed_examples.present?
13
+ return if notification.failed_examples.empty?
14
14
 
15
15
  # Check if a Test Analytics token is set
16
16
  return unless Buildkite::TestCollector.api_token
@@ -43,7 +43,7 @@ module Buildkite::TestCollector
43
43
  duration: end_at - start_at,
44
44
  detail: detail,
45
45
  children: children.map(&:as_hash),
46
- }.with_indifferent_access
46
+ }
47
47
  end
48
48
  end
49
49
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Buildkite
4
4
  module TestCollector
5
- VERSION = "2.4.0"
5
+ VERSION = "2.5.0"
6
6
  NAME = "buildkite-test_collector"
7
7
  end
8
8
  end
@@ -8,14 +8,11 @@ end
8
8
  require "json"
9
9
  require "logger"
10
10
  require "net/http"
11
+ require "openssl"
11
12
  require "time"
12
13
  require "timeout"
13
14
  require "tmpdir"
14
15
 
15
- require "active_support/core_ext/object/blank"
16
- require "active_support/core_ext/hash/indifferent_access"
17
- require "active_support/notifications"
18
-
19
16
  require_relative "test_collector/version"
20
17
  require_relative "test_collector/error"
21
18
  require_relative "test_collector/ci"
@@ -72,6 +69,10 @@ module Buildkite
72
69
  Buildkite::TestCollector::Network.configure
73
70
  Buildkite::TestCollector::Object.configure
74
71
 
72
+ return unless defined?(ActiveSupport)
73
+
74
+ require "active_support/notifications"
75
+
75
76
  ActiveSupport::Notifications.subscribe("sql.active_record") do |name, start, finish, id, payload|
76
77
  Buildkite::TestCollector::Uploader.tracer&.backfill(:sql, finish - start, **{ query: payload[:sql] })
77
78
  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: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buildkite
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-14 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
- type: :runtime
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.10'
55
- description:
55
+ description:
56
56
  email:
57
57
  - support+analytics@buildkite.com
58
58
  executables: []
@@ -100,7 +100,7 @@ licenses:
100
100
  metadata:
101
101
  homepage_uri: https://github.com/buildkite/test-collector-ruby
102
102
  source_code_uri: https://github.com/buildkite/test-collector-ruby
103
- post_install_message:
103
+ post_install_message:
104
104
  rdoc_options: []
105
105
  require_paths:
106
106
  - lib
@@ -115,8 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.3.22
119
- signing_key:
118
+ rubygems_version: 3.1.6
119
+ signing_key:
120
120
  specification_version: 4
121
121
  summary: Track test executions and report to Buildkite Test Analytics
122
122
  test_files: []