pingable 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pingable/common_checks.rb +6 -1
- data/lib/pingable/handler.rb +1 -1
- data/lib/pingable/version.rb +1 -1
- metadata +64 -39
@@ -16,11 +16,16 @@ module Pingable
|
|
16
16
|
|
17
17
|
def add_active_record!
|
18
18
|
if defined?(ActiveRecord)
|
19
|
+
require 'timeout'
|
19
20
|
add_check lambda {
|
20
21
|
begin
|
21
|
-
|
22
|
+
timeout(10) do
|
23
|
+
ActiveRecord::Base.verify_active_connections!
|
24
|
+
end
|
22
25
|
ActiveRecord::Base.connection.execute('select 1')
|
23
26
|
nil
|
27
|
+
rescue Timeout::Error
|
28
|
+
"ActiveRecord: Timed out"
|
24
29
|
rescue Exception => e
|
25
30
|
if e.class.name == e.message
|
26
31
|
"ActiveRecord: #{e}"
|
data/lib/pingable/handler.rb
CHANGED
data/lib/pingable/version.rb
CHANGED
metadata
CHANGED
@@ -1,46 +1,62 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: pingable
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Alexander Staubo
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-01-27 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: rspec
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :development
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: rack
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 23
|
43
|
+
segments:
|
44
|
+
- 1
|
45
|
+
- 0
|
46
|
+
- 0
|
32
47
|
version: 1.0.0
|
33
48
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
pluggable checks.
|
38
|
-
email:
|
49
|
+
version_requirements: *id002
|
50
|
+
description: Pingable is a Rack handler that let an app respond to a path /ping, with pluggable checks.
|
51
|
+
email:
|
39
52
|
- alex@origo.no
|
40
53
|
executables: []
|
54
|
+
|
41
55
|
extensions: []
|
56
|
+
|
42
57
|
extra_rdoc_files: []
|
43
|
-
|
58
|
+
|
59
|
+
files:
|
44
60
|
- .gitignore
|
45
61
|
- Gemfile
|
46
62
|
- LICENSE
|
@@ -58,27 +74,36 @@ files:
|
|
58
74
|
- pingable.gemspec
|
59
75
|
homepage: http://github.com/origo/pingable
|
60
76
|
licenses: []
|
77
|
+
|
61
78
|
post_install_message:
|
62
79
|
rdoc_options: []
|
63
|
-
|
80
|
+
|
81
|
+
require_paths:
|
64
82
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
84
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
93
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
77
101
|
requirements: []
|
102
|
+
|
78
103
|
rubyforge_project: pingable
|
79
|
-
rubygems_version: 1.8.
|
104
|
+
rubygems_version: 1.8.6
|
80
105
|
signing_key:
|
81
106
|
specification_version: 3
|
82
|
-
summary: Pingable is a Rack handler that let an app respond to a path /ping, with
|
83
|
-
pluggable checks.
|
107
|
+
summary: Pingable is a Rack handler that let an app respond to a path /ping, with pluggable checks.
|
84
108
|
test_files: []
|
109
|
+
|