kennel 1.31.0 → 1.32.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: 82e31f58b23229f5a5408eb59cf577f2ce23956dc5083a3e389bc35a3294a422
4
- data.tar.gz: 8f5d346672553ad42bec0f19dd23bc2a39032f845d3e930d77698385c4abf8a7
3
+ metadata.gz: 1fb3be2e1395d9f41520f63d29df373ce631e4e4113b19194a8b2e1341e5908b
4
+ data.tar.gz: 9f70d18d20d323428817e734431b4368c2ba1847ad09d80c4cb2ee5b5813002f
5
5
  SHA512:
6
- metadata.gz: ab0964256569162a0aaac2c3b6c65c289b85a4815c307134eec882aaf4b2251686b880572d8c72e2516616df88ce53b91945d1f14940cab1e44c9b2a7c7f23e7
7
- data.tar.gz: 7c19c8896b1cdac2ee8dc3830af85cbc36e355ebcd1ac4df262ab20396644662b0bfc0204a2953776f174b7d19ef3ec7bb757abb9dba21e700e8fb2d8f38f2ec
6
+ metadata.gz: c9d781f6f85ece7438eb471df37a357153e1eecd48dd0cf2ed56abfc625abc2cfc6ec6577a2022c1452939311ad1b5218d9371c4cbc69e7fc09e0c00344161ca
7
+ data.tar.gz: e910e6220b1d099d238d0551c7c19d847b65837a3675241dd4c7c50d16ff6c2c784dafc833919faf4e91e4ca60d624fa26c3fbe050b82274a3b67cd0918561b2
data/Readme.md CHANGED
@@ -180,6 +180,7 @@ To link to existing monitors via their kennel_id
180
180
  ### Debugging changes locally
181
181
 
182
182
  - rebase on updated `master` to not undo other changes
183
+ - figure out project name by converting the class name to snake-case
183
184
  - run `PROJECT=foo bundle exec rake kennel:update_datadog` to test changes for a single project
184
185
 
185
186
  ### Listing umuted alerts
@@ -10,14 +10,23 @@ module Kennel
10
10
  end
11
11
 
12
12
  def import(resource, id)
13
- model =
14
- begin
15
- Kennel::Models.const_get(resource.capitalize)
16
- rescue NameError
17
- raise ArgumentError, "#{resource} is not supported"
18
- end
13
+ model = data = nil
14
+ begin
15
+ model =
16
+ begin
17
+ Kennel::Models.const_get(resource.capitalize)
18
+ rescue NameError
19
+ raise ArgumentError, "#{resource} is not supported"
20
+ end
21
+ data = @api.show(model.api_resource, id)
22
+ rescue StandardError => e
23
+ retried ||= 0
24
+ retried += 1
25
+ raise e if retried != 1 || resource != "dash" || !e.message.match?(/No \S+ matches that/)
26
+ resource = "screen"
27
+ retry
28
+ end
19
29
 
20
- data = @api.show(model.api_resource, id)
21
30
  data = data[resource.to_sym] || data
22
31
  id = data.fetch(:id) # store numerical id returned from the api
23
32
  model.normalize({}, data)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.31.0"
3
+ VERSION = "1.32.0"
4
4
  end
@@ -162,6 +162,7 @@ To link to existing monitors via their kennel_id
162
162
  ### Debugging changes locally
163
163
 
164
164
  - rebase on updated `master` to not undo other changes
165
+ - figure out project name by converting the class name to snake-case
165
166
  - run `PROJECT=foo bundle exec rake kennel:update_datadog` to test changes for a single project
166
167
 
167
168
  ### Listing umuted alerts
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.31.0
4
+ version: 1.32.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: 2019-02-23 00:00:00.000000000 Z
11
+ date: 2019-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday