kurchatov 0.0.5.pre1 → 0.0.5.pre2

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
  SHA1:
3
- metadata.gz: a66b49a097787132b922c6b41c2969d19b140694
4
- data.tar.gz: 73b6ceb0cc9d02da4653c5629a6f65530d56e13e
3
+ metadata.gz: 4fe3de2aef28cd11718d6a7d14a407cd3290f70e
4
+ data.tar.gz: 9d77f6e030ee18cdc06a75ecfeb8a6f3051d1f21
5
5
  SHA512:
6
- metadata.gz: 63ec1266103e462a1d8870d93d035e63d61542fe0d5b8168e58c661dfd9fa9521373c8cc4f960b5670ea0d7256d0162841b770509444dfa61e630e88a0ad6ded
7
- data.tar.gz: 3788d49569986128919c4cbd2511d3e0885d2c7638c2be7c92ba8f614e93b0311bb791d07fb8d0fe49129467c43c30cff9418a7d9e243affcda309b5e7e19693
6
+ metadata.gz: ecb200981712fec0e82dd790089c259b469f958889cf2ff507a0be5d5827d03df68e85bfeb56ea334221af56810693dac0d2319c1ed3c53ec2be84b557c11fdc
7
+ data.tar.gz: c95e26f6c15277eb3ff28f07dedb3b0ff0324232a46b5612582c98625505c8bc542f76d5265d2639c60c649b65cfe7ea9892f7405aa3aeed8fcc39c714de221f
@@ -32,13 +32,13 @@ module Kurchatov
32
32
  end
33
33
 
34
34
  def set_event_state(hash = {})
35
- return if hash[:state]
36
- return if hash[:critical].nil? && hash[:warning].nil?
37
- return if hash[:metric].nil?
38
35
  if hash[:state] == true || hash[:state] == false
39
36
  hash[:state] = hash[:state] ? 'ok' : 'critical'
40
37
  return
41
38
  end
39
+ return if hash[:state]
40
+ return if hash[:critical].nil? && hash[:warning].nil?
41
+ return if hash[:metric].nil?
42
42
  hash[:state] = 'ok'
43
43
  hash[:state] = 'warning' if hash[:warning] && hash[:metric] >= hash[:warning]
44
44
  hash[:state] = 'critical' if hash[:critical] && hash[:metric] >= hash[:critical]
@@ -1,3 +1,3 @@
1
1
  module Kurchatov
2
- VERSION = "0.0.5.pre1"
2
+ VERSION = "0.0.5.pre2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kurchatov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.pre1
4
+ version: 0.0.5.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry