kennel 1.78.0 → 1.78.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d1a7ffddfc55955603d8ac9826ab2f46af2f223cb92f829ac1be0f2dc29af4c
4
- data.tar.gz: fe2a7fa8bdf812bb7e4cf79a3e14ab8923225f8464ac352723ab18e54be9fc3f
3
+ metadata.gz: d12735939d42da2f660773d9ca734a279fdc5c29b6619f6722b163f07f299236
4
+ data.tar.gz: 14f40ae5314abc2ff5b58672ad096a9d1898b793c1dee490a45d9deefc67e513
5
5
  SHA512:
6
- metadata.gz: af3734bc932520ec215baa7cbf31f40553d50b48f0c61d80835a030cb728af8cb139c4e7296ad82792a54b699971a6892da227674b1b50f659bd787cbe743a0c
7
- data.tar.gz: 9f01dd98d5467bf60cdfa2943925fa0edece4d74970ba2e17888b5dcce51f6f59a15cd70c6d6208e1e83c5ebd65339e7a2e7f5c52f490ece1cffce0ad170f8b3
6
+ metadata.gz: b5340adfc8b564f648caa8f656b8b10fe9cd48177a6b15e21944adac24209344aeb81aa0bc5190e7a5997e8ebc0dc49af0304daf947abf99112dc8d56f6a9485
7
+ data.tar.gz: 368fb6dffbc42be889f8692b876e867818cde5eefd04b982151efc7d9dc74a378a046f12a7764f448df5818ebca950e55f22e36d45822c68ed3e8a3442850162
data/Readme.md CHANGED
@@ -198,6 +198,15 @@ end
198
198
  end
199
199
  ```
200
200
 
201
+ ### Updating existing resources with id
202
+
203
+ Setting `id` makes kennel take over a manually created datadog resource.
204
+ When manually creating to import, it is best to remove the `id` and delete the manually created resource.
205
+
206
+ When an `id` is set and the original resource is deleted, kennel will fail to update,
207
+ removing the `id` will cause kennel to create a new resource in datadog.
208
+
209
+
201
210
  ### Skipping validations
202
211
 
203
212
  Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
@@ -139,7 +139,8 @@ module Kennel
139
139
  def ensure_all_ids_found
140
140
  @expected.each do |e|
141
141
  next unless id = e.id
142
- raise "Unable to find existing #{e.class.api_resource} with id #{id}"
142
+ resource = e.class.api_resource
143
+ raise "Unable to find existing #{resource} with id #{id}\nIf the #{resource} was deleted, remove the `id: -> { #{e.id} }` line."
143
144
  end
144
145
  end
145
146
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.78.0"
3
+ VERSION = "1.78.1"
4
4
  end
@@ -180,6 +180,15 @@ end
180
180
  end
181
181
  ```
182
182
 
183
+ ### Updating existing resources with id
184
+
185
+ Setting `id` makes kennel take over a manually created datadog resource.
186
+ When manually creating to import, it is best to remove the `id` and delete the manually created resource.
187
+
188
+ When an `id` is set and the original resource is deleted, kennel will fail to update,
189
+ removing the `id` will cause kennel to create a new resource in datadog.
190
+
191
+
183
192
  ### Skipping validations
184
193
 
185
194
  Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
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.78.0
4
+ version: 1.78.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: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday