heartcheck 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ODE5NjdmZjAwMDdlYmFkMTY5ZTU0NjY3YzliNGM3ZDc2MzMxNjExOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDQ2ODhkZDhiZTQ2MWUwNWIyN2Q0NjUxNWYxM2FjZTYyM2I2NDdlMQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGUzNzI0YzUyYjg3NDRhNmMxNWNmMTkzODk5ODU2ZWNlMzMzNGY5MDMzMjdj
|
10
|
+
ODQ3NDE0NjZjZDg3NGU5Y2U0MGI1ZjM4N2I2ZTkxYmY5OGU5MjNkNzJlNTAw
|
11
|
+
ZDhjZGQ2M2I2ZGEzOGMyZDQ0YzdiMDM2NDRkYWIxNmFkNmM1Yjk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTUwMmVjZjVkNWE4MmI1ODFiMGZkZTAwYWViMmY1NzExZWQ3YzBjN2UxYjU3
|
14
|
+
YzhlNzRkNzNjYTJlN2YyOTYwZDdkMjFlZWVlMTVjNDVhZGU2MjAzNGEyOGU2
|
15
|
+
NTdmZjhjOTI2ZTJhNTU2ZDUxYTE3OWE2YTlkZjI0MjFlODc3ZGQ=
|
data/lib/heartcheck/checks.rb
CHANGED
@@ -19,7 +19,14 @@ module Heartcheck
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def custom_error(service)
|
22
|
-
|
22
|
+
error_message = "connection refused on: #{service.host}:#{service.port}"
|
23
|
+
|
24
|
+
if service.proxy
|
25
|
+
proxy_uri = URI(service.proxy)
|
26
|
+
error_message << " via proxy: #{proxy_uri.host}:#{proxy_uri.port}"
|
27
|
+
end
|
28
|
+
|
29
|
+
@errors << error_message
|
23
30
|
end
|
24
31
|
end
|
25
32
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module Heartcheck
|
4
|
+
module Checks
|
5
|
+
class WatchFile < Base
|
6
|
+
def add_service(options)
|
7
|
+
services << options.merge(runtime: installed(options[:file]))
|
8
|
+
end
|
9
|
+
|
10
|
+
def validate
|
11
|
+
services.each do |service|
|
12
|
+
if not service[:runtime].eql? installed(service[:file])
|
13
|
+
@errors << "App outdated, check info for the diff"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def info
|
19
|
+
services.collect do |service|
|
20
|
+
{ runtime: service[:runtime], installed: installed(service[:file]) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def installed(file)
|
27
|
+
JSON.parse open(file).read
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -64,4 +64,10 @@ Heartcheck.setup do |monitor|
|
|
64
64
|
monitor.add :cache do |c|
|
65
65
|
c.add_service(name: 'memcached', connection: Rails.cache.instance_variable_get('@data'))
|
66
66
|
end
|
67
|
+
|
68
|
+
# WatchFile
|
69
|
+
# check if a preloaded file as changed from the disk
|
70
|
+
monitor.add :watch_file do |c|
|
71
|
+
c.add_service(file: 'version.json')
|
72
|
+
end
|
67
73
|
end
|
data/lib/heartcheck/version.rb
CHANGED
metadata
CHANGED
@@ -1,193 +1,193 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heartcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Locaweb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1'
|
20
|
-
- -
|
20
|
+
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.4.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1'
|
30
|
-
- -
|
30
|
+
- - ! '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.4.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: oj
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ~>
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 2.11.0
|
40
|
-
- -
|
40
|
+
- - ! '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 2.11.4
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ~>
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 2.11.0
|
50
|
-
- -
|
50
|
+
- - ! '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 2.11.4
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: pry-nav
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.2.0
|
60
|
-
- -
|
60
|
+
- - ! '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.2.4
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.2.0
|
70
|
-
- -
|
70
|
+
- - ! '>='
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 0.2.4
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rspec
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: 3.1.0
|
80
|
-
- -
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 3.1.0
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 3.1.0
|
90
|
-
- -
|
90
|
+
- - ! '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: 3.1.0
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: rubocop
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ~>
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: 0.27.0
|
100
|
-
- -
|
100
|
+
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 0.27.1
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 0.27.0
|
110
|
-
- -
|
110
|
+
- - ! '>='
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 0.27.1
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: thor
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ~>
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 0.19.0
|
120
|
-
- -
|
120
|
+
- - ! '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: 0.19.1
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - ~>
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: 0.19.0
|
130
|
-
- -
|
130
|
+
- - ! '>='
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 0.19.1
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rack-test
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 0.6.0
|
140
|
-
- -
|
140
|
+
- - ! '>='
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: 0.6.3
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
145
|
version_requirements: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ~>
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: 0.6.0
|
150
|
-
- -
|
150
|
+
- - ! '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.6.3
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: 0.8.0
|
160
|
-
- -
|
160
|
+
- - ! '>='
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: 0.8.7
|
163
163
|
type: :development
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- -
|
167
|
+
- - ~>
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: 0.8.0
|
170
|
-
- -
|
170
|
+
- - ! '>='
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: 0.8.7
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: redcarpet
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - ~>
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: 3.2.0
|
180
|
-
- -
|
180
|
+
- - ! '>='
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: 3.2.2
|
183
183
|
type: :development
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
|
-
- -
|
187
|
+
- - ~>
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: 3.2.0
|
190
|
-
- -
|
190
|
+
- - ! '>='
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: 3.2.2
|
193
193
|
description: A simple way to check your app heart.
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/heartcheck/checks/base.rb
|
206
206
|
- lib/heartcheck/checks/firewall.rb
|
207
207
|
- lib/heartcheck/checks/process.rb
|
208
|
+
- lib/heartcheck/checks/watch_file.rb
|
208
209
|
- lib/heartcheck/controllers/base.rb
|
209
210
|
- lib/heartcheck/controllers/dev.rb
|
210
211
|
- lib/heartcheck/controllers/essential.rb
|
@@ -231,17 +232,17 @@ require_paths:
|
|
231
232
|
- lib
|
232
233
|
required_ruby_version: !ruby/object:Gem::Requirement
|
233
234
|
requirements:
|
234
|
-
- -
|
235
|
+
- - ! '>='
|
235
236
|
- !ruby/object:Gem::Version
|
236
237
|
version: '0'
|
237
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
239
|
requirements:
|
239
|
-
- -
|
240
|
+
- - ! '>='
|
240
241
|
- !ruby/object:Gem::Version
|
241
242
|
version: '0'
|
242
243
|
requirements: []
|
243
244
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.4.
|
245
|
+
rubygems_version: 2.4.8
|
245
246
|
signing_key:
|
246
247
|
specification_version: 4
|
247
248
|
summary: A simple way to check if your app is runnig like as expected.
|