rack-active_record_status 0.4 → 0.4.1
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.
- data/README.rdoc +3 -0
- data/lib/rack/active_record_status.rb +2 -2
- data/rack-active_record_status.gemspec +1 -1
- metadata +4 -3
data/README.rdoc
CHANGED
@@ -20,6 +20,9 @@ config file (<tt>config/application.rb</tt> for Rails 3, <tt>config/environment.
|
|
20
20
|
|
21
21
|
config.middleware.use Rack::ActiveRecordStatus
|
22
22
|
|
23
|
+
# In older Rails, like 2.3.4, defer loading using a string:
|
24
|
+
config.middleware.use "Rack::ActiveRecordStatus"
|
25
|
+
|
23
26
|
Test your ActiveRecord connection by hitting
|
24
27
|
|
25
28
|
GET /app_status
|
@@ -15,8 +15,8 @@ module Rack
|
|
15
15
|
def get_status
|
16
16
|
begin
|
17
17
|
ActiveRecord::Base.connection.select_all('select 1')
|
18
|
-
|
19
|
-
[200, {'Content-Type' => 'text/plain'},
|
18
|
+
# Success
|
19
|
+
[200, {'Content-Type' => 'text/plain'}, "OK #{Time.now}\n"]
|
20
20
|
rescue
|
21
21
|
body = ['ERROR', "#{$!.class}: #{$!.message}", "Backtrace:"] + $!.backtrace
|
22
22
|
body *= "\n"
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-active_record_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Aaron Suggs
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-
|
18
|
+
date: 2011-06-29 00:00:00 -04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|