kennel 1.113.1 → 1.113.2

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: af3ac09353ce317e01997ae925ac4873b24708bc710bec0cedf1cf3b78334396
4
- data.tar.gz: 148af144d196c02155eeb0f295f59aaadaa157f3943d7a93af1154cc9f644779
3
+ metadata.gz: adf4f9d7bbb7ca7762d12c2dfc2f77faf2ad22dd5ea0179130ac793d56d66b06
4
+ data.tar.gz: 6346728be4090edba0d00b8830517ac8e9ca3df4c16255638520b4133fcaff14
5
5
  SHA512:
6
- metadata.gz: be15b9ec70bb981a851e0a0dd55fad94a0d765a4747111ff12aa1dde90d1dffb8f1228aee85bf83020df7cbd94d64c9ef2df4dfb7532e664c2aeca5e151fe9fd
7
- data.tar.gz: 85916df4a2ea0cbc8dd72e033dd3a2159fe8cbd60f44d4869cf62f014eeeabce5a7e633807772e9bd9b0af312b60a78571ec63e16b2106a178bb2cfb38ed3332
6
+ metadata.gz: 7fc4b90e41dcaafa071fe13b2a7324f9fa0d2ea5d5041d75e6d8e2afbd5b8ab85106ed715964b717282beefe4fa6aeb442ff7721fde5d727343aba1702b85e39
7
+ data.tar.gz: 948288a0179b596477b7034ee03341d34ff1d8fd0f3be5f53a9fdb6a8c9a3892d10e50aa1b2aab843f77e1449066c0192e178cd3cb5b0083d6f9f4a0dddfe248
@@ -131,12 +131,15 @@ module Kennel
131
131
  as_json[:query] = as_json[:query].gsub(/%{(.*?)}/) do
132
132
  resolve($1, type, id_map, **args) || $&
133
133
  end
134
+ else # do nothing
134
135
  end
135
136
  end
136
137
 
137
138
  def validate_update!(_actuals, diffs)
138
- if bad_diff = diffs.find { |diff| diff[1] == "type" }
139
- invalid! "Datadog does not allow update of #{bad_diff[1]} (#{bad_diff[2].inspect} -> #{bad_diff[3].inspect})"
139
+ # ensure type does not change, but not if it's metric->query which is supported and used by importer.rb
140
+ _, path, from, to = diffs.detect { |_, path, _, _| path == "type" }
141
+ if path && !(from == "metric alert" && to == "query alert")
142
+ invalid! "Datadog does not allow update of #{path} (#{from.inspect} -> #{to.inspect})"
140
143
  end
141
144
  end
142
145
 
@@ -145,7 +148,7 @@ module Kennel
145
148
  end
146
149
 
147
150
  def self.url(id)
148
- Utils.path_to_url "/monitors##{id}/edit"
151
+ Utils.path_to_url "/monitors/#{id}/edit"
149
152
  end
150
153
 
151
154
  def self.parse_url(url)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.113.1"
3
+ VERSION = "1.113.2"
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: 1.113.1
4
+ version: 1.113.2
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-05-15 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday