datadog-ci 0.8.0 → 0.8.1

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: ae9b964bc83f82487cc72d99641bcd08a575c104ec311327d49715d88852d02d
4
- data.tar.gz: 7f787507a51166a49e95c9b55049fc68f3b1d0952fa49d7974f857b37b10e56f
3
+ metadata.gz: 6437d01abc30b7fd5bb6ec729d6b5a22877a85b1f82cd71c075353251b98bcd4
4
+ data.tar.gz: 2b872c9737bd530287f719bf7b7a475638e61e662677b772aa3fe22e8dfb1504
5
5
  SHA512:
6
- metadata.gz: 5947c6dd42ab0d629d1e7eecd2f116ea2c28e89b657e47e80eb0b127caf21e25b68e182ba5f3039671491f9335b0dda917091cbd43f18f64c9136e3e38ef1239
7
- data.tar.gz: 7790297ed83c4bfedc4cfb9c2b9116a540c8f7c3cdc78ccd9b5ece5ecb506be427765851834f8abca4594ff5908ca99c4e7f4cd8ab601fe5c0228cf2c62f8971
6
+ metadata.gz: '084bdc7fa2dfa45581f8a11f3882ff56e71e241744ecbde54f6ca32b2d1086d78f00019af75d86f33b9ce8c3faaccc9bb4d9f54a08fd1f467080c0dc287fa9ea'
7
+ data.tar.gz: '028f261a9674fc42378e5b47bf142d375e060b0ee8e9518ed59f89f022a60779ccbe10eee65633cf358b90a6c4311a455284ec98669b6eb44d073b18101beced'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.8.1] - 2024-03-12
4
+
5
+ ### Fixed
6
+
7
+ * fix minitest instrumentation with mixins ([#134][])
8
+
3
9
  ## [0.8.0] - 2024-03-08
4
10
 
5
11
  ### Added
@@ -164,7 +170,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
164
170
 
165
171
  * Ruby versions < 2.7 no longer supported ([#8][])
166
172
 
167
- [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.0...main
173
+ [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.1...main
174
+ [0.8.1]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.0...v0.8.1
168
175
  [0.8.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.7.0...v0.8.0
169
176
  [0.7.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.6.0...v0.7.0
170
177
  [0.6.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.5.1...v0.6.0
@@ -231,3 +238,4 @@ Currently test suite level visibility is not used by our instrumentation: it wil
231
238
  [#122]: https://github.com/DataDog/datadog-ci-rb/issues/122
232
239
  [#123]: https://github.com/DataDog/datadog-ci-rb/issues/123
233
240
  [#131]: https://github.com/DataDog/datadog-ci-rb/issues/131
241
+ [#134]: https://github.com/DataDog/datadog-ci-rb/issues/134
@@ -6,7 +6,12 @@ module Datadog
6
6
  module Minitest
7
7
  module Helpers
8
8
  def self.test_suite_name(klass, method_name)
9
- source_location, = klass.instance_method(method_name).source_location
9
+ source_location = extract_source_location_from_class(klass)
10
+ # if we are in anonymous class, fallback to the method source location
11
+ if source_location.nil?
12
+ source_location, = klass.instance_method(method_name).source_location
13
+ end
14
+
10
15
  source_file_path = Pathname.new(source_location.to_s).relative_path_from(Pathname.pwd).to_s
11
16
 
12
17
  "#{klass.name} at #{source_file_path}"
@@ -16,6 +21,15 @@ module Datadog
16
21
  klass.ancestors.include?(::Minitest::Parallel::Test) ||
17
22
  (defined?(::Minitest::Queue) && ::Minitest.singleton_class.ancestors.include?(::Minitest::Queue))
18
23
  end
24
+
25
+ def self.extract_source_location_from_class(klass)
26
+ return nil if klass.nil? || klass.name.nil?
27
+
28
+ source_location = klass.const_source_location(klass.name)
29
+ source_location.first unless source_location.nil?
30
+ rescue
31
+ nil
32
+ end
19
33
  end
20
34
  end
21
35
  end
@@ -5,7 +5,7 @@ module Datadog
5
5
  module VERSION
6
6
  MAJOR = "0"
7
7
  MINOR = "8"
8
- PATCH = "0"
8
+ PATCH = "1"
9
9
  PRE = nil
10
10
  BUILD = nil
11
11
  # PRE and BUILD above are modified for dev gems during gem build GHA workflow
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-08 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack