go_watchdog 1.2.1 → 1.2.2
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/config.yml.example +4 -4
- data/lib/impatient_watchdog.rb +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b9cb2b83201d1f09dbf139d72dd706b625c6283
|
4
|
+
data.tar.gz: cf1910d8e0aafbbfd87d9a72075afef347650560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e8047daadf502ee0236c8b3b02acd651e6388ae0c5a6beaa07612dcd096049cac3858666a5c686f1a216a95c0ac5f6e0c02649b562fa01f4ae0d29a4fbdb762
|
7
|
+
data.tar.gz: fcd1f21b384349bf16effec9be95e85c142b913e6b46cf0fa6df4be4843a31627bdd9c8264537269353d1e4cc7f39293c731741d8aa2613f957dab9ffabf9323
|
data/config.yml.example
CHANGED
data/lib/impatient_watchdog.rb
CHANGED
@@ -3,21 +3,21 @@ class ImpatientWatchdog
|
|
3
3
|
MOODS = %w[happy neutral angry enraged]
|
4
4
|
|
5
5
|
def initialize(config)
|
6
|
-
@
|
6
|
+
@mood_cutoffs_in_hours = config['mood_cutoffs_in_hours']
|
7
7
|
end
|
8
8
|
|
9
9
|
def mood(options)
|
10
10
|
wait_time = minutes_ago(options[:waiting_since])
|
11
|
-
return "enraged" if wait_time > @
|
12
|
-
return "angry" if wait_time > @
|
13
|
-
return "neutral" if wait_time > @
|
11
|
+
return "enraged" if wait_time > @mood_cutoffs_in_hours['enraged']
|
12
|
+
return "angry" if wait_time > @mood_cutoffs_in_hours['angry']
|
13
|
+
return "neutral" if wait_time > @mood_cutoffs_in_hours['neutral']
|
14
14
|
"happy"
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def minutes_ago(time)
|
20
|
-
(Time.now - time) / 60.0
|
20
|
+
(Time.now - time) / 60.0 / 60.0
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: go_watchdog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill DePhillips
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: last_green_go_pipeline
|
@@ -61,8 +61,8 @@ executables:
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
-
- lib/go_watchdog_helper.rb
|
65
64
|
- lib/impatient_watchdog.rb
|
65
|
+
- lib/go_watchdog_helper.rb
|
66
66
|
- lib/go_watchdog.rb
|
67
67
|
- LICENSE
|
68
68
|
- README.md
|
@@ -91,5 +91,5 @@ rubyforge_project:
|
|
91
91
|
rubygems_version: 2.0.14
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
|
-
summary:
|
94
|
+
summary: the watchdog angrier the longer it's been since a green build
|
95
95
|
test_files: []
|