datadog-ci 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/lib/datadog/ci/configuration/components.rb +11 -7
  4. data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +1 -1
  5. data/lib/datadog/ci/contrib/cucumber/ext.rb +7 -5
  6. data/lib/datadog/ci/contrib/cucumber/formatter.rb +99 -19
  7. data/lib/datadog/ci/contrib/minitest/configuration/settings.rb +1 -1
  8. data/lib/datadog/ci/contrib/minitest/ext.rb +6 -4
  9. data/lib/datadog/ci/contrib/minitest/helpers.rb +22 -0
  10. data/lib/datadog/ci/contrib/minitest/hooks.rb +45 -17
  11. data/lib/datadog/ci/contrib/minitest/patcher.rb +7 -0
  12. data/lib/datadog/ci/contrib/minitest/plugin.rb +73 -0
  13. data/lib/datadog/ci/contrib/minitest/runnable.rb +42 -0
  14. data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +1 -1
  15. data/lib/datadog/ci/contrib/rspec/example.rb +2 -2
  16. data/lib/datadog/ci/contrib/rspec/example_group.rb +46 -0
  17. data/lib/datadog/ci/contrib/rspec/ext.rb +5 -4
  18. data/lib/datadog/ci/contrib/rspec/integration.rb +1 -1
  19. data/lib/datadog/ci/contrib/rspec/patcher.rb +5 -0
  20. data/lib/datadog/ci/contrib/rspec/runner.rb +57 -0
  21. data/lib/datadog/ci/contrib/settings.rb +1 -1
  22. data/lib/datadog/ci/ext/test.rb +2 -0
  23. data/lib/datadog/ci/span.rb +24 -0
  24. data/lib/datadog/ci/test.rb +30 -0
  25. data/lib/datadog/ci/test_session.rb +8 -0
  26. data/lib/datadog/ci/test_visibility/null_recorder.rb +73 -0
  27. data/lib/datadog/ci/test_visibility/recorder.rb +30 -9
  28. data/lib/datadog/ci/version.rb +2 -2
  29. data/sig/datadog/ci/contrib/cucumber/ext.rbs +1 -5
  30. data/sig/datadog/ci/contrib/cucumber/formatter.rbs +17 -4
  31. data/sig/datadog/ci/contrib/minitest/ext.rbs +1 -5
  32. data/sig/datadog/ci/contrib/minitest/helpers.rbs +13 -0
  33. data/sig/datadog/ci/contrib/minitest/hooks.rbs +9 -1
  34. data/sig/datadog/ci/contrib/minitest/plugin.rbs +31 -0
  35. data/sig/datadog/ci/contrib/minitest/runnable.rbs +24 -0
  36. data/sig/datadog/ci/contrib/rspec/example_group.rbs +21 -0
  37. data/sig/datadog/ci/contrib/rspec/ext.rbs +2 -8
  38. data/sig/datadog/ci/contrib/rspec/runner.rbs +21 -0
  39. data/sig/datadog/ci/ext/test.rbs +2 -0
  40. data/sig/datadog/ci/span.rbs +8 -0
  41. data/sig/datadog/ci/test.rbs +5 -0
  42. data/sig/datadog/ci/test_visibility/null_recorder.rbs +45 -0
  43. data/sig/datadog/ci/test_visibility/recorder.rbs +5 -5
  44. data/sig/datadog/ci.rbs +2 -0
  45. metadata +15 -3
@@ -3,7 +3,6 @@ module Datadog
3
3
  module TestVisibility
4
4
  class Recorder
5
5
  @test_suite_level_visibility_enabled: bool
6
- @enabled: bool
7
6
 
8
7
  @environment_tags: Hash[String, String]
9
8
  @local_context: Datadog::CI::TestVisibility::Context::Local
@@ -13,9 +12,8 @@ module Datadog
13
12
 
14
13
  attr_reader environment_tags: Hash[String, String]
15
14
  attr_reader test_suite_level_visibility_enabled: bool
16
- attr_reader enabled: bool
17
15
 
18
- def initialize: (?enabled: bool, ?test_suite_level_visibility_enabled: bool) -> void
16
+ def initialize: (?test_suite_level_visibility_enabled: bool) -> void
19
17
 
20
18
  def trace_test: (String span_name, String test_suite_name, ?service: String?, ?tags: Hash[untyped, untyped]) ?{ (Datadog::CI::Span span) -> untyped } -> untyped
21
19
 
@@ -45,12 +43,12 @@ module Datadog
45
43
 
46
44
  def deactivate_test_suite: (String test_suite_name) -> void
47
45
 
46
+ private
47
+
48
48
  def create_datadog_span: (String span_name, ?span_options: Hash[untyped, untyped], ?tags: Hash[untyped, untyped]) ?{ (Datadog::CI::Span span) -> untyped } -> untyped
49
49
 
50
50
  def set_trace_origin: (Datadog::Tracing::TraceOperation trace) -> untyped
51
51
 
52
- private
53
-
54
52
  def build_test: (Datadog::Tracing::SpanOperation tracer_span, Hash[untyped, untyped] tags) -> Datadog::CI::Test
55
53
 
56
54
  def build_test_session: (Datadog::Tracing::SpanOperation tracer_span, Hash[untyped, untyped] tags) -> Datadog::CI::TestSession
@@ -79,6 +77,8 @@ module Datadog
79
77
  def start_datadog_tracer_span: (String span_name, Hash[untyped, untyped] span_options) ?{ (untyped) -> untyped } -> untyped
80
78
 
81
79
  def set_inherited_globals: (Hash[untyped, untyped] tags) -> void
80
+
81
+ def validate_test_suite_level_visibility_correctness: (Datadog::CI::Test test) -> void
82
82
  end
83
83
  end
84
84
  end
data/sig/datadog/ci.rbs CHANGED
@@ -18,6 +18,8 @@ module Datadog
18
18
 
19
19
  def self.active_test: () -> Datadog::CI::Test?
20
20
 
21
+ def self.active_test_suite: (String test_suite_name) -> Datadog::CI::TestSuite?
22
+
21
23
  def self.active_span: (String span_type) -> Datadog::CI::Span?
22
24
 
23
25
  def self.deactivate_test: (Datadog::CI::Test test) -> void
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.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-11 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -55,14 +55,19 @@ files:
55
55
  - lib/datadog/ci/contrib/integration.rb
56
56
  - lib/datadog/ci/contrib/minitest/configuration/settings.rb
57
57
  - lib/datadog/ci/contrib/minitest/ext.rb
58
+ - lib/datadog/ci/contrib/minitest/helpers.rb
58
59
  - lib/datadog/ci/contrib/minitest/hooks.rb
59
60
  - lib/datadog/ci/contrib/minitest/integration.rb
60
61
  - lib/datadog/ci/contrib/minitest/patcher.rb
62
+ - lib/datadog/ci/contrib/minitest/plugin.rb
63
+ - lib/datadog/ci/contrib/minitest/runnable.rb
61
64
  - lib/datadog/ci/contrib/rspec/configuration/settings.rb
62
65
  - lib/datadog/ci/contrib/rspec/example.rb
66
+ - lib/datadog/ci/contrib/rspec/example_group.rb
63
67
  - lib/datadog/ci/contrib/rspec/ext.rb
64
68
  - lib/datadog/ci/contrib/rspec/integration.rb
65
69
  - lib/datadog/ci/contrib/rspec/patcher.rb
70
+ - lib/datadog/ci/contrib/rspec/runner.rb
66
71
  - lib/datadog/ci/contrib/settings.rb
67
72
  - lib/datadog/ci/ext/app_types.rb
68
73
  - lib/datadog/ci/ext/environment.rb
@@ -98,6 +103,7 @@ files:
98
103
  - lib/datadog/ci/test_visibility/context/global.rb
99
104
  - lib/datadog/ci/test_visibility/context/local.rb
100
105
  - lib/datadog/ci/test_visibility/flush.rb
106
+ - lib/datadog/ci/test_visibility/null_recorder.rb
101
107
  - lib/datadog/ci/test_visibility/recorder.rb
102
108
  - lib/datadog/ci/test_visibility/serializers/base.rb
103
109
  - lib/datadog/ci/test_visibility/serializers/factories/test_level.rb
@@ -133,14 +139,19 @@ files:
133
139
  - sig/datadog/ci/contrib/integration.rbs
134
140
  - sig/datadog/ci/contrib/minitest/configuration/settings.rbs
135
141
  - sig/datadog/ci/contrib/minitest/ext.rbs
142
+ - sig/datadog/ci/contrib/minitest/helpers.rbs
136
143
  - sig/datadog/ci/contrib/minitest/hooks.rbs
137
144
  - sig/datadog/ci/contrib/minitest/integration.rbs
138
145
  - sig/datadog/ci/contrib/minitest/patcher.rbs
146
+ - sig/datadog/ci/contrib/minitest/plugin.rbs
147
+ - sig/datadog/ci/contrib/minitest/runnable.rbs
139
148
  - sig/datadog/ci/contrib/rspec/configuration/settings.rbs
140
149
  - sig/datadog/ci/contrib/rspec/example.rbs
150
+ - sig/datadog/ci/contrib/rspec/example_group.rbs
141
151
  - sig/datadog/ci/contrib/rspec/ext.rbs
142
152
  - sig/datadog/ci/contrib/rspec/integration.rbs
143
153
  - sig/datadog/ci/contrib/rspec/patcher.rbs
154
+ - sig/datadog/ci/contrib/rspec/runner.rbs
144
155
  - sig/datadog/ci/contrib/settings.rbs
145
156
  - sig/datadog/ci/ext/app_types.rbs
146
157
  - sig/datadog/ci/ext/environment.rbs
@@ -176,6 +187,7 @@ files:
176
187
  - sig/datadog/ci/test_visibility/context/global.rbs
177
188
  - sig/datadog/ci/test_visibility/context/local.rbs
178
189
  - sig/datadog/ci/test_visibility/flush.rbs
190
+ - sig/datadog/ci/test_visibility/null_recorder.rbs
179
191
  - sig/datadog/ci/test_visibility/recorder.rbs
180
192
  - sig/datadog/ci/test_visibility/serializers/base.rbs
181
193
  - sig/datadog/ci/test_visibility/serializers/factories/test_level.rbs
@@ -223,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
235
  - !ruby/object:Gem::Version
224
236
  version: 2.0.0
225
237
  requirements: []
226
- rubygems_version: 3.4.21
238
+ rubygems_version: 3.4.22
227
239
  signing_key:
228
240
  specification_version: 4
229
241
  summary: Datadog CI visibility for your ruby application