unconnected 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79f457353be9d9b69964a7e0fa7b683c5b181d40
4
- data.tar.gz: cfb51d702d3acfd5e73570a1ab19a8220c167908
3
+ metadata.gz: 6b9557bb55e38e747bb4cba6136e67b516e7d5df
4
+ data.tar.gz: 7d53978953ff6c4d17f14043d93bda76f4b26c1d
5
5
  SHA512:
6
- metadata.gz: 087367810bebb1950217092419fa32ef38aabda226acf45256aa31565724fd377404f936dfeda11d12de5a44ef9788c4c53d2afad38f2eefe4581ce12785c219
7
- data.tar.gz: 584f4af96fc213eedf637ee8be53c53b207a140294eafeea44713a74e90e59fee5ad121e0e9ab37077da802b097d579af48507d5018de1b4d4c84c6ee18e2d52
6
+ metadata.gz: 4d5e8d49dccb2acce3eae2cdb3e878794cd12263edead742b7f2fe1984a1ce003383dfb84d748d8fb17a14a02d3d33da02defe25f667cdbc1b5c8a7aed84a6d9
7
+ data.tar.gz: 8c7a93d96119c7fd12cc4163d2d32dbe2fa5f90d3287e51c72d84280f43419d44ecd8ab2d17408aeba733e604aadbcf40bff9106a8f84b6f41546afeaa899a60
@@ -6,7 +6,6 @@ module Unconnected
6
6
  desc "start","start simple webserver"
7
7
  def start port
8
8
  Unconnected::Server.set :port, Integer(port)
9
- Unconnected::Server.set :bind, "0.0.0.0"
10
9
  Unconnected::Server.run!
11
10
  end
12
11
  end
@@ -2,11 +2,24 @@ require "sinatra/base"
2
2
 
3
3
  module Unconnected
4
4
  class Server < Sinatra::Base
5
+ set :bind, "0.0.0.0"
6
+ set :show_exceptions, false
7
+ set :raise_errors, false
5
8
  get "/" do
6
- '<html><body><h1>Plonk!</h1></body></html>'
9
+ status 503
10
+ body '<html><body><h1>You hit the load balancer.</h1><p>something rotten in the state of cloudmark :-(</p></body></html>'
7
11
  end
8
12
  get "/health" do
9
- "OK"
13
+ status 200
14
+ headers "Content-Type" => "text/plain"
15
+ headers "Server" => "Unconnected/#{Unconnected::VERSION}"
16
+ body "OK; Load Balancer is up"
17
+ end
18
+ not_found do
19
+ redirect to('/'), 301
20
+ end
21
+ error do
22
+ redirect to('/'), 301
10
23
  end
11
24
  end
12
25
  end
@@ -1,3 +1,3 @@
1
1
  module Unconnected
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unconnected
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra