pingable 0.0.7 → 0.0.8

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/.gitignore CHANGED
@@ -4,3 +4,6 @@
4
4
  *.gem
5
5
  .bundle
6
6
  pkg/*
7
+ example/Gemfile.lock
8
+ *.sublime-workspace
9
+ *.sublime-project
data/README.md CHANGED
@@ -6,7 +6,7 @@ Pingable is a simple framework to implement a 'ping' URL in Rack-based web appli
6
6
  For example, a Rails or Sinatra app's `config.ru` may look like this (Rack 1.4.0 and later):
7
7
 
8
8
  map '/ping' do
9
- use Pingable::Handler
9
+ run Pingable::Handler
10
10
  end
11
11
  run MyApp
12
12
 
@@ -44,11 +44,6 @@ Something a bit more complex:
44
44
 
45
45
  Pingable.add_check TwitterCheck.new(:url => "http://twitter.com/")
46
46
 
47
- Rack compatibility
48
- ------------------
49
-
50
- Pre-Rack 1.4.0, `map` seems broken, and requires jumping through a few hoops to mount different paths. See `example/config.ru` for an example.
51
-
52
47
  Configuration
53
48
  -------------
54
49
 
@@ -8,7 +8,7 @@ Pingable.add_check lambda {
8
8
 
9
9
  # Earlier Rack versions barf without this
10
10
  map '/ping' do
11
- run Pingable::Handler.new('myapp')
11
+ run Pingable::Handler
12
12
  end
13
13
  map '/' do
14
14
  run lambda { |env|
@@ -6,6 +6,10 @@ module Pingable
6
6
  @name = name
7
7
  end
8
8
 
9
+ def self.call(env)
10
+ new.call(env)
11
+ end
12
+
9
13
  def call(env)
10
14
  failures = Pingable.run_checks!
11
15
  if failures.any?
@@ -1,3 +1,3 @@
1
1
  module Pingable
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pingable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexander Staubo
@@ -63,7 +63,6 @@ files:
63
63
  - README.md
64
64
  - Rakefile
65
65
  - example/Gemfile
66
- - example/Gemfile.lock
67
66
  - example/config.ru
68
67
  - example/run.sh
69
68
  - lib/pingable.rb
@@ -1,36 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- activemodel (3.2.1)
5
- activesupport (= 3.2.1)
6
- builder (~> 3.0.0)
7
- activerecord (3.2.1)
8
- activemodel (= 3.2.1)
9
- activesupport (= 3.2.1)
10
- arel (~> 3.0.0)
11
- tzinfo (~> 0.3.29)
12
- activesupport (3.2.1)
13
- i18n (~> 0.6)
14
- multi_json (~> 1.0)
15
- arel (3.0.0)
16
- builder (3.0.0)
17
- daemons (1.1.6)
18
- eventmachine (0.12.10)
19
- i18n (0.6.0)
20
- multi_json (1.0.4)
21
- pingable (0.0.3)
22
- rack (>= 1.0.0)
23
- rack (1.4.0)
24
- thin (1.3.1)
25
- daemons (>= 1.0.9)
26
- eventmachine (>= 0.12.6)
27
- rack (>= 1.0.0)
28
- tzinfo (0.3.31)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- activerecord
35
- pingable
36
- thin