easymon 1.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of easymon might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/easymon/checks/http_check.rb +5 -1
- data/lib/easymon/testing.rb +4 -4
- data/lib/easymon/version.rb +1 -1
- data/test/dummy/log/test.log +5412 -0
- data/test/unit/checklist_test.rb +4 -0
- data/test/unit/checks/memcached_check_test.rb +2 -0
- data/test/unit/checks/redis_check_test.rb +1 -0
- 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: 1b7ad6c01ac285ce9b9c203c53f3b9a145e3ae7f
|
4
|
+
data.tar.gz: 876b44e992c4a83368014594647c284678c1a846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f73deae600499ae1a513fe4cb2532bb719005be9dec185911e3d6f5c1b812bf4e0fdfbe10969d61fabff1892f3ff1d378fcb9db3ff08e887e90ba74ce1c3a06
|
7
|
+
data.tar.gz: 2116cfbb42bb83be26be9896fea2d09c77a9a3f897b95ae7fdb86ee06d37c1ba36ecb076473ef1d5e78bc13623c7d902bfe3b37d17fd6d3342b051b263334d0b
|
@@ -20,7 +20,11 @@ module Easymon
|
|
20
20
|
|
21
21
|
private
|
22
22
|
def http_up?(config_url)
|
23
|
-
response = RestClient.
|
23
|
+
response = RestClient::Request.execute(
|
24
|
+
:method => :head,
|
25
|
+
:url => config_url,
|
26
|
+
:timeout => 5,
|
27
|
+
:open_timeout => 5)
|
24
28
|
true
|
25
29
|
rescue Exception
|
26
30
|
false
|
data/lib/easymon/testing.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Easymon
|
2
|
-
|
3
|
-
def stub_check(name)
|
2
|
+
class Testing
|
3
|
+
def self.stub_check(name)
|
4
4
|
Easymon.const_get("#{name.to_s.capitalize}Check").any_instance.stubs(:check)
|
5
5
|
end
|
6
6
|
|
7
|
-
def stub_service_success(name)
|
7
|
+
def self.stub_service_success(name)
|
8
8
|
stub_check(name).returns([true, "Up"])
|
9
9
|
end
|
10
10
|
|
11
|
-
def stub_service_failure(name)
|
11
|
+
def self.stub_service_failure(name)
|
12
12
|
stub_check(name).returns([false, "Down"])
|
13
13
|
end
|
14
14
|
end
|
data/lib/easymon/version.rb
CHANGED