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 +4 -4
- data/Readme.md +3 -1
- data/lib/kennel/models/project.rb +9 -0
- data/lib/kennel/version.rb +1 -1
- data/template/Readme.md +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76e2802df7ab2a6583e3529643deb08c382367dea7f90a7253314959d29a5bec
|
4
|
+
data.tar.gz: 4249c23ca2892cc48ce72dbd9e24fc03f38883d6eaed9b509ef75c78cb31afeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/kennel/version.rb
CHANGED
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
|
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.
|
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-
|
11
|
+
date: 2022-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|