kennel 1.114.1 → 1.115.0

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: 248d75d411fad53dd8011982ec16d2104547991ec35480bf9d085feaed419285
4
- data.tar.gz: fe11bc68ac149ff7ef989c8bd2b2b497eb465f6f0eccc66d5fbf304de9801666
3
+ metadata.gz: 76e2802df7ab2a6583e3529643deb08c382367dea7f90a7253314959d29a5bec
4
+ data.tar.gz: 4249c23ca2892cc48ce72dbd9e24fc03f38883d6eaed9b509ef75c78cb31afeb
5
5
  SHA512:
6
- metadata.gz: d9888da18e41995160fb03516fc02037cb07f43acae46b298941952ec053df4b2ca62ea918a5b1b17664c76d926bb702b6e28a375af1f3047451e2463f88226c
7
- data.tar.gz: 92917f89e251d9345f1cf580ebb0206b1206882abe036d1e44284835c025ca61822e261d35a120fe7194303ede139e3c56db48b878fdb137f8d176cc4796441f
6
+ metadata.gz: 8bd1740361932ba4e6dfe4d7aff4ad7cbcdc96796020428902fc6551b9768c6ccc434a279c214a638aa119e012267fd8dfe00e9107052c570789a1e563075505
7
+ data.tar.gz: 266aacb034b8933640c3e95a0319afd5fdc923c857d85a5b039e4e14a2bb47dc1096e8849a1d3060171fed2984d847934465ed845a1e45d27caa465c5ca9fcf4
data/Readme.md CHANGED
@@ -315,6 +315,8 @@ module ProjectA
315
315
  ...
316
316
  ```
317
317
 
318
+ On the command line, use the projects `kennel_id` (and if none is set then snake_case of the class name) to refer to the project. For example here`PROJECT=project_a` but if it were `Foo::ProjectA` then `foo_project_a`.
319
+
318
320
  ### Skipping validations
319
321
  Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
320
322
  to unblock use the `validate: -> { false }` option.
@@ -335,7 +337,7 @@ so they can be created in a single update and can be re-created if any of them i
335
337
 
336
338
  ### Debugging changes locally
337
339
  - rebase on updated `master` to not undo other changes
338
- - figure out project name by converting the class name to snake-case
340
+ - figure out project name by converting the class name to snake_case
339
341
  - run `PROJECT=foo bundle exec rake kennel:update_datadog` to test changes for a single project (monitors: remove mentions while debugging to avoid alert spam)
340
342
  - use `PROJECT=foo,bar,...` for multiple projects
341
343
 
@@ -19,12 +19,21 @@ module Kennel
19
19
 
20
20
  def validated_parts
21
21
  all = parts
22
+ unless all.is_a?(Array) && all.all? { |part| part.is_a?(Record) }
23
+ invalid! "#parts must return an array of Records"
24
+ end
25
+
22
26
  validate_parts(all)
23
27
  all
24
28
  end
25
29
 
26
30
  private
27
31
 
32
+ # let users know which project/resource failed when something happens during diffing where the backtrace is hidden
33
+ def invalid!(message)
34
+ raise ValidationError, "#{kennel_id} #{message}"
35
+ end
36
+
28
37
  # hook for users to add custom validations via `prepend`
29
38
  def validate_parts(parts)
30
39
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.114.1"
3
+ VERSION = "1.115.0"
4
4
  end
data/template/Readme.md CHANGED
@@ -297,6 +297,8 @@ module ProjectA
297
297
  ...
298
298
  ```
299
299
 
300
+ On the command line, use the projects `kennel_id` (and if none is set then snake_case of the class name) to refer to the project. For example here`PROJECT=project_a` but if it were `Foo::ProjectA` then `foo_project_a`.
301
+
300
302
  ### Skipping validations
301
303
  Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
302
304
  to unblock use the `validate: -> { false }` option.
@@ -317,7 +319,7 @@ so they can be created in a single update and can be re-created if any of them i
317
319
 
318
320
  ### Debugging changes locally
319
321
  - rebase on updated `master` to not undo other changes
320
- - figure out project name by converting the class name to snake-case
322
+ - figure out project name by converting the class name to snake_case
321
323
  - run `PROJECT=foo bundle exec rake kennel:update_datadog` to test changes for a single project (monitors: remove mentions while debugging to avoid alert spam)
322
324
  - use `PROJECT=foo,bar,...` for multiple projects
323
325
 
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.114.1
4
+ version: 1.115.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: 2022-08-13 00:00:00.000000000 Z
11
+ date: 2022-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday