alive_state 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 315276182764fa14be49d6bb006e8e7eec762e9a
4
- data.tar.gz: c1d3296d45289c2f547278c7009dfb2855d31d95
3
+ metadata.gz: 68f261ca0524f7cae7c72d03e19648e1bb03f53d
4
+ data.tar.gz: 7f5be8ddd51c4eead64b084f43970c92761f26f1
5
5
  SHA512:
6
- metadata.gz: fa584452877146615c541b9e2f7c2914b5bbbcc3d2b2605963a18289cb25e3199e86f1b5aab7d4359f8da0b9a093682943bd1e190fc92e5fdeaf8ee696cdef85
7
- data.tar.gz: 5ffc001cbc2d0f69c82188b0e1c6c372b2f2a37e6da4eb5aa7bcbb2cafa309a8b7cbc2162d8de49a8b1a875625df299d98a972dc13897795052d55f527235874
6
+ metadata.gz: 91fb5bf9d8a6226df2affe3d7cfb586f574782a102302592c0369a8239830bd970948c675b3e1aba019d1f95dbefbf2a2c49e99fc5dd5415957366acae6213bd
7
+ data.tar.gz: e63392857d97e903058119837d1e98fdeb6d8a194ed3846a43ecb12f8382d6f07c60981983270125f25efc4a2f1a2973925cf3e4c477e19558b497a51b457ca6
@@ -1,7 +1,7 @@
1
1
  module AliveState
2
2
  module Configure
3
3
  class << self
4
- attr_accessor :path, :format, :front
4
+ attr_accessor :path, :format, :insert_middleware
5
5
 
6
6
  def setup
7
7
  keys.each do |key|
@@ -10,7 +10,7 @@ module AliveState
10
10
  end
11
11
 
12
12
  def keys
13
- @keys ||= %i[path format front]
13
+ @keys ||= %i[path format insert_middleware]
14
14
  end
15
15
  end
16
16
  end
@@ -2,7 +2,7 @@ module AliveState
2
2
  module Default
3
3
  PATH = 'status'.freeze
4
4
  FORMAT = 'json'.freeze
5
- FRONT = true.freeze
5
+ InsertMiddleware = true.freeze
6
6
 
7
7
  class << self
8
8
  def options
@@ -17,8 +17,8 @@ module AliveState
17
17
  FORMAT
18
18
  end
19
19
 
20
- def front
21
- FRONT
20
+ def insert_middleware
21
+ InsertMiddleware
22
22
  end
23
23
  end
24
24
  end
@@ -21,7 +21,7 @@ module AliveState
21
21
  params = { 'Content-Type' => 'text/plain; charset=utf-8' }
22
22
  raw = {
23
23
  state: :green,
24
- observed_at: Time.now,
24
+ observed_at: Time.current,
25
25
  application: {}
26
26
  }
27
27
 
@@ -5,7 +5,7 @@ module AliveState
5
5
  end
6
6
 
7
7
  def insert_middleware
8
- if AliveState.config.front and defined? ActionDispatch::DebugExceptions
8
+ if AliveState.config.insert_middleware and defined? ActionDispatch::DebugExceptions
9
9
  app.middleware.insert_after ActionDispatch::DebugExceptions, AliveState::Middleware
10
10
  else
11
11
  app.middleware.use AliveState::Middleware
@@ -1,3 +1,3 @@
1
1
  module AliveState
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alive_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ogom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-10 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler