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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca0cc364f4f99bdc15aedbb0fe5b3df77be31b70
4
- data.tar.gz: 7b4cf8f04990181dc0ed845054907a16cb5277a9
3
+ metadata.gz: 2b9cb2b83201d1f09dbf139d72dd706b625c6283
4
+ data.tar.gz: cf1910d8e0aafbbfd87d9a72075afef347650560
5
5
  SHA512:
6
- metadata.gz: cad1a99de7dc3fe60c36ca1a6557f6266573edef4f25f43c3c34aaeb1665ea77f83e65f38a1fed627dedb6901d3c6ab4f3376b0628ca42232d20d2f9b81246cd
7
- data.tar.gz: 7c6203112ebebc86d3a66c6ea0c72172ded1ba45cb7956dc9856327bb162775c321227fa83254a51b1723a38b675c85cae1fbc5b499ba2af688b940f0092c345
6
+ metadata.gz: 8e8047daadf502ee0236c8b3b02acd651e6388ae0c5a6beaa07612dcd096049cac3858666a5c686f1a216a95c0ac5f6e0c02649b562fa01f4ae0d29a4fbdb762
7
+ data.tar.gz: fcd1f21b384349bf16effec9be95e85c142b913e6b46cf0fa6df4be4843a31627bdd9c8264537269353d1e4cc7f39293c731741d8aa2613f957dab9ffabf9323
data/config.yml.example CHANGED
@@ -5,7 +5,7 @@ pipeline:
5
5
  credentials:
6
6
  username: jane.doe
7
7
  message: since last deploy
8
- mood_cutoffs_in_minutes:
9
- enraged: 1440
10
- angry: 1080
11
- neutral: 120
8
+ mood_cutoffs_in_hours:
9
+ enraged: 4
10
+ angry: 2
11
+ neutral: 1
@@ -3,21 +3,21 @@ class ImpatientWatchdog
3
3
  MOODS = %w[happy neutral angry enraged]
4
4
 
5
5
  def initialize(config)
6
- @mood_cutoffs_in_minutes = config['mood_cutoffs_in_minutes']
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 > @mood_cutoffs_in_minutes['enraged']
12
- return "angry" if wait_time > @mood_cutoffs_in_minutes['angry']
13
- return "neutral" if wait_time > @mood_cutoffs_in_minutes['neutral']
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.1
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-29 00:00:00.000000000 Z
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: gets angrier the longer it's been since a green build
94
+ summary: the watchdog angrier the longer it's been since a green build
95
95
  test_files: []