kennel 1.57.2 → 1.58.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 +4 -4
- data/lib/kennel/models/slo.rb +11 -2
- data/lib/kennel/version.rb +1 -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: ffd28c1dcb7db623d9e93d2238e143e78c928f76573d97781c1bdcd058c0ab1c
|
|
4
|
+
data.tar.gz: 6948f95652b107a8ccf3f58585cd2e3c4e908554a8c99ecade86ad6233eb8d14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c5bbfb1b9bc9a9c32e9200b3572f01bb201aade69081dc651dbb499d35816d157593a41aa057669f0dc2fd6f9e2cd4d99235b88a7c7e09b70f032a5c2e0ae80
|
|
7
|
+
data.tar.gz: fdbfa3f3f8b9c654e60e072909bcb1f6d30580142a03a5365220f781b062e821f6d8313538b2aefc87ed64974f239df0f0c9b4a7798ca5ad4560d5aa3656c907
|
data/lib/kennel/models/slo.rb
CHANGED
|
@@ -6,7 +6,8 @@ module Kennel
|
|
|
6
6
|
DEFAULTS = {
|
|
7
7
|
description: nil,
|
|
8
8
|
query: nil,
|
|
9
|
-
monitor_ids: []
|
|
9
|
+
monitor_ids: [],
|
|
10
|
+
thresholds: []
|
|
10
11
|
}.freeze
|
|
11
12
|
|
|
12
13
|
settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name
|
|
@@ -16,9 +17,17 @@ module Kennel
|
|
|
16
17
|
tags: -> { @project.tags },
|
|
17
18
|
query: -> { DEFAULTS.fetch(:query) },
|
|
18
19
|
description: -> { DEFAULTS.fetch(:description) },
|
|
19
|
-
monitor_ids: -> { DEFAULTS.fetch(:monitor_ids) }
|
|
20
|
+
monitor_ids: -> { DEFAULTS.fetch(:monitor_ids) },
|
|
21
|
+
thresholds: -> { DEFAULTS.fetch(:thresholds) }
|
|
20
22
|
)
|
|
21
23
|
|
|
24
|
+
def initialize(*)
|
|
25
|
+
super
|
|
26
|
+
if thresholds.any? { |t| t[:warning] && t[:warning].to_f <= t[:critical].to_f }
|
|
27
|
+
raise ValidationError, "Threshold warning must be greater-than critical value"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
22
31
|
def as_json
|
|
23
32
|
return @as_json if @as_json
|
|
24
33
|
data = {
|
data/lib/kennel/version.rb
CHANGED
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.58.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-11-
|
|
11
|
+
date: 2019-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|