ez_healthcheck 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +22 -0
- data/VERSION +1 -1
- data/ez_healthcheck.gemspec +1 -1
- data/lib/ez_healthcheck.rb +6 -6
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -2,6 +2,28 @@
|
|
2
2
|
|
3
3
|
Description goes here.
|
4
4
|
|
5
|
+
== Preparation
|
6
|
+
* AWS account
|
7
|
+
|
8
|
+
== Sample
|
9
|
+
require 'rubygems'
|
10
|
+
require 'ez_healthcheck'
|
11
|
+
|
12
|
+
HOST= 'example.com'
|
13
|
+
ID = 'XXXX'
|
14
|
+
KEY = 'YYYY'
|
15
|
+
|
16
|
+
ez = EzHealthcheck.new(HOST, ID, KEY)
|
17
|
+
|
18
|
+
ez.access(['/']) # access to root path
|
19
|
+
|
20
|
+
params.store(:subject, 'test')
|
21
|
+
params.store(:from, 'from@example.com')
|
22
|
+
params.store(:to, 'to@example.com')
|
23
|
+
params.store(:body_text, 'test')
|
24
|
+
params.store(:body_html, '<h1>test</h1>')
|
25
|
+
ez.send_email(params)
|
26
|
+
|
5
27
|
== Contributing to ez_healthcheck
|
6
28
|
|
7
29
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/ez_healthcheck.gemspec
CHANGED
data/lib/ez_healthcheck.rb
CHANGED
@@ -20,17 +20,17 @@ class EzHealthcheck
|
|
20
20
|
response = Net::HTTP.get_response(@host,path)
|
21
21
|
case response
|
22
22
|
when Net::HTTPInformation
|
23
|
-
puts "1xx"
|
23
|
+
#puts "1xx"
|
24
24
|
when Net::HTTPSuccess
|
25
|
-
puts "2xx"
|
25
|
+
#puts "2xx"
|
26
26
|
when Net::HTTPRedirection
|
27
|
-
puts "3xx"
|
27
|
+
#puts "3xx"
|
28
28
|
when Net::HTTPClientError
|
29
|
-
puts "4xx"
|
29
|
+
#puts "4xx"
|
30
30
|
when Net::HTTPServerError
|
31
|
-
puts "5xx"
|
31
|
+
#puts "5xx"
|
32
32
|
else
|
33
|
-
puts "unknown"
|
33
|
+
#puts "unknown"
|
34
34
|
end
|
35
35
|
@codes.store(path, response.code)
|
36
36
|
end
|
metadata
CHANGED