kennel 1.111.0 → 1.112.1
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/record.rb +7 -2
- data/lib/kennel/models/synthetic_test.rb +4 -4
- data/lib/kennel/utils.rb +1 -1
- data/lib/kennel/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4afd2070d0b8c2097b1e67b0ad6b1f72928058370066d463da37f4b3340d903a
|
4
|
+
data.tar.gz: b11721c83b65f8af2749faef9a967691fafe235e85214fa15163b4341b00d928
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d75553fdb2b17fc63e4cac6f7b56290d25756848109b4bc015125e1369cfbb624c270d46f108f502c2dca6c55de64bc2d63c606d8b259f3f97fe7bba7b7700f
|
7
|
+
data.tar.gz: f63b3f9d0a4d273f189ae55d50e4e477bf7a7ca4a88474a97771592ede2080b6a4ab3aa815a76def48951d43b092db5eb880dd64acce0de69bcb51aa1c1d0e32
|
data/lib/kennel/models/record.rb
CHANGED
@@ -8,6 +8,9 @@ module Kennel
|
|
8
8
|
:deleted, :id, :created, :created_at, :creator, :org_id, :modified, :modified_at,
|
9
9
|
:klass, :tracking_id # added by syncer.rb
|
10
10
|
].freeze
|
11
|
+
ALLOWED_KENNEL_ID_CHARS = "a-zA-Z_\\d.-"
|
12
|
+
ALLOWED_KENNEL_ID_FULL = "[#{ALLOWED_KENNEL_ID_CHARS}]+:[#{ALLOWED_KENNEL_ID_CHARS}]+"
|
13
|
+
ALLOWED_KENNEL_ID_REGEX = /\A#{ALLOWED_KENNEL_ID_FULL}\z/.freeze
|
11
14
|
|
12
15
|
settings :id, :kennel_id
|
13
16
|
|
@@ -25,7 +28,7 @@ module Kennel
|
|
25
28
|
end
|
26
29
|
|
27
30
|
def parse_tracking_id(a)
|
28
|
-
a[self::TRACKING_FIELD].to_s[/-- Managed by kennel (
|
31
|
+
a[self::TRACKING_FIELD].to_s[/-- Managed by kennel (#{ALLOWED_KENNEL_ID_FULL})/, 1]
|
29
32
|
end
|
30
33
|
|
31
34
|
# TODO: combine with parse into a single method or a single regex
|
@@ -76,7 +79,9 @@ module Kennel
|
|
76
79
|
def tracking_id
|
77
80
|
@tracking_id ||= begin
|
78
81
|
id = "#{project.kennel_id}:#{kennel_id}"
|
79
|
-
|
82
|
+
unless id.match?(ALLOWED_KENNEL_ID_REGEX) # <-> parse_tracking_id
|
83
|
+
raise ValidationError, "#{id} must match #{ALLOWED_KENNEL_ID_REGEX}"
|
84
|
+
end
|
80
85
|
id
|
81
86
|
end
|
82
87
|
end
|
@@ -53,11 +53,11 @@ module Kennel
|
|
53
53
|
super
|
54
54
|
|
55
55
|
# tags come in a semi-random order and order is never updated
|
56
|
-
expected[:tags]&.sort
|
57
|
-
actual[:tags]&.sort
|
56
|
+
expected[:tags] = expected[:tags]&.sort
|
57
|
+
actual[:tags] = actual[:tags]&.sort
|
58
58
|
|
59
|
-
expected[:locations]&.sort
|
60
|
-
actual[:locations]&.sort
|
59
|
+
expected[:locations] = expected[:locations]&.sort
|
60
|
+
actual[:locations] = actual[:locations]&.sort
|
61
61
|
|
62
62
|
ignore_default(expected, actual, DEFAULTS)
|
63
63
|
end
|
data/lib/kennel/utils.rb
CHANGED
@@ -149,7 +149,7 @@ module Kennel
|
|
149
149
|
# TODO: use awesome-print or similar, but it has too many monkey-patches
|
150
150
|
# https://github.com/amazing-print/amazing_print/issues/36
|
151
151
|
def pretty_inspect(object)
|
152
|
-
string = object.inspect
|
152
|
+
string = object.inspect.dup
|
153
153
|
string.gsub!(/:([a-z_]+)=>/, "\\1: ")
|
154
154
|
10.times do
|
155
155
|
string.gsub!(/{(\S.*?\S)}/, "{ \\1 }") || break
|
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: 1.
|
4
|
+
version: 1.112.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.0.3
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Keep datadog monitors/dashboards/etc in version control, avoid chaotic management
|