ping-pong 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/ping-pong.rb +17 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cd5684780ca02834c3a0a665c89d6bb2a4f3280e
4
+ data.tar.gz: 6953bac4e6d92fb56a2a5e13c4fb3703144cac4c
5
+ SHA512:
6
+ metadata.gz: 4b9611f4c8a1ff8eea1538814372d9f352f2c46f0f7ce3e678d8f9eece8f091b55859f8666504ba09af1ea1f6a5e1a92dada9e5afa613f98d28d11a06070591b
7
+ data.tar.gz: cc3f17bc866719f7bdab748c4ce967cb017f2d506491c25f696ba01b52adf8a28a0f1bb604bf9eec3b4d0ee68a932d758ee686470b8b920d03ad6aacad076814
data/ping-pong.rb ADDED
@@ -0,0 +1,17 @@
1
+ module Ping
2
+ class Pong
3
+ def initialize(app, opts={})
4
+ @app = app
5
+ @path = opts.fetch(:path, '/ping')
6
+ @text = opts.fetch(:text, 'pong')
7
+ end
8
+
9
+ def call(env)
10
+ if env['PATH_INFO'] == @path
11
+ [200, {}, [@text]]
12
+ else
13
+ @app.call(env)
14
+ end
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ping-pong
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kevin Melchert
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Rack health check endpoint.
14
+ email: kevin.melchert@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - ping-pong.rb
20
+ homepage: https://github.com/max-power/ping-pong
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - "."
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubyforge_project:
39
+ rubygems_version: 2.2.2
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: Rack health check endpoint.
43
+ test_files: []