bpm_manager 0.10.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bpm_manager/red_hat.rb +4 -4
- data/lib/bpm_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 812dcaf2fee09beb883986496440fb7607269789
|
4
|
+
data.tar.gz: e844a51c8f7f1ecf2c9550c5ad2d1c225dd5fdd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a50d275053fcbef61c8ac5ab7fd6b6d2ad2aa38a64531957f35afcb15c4e5e2159a0e1291ecb8d01baaaf730cc3257a8382ef8c2b3816c059da5fc3dc980eb5
|
7
|
+
data.tar.gz: 75a82a3854f394792afee073451f40b34ee8ce220233166cf58a498c7bf0b57017210144f4750230a55f8469641dc819c03399f2efd1c068381ff39c3ffd840e
|
data/lib/bpm_manager/red_hat.rb
CHANGED
@@ -147,12 +147,12 @@ module BpmManager
|
|
147
147
|
|
148
148
|
# Private class methods
|
149
149
|
def self.calculate_sla(start, sla_hours = 0.0, offset = 20)
|
150
|
-
# Converts to seconds and calculates warning offset
|
151
|
-
|
152
|
-
|
150
|
+
hours = sla_hours.to_f * 3600 # Converts to seconds and calculates warning offset
|
151
|
+
warn = start.utc + hours * ((100.0 - offset) / 100)
|
152
|
+
total = start.utc + hours
|
153
153
|
|
154
154
|
# Returns the status
|
155
|
-
|
155
|
+
Time.now.utc <= warn ? 0 : ( warn < Time.now.utc && Time.now.utc <= total ? 1 : 2 )
|
156
156
|
end
|
157
157
|
private_class_method :calculate_sla
|
158
158
|
|
data/lib/bpm_manager/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bpm_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Presa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|