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 +4 -4
- data/lib/kennel/models/project.rb +8 -1
- data/lib/kennel/models/slo.rb +6 -0
- data/lib/kennel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9635f7b742f83290e0feaa0f3eb1a55ba4ad78ca7d95c38aaba6e0adfebc1f4
|
|
4
|
+
data.tar.gz: 984fd58f8cabb3303e5f9084eb90405d6cf39c23b9c42b304d1aa6a07afca24b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
data/lib/kennel/models/slo.rb
CHANGED
|
@@ -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
|
|
data/lib/kennel/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2025-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diff-lcs
|