kennel 2.8.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a67807cb9e789ba415f9565e05fab28af7ce219c48d71bf8046d399e53d36c83
4
- data.tar.gz: e6af7566700e27dde1c0a91e925b7b6a3c0c9eed871bb973f7f58f1196485c7e
3
+ metadata.gz: d9635f7b742f83290e0feaa0f3eb1a55ba4ad78ca7d95c38aaba6e0adfebc1f4
4
+ data.tar.gz: 984fd58f8cabb3303e5f9084eb90405d6cf39c23b9c42b304d1aa6a07afca24b
5
5
  SHA512:
6
- metadata.gz: 1f555aeb930ba4fd91b5a33adbe1a2740b354f69397e9aca608a5a01ea4d7103b82bf1fd1e5569a3f1f240badc6b3ac837392fdcad67c9135b691d750c940160
7
- data.tar.gz: 7a87ee3300fe0c194018332727d3ab66a4dd41883198537e2b3f38302ccb7a1528d4db02db1c4d9d8fc0bdd1a9e4d557a211ee964461a4a76c82e1ecf0cdad98
6
+ metadata.gz: ef77dd9a72a9577b0bf8eb78b300c41e098543422d7313a800693fbdc3e5a9ba5db82687cd0551eb362bb9cd8990e9cb943987ea442a3b99cdd52d02b30de3eb
7
+ data.tar.gz: 4d4e036cc03aec4619c6e407255189f263d9cd167406cd1bf7f0c131047417a65a777c8c449701622fed38e908d8c3f6aab7f9cd6f7514668371fc33bf0eabb4
@@ -11,7 +11,7 @@ module Kennel
11
11
  def self.file_location
12
12
  return @file_location if defined?(@file_location)
13
13
  if (location = instance_methods(false).first)
14
- @file_location = instance_method(location).source_location.first.sub("#{Bundler.root}/", "")
14
+ @file_location = force_relative_path(instance_method(location).source_location.first)
15
15
  else
16
16
  @file_location = nil
17
17
  end
@@ -29,6 +29,13 @@ module Kennel
29
29
 
30
30
  private
31
31
 
32
+ private_class_method def self.force_relative_path(path)
33
+ return path unless File.absolute_path?(path)
34
+ path.dup.sub!("#{Bundler.root}/", "") ||
35
+ path.dup.sub!("#{Dir.pwd}/", "") ||
36
+ raise("Unable to make path #{path} relative with bundler root #{Bundler.root} or pwd #{Dir.pwd}")
37
+ end
38
+
32
39
  # hook for users to add custom filtering via `prepend`
33
40
  def filter_parts(parts)
34
41
  parts
@@ -50,6 +50,7 @@ module Kennel
50
50
  data[:target_threshold] = threshold[:target]
51
51
  end
52
52
 
53
+ # TODO: if user set sli_specification but we don't use it we should raise, but sadly we can't detect that easily
53
54
  if type == "time_slice"
54
55
  data[:sli_specification] = sli_specification
55
56
  elsif (v = query)
@@ -101,6 +102,11 @@ module Kennel
101
102
  [:timeframe, :warning_threshold, :target_threshold].each { |k| actual.delete k }
102
103
  end
103
104
 
105
+ # datadog always sets this, but we only set it for time_slice, so discard it for everything else to avoid diff
106
+ if expected[:type] != "time_slice"
107
+ actual.delete :sli_specification
108
+ end
109
+
104
110
  ignore_default(expected, actual, DEFAULTS)
105
111
  end
106
112
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "2.8.1"
3
+ VERSION = "2.9.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-18 00:00:00.000000000 Z
11
+ date: 2025-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs