elb-health-check 0.0.1 → 0.1.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
- SHA1:
3
- metadata.gz: 15b2067facf15e86d20ab108c164f5e2dceeb051
4
- data.tar.gz: '09721984cc01e95d1d63b5c32ea4733c581307b1'
2
+ SHA256:
3
+ metadata.gz: e03ee29bc181a731b7adef0969c7f39d9e2bf5cd926ab0f88d562faa92a9343c
4
+ data.tar.gz: 7e125d4e4aeed79ea753e6361b80de521e2fcbcce26adff0d3c2de1ae22ad7da
5
5
  SHA512:
6
- metadata.gz: 4f7f2493c0cba52591751335cdd1d8300bc464e6b926fd1fb045b2851c4eec16b3c94abb8e0f01ac3097973fb6249b9109fd6df46e2e0c8f6991508f8148106c
7
- data.tar.gz: 7bd9948c2cf93035db51b6021259fb8a06a0190f8c7b3872f61ab2ff14f07a077381bbda42744692389c0fb249e060a7d253838fe0a3702f63123c5d9e7e067e
6
+ metadata.gz: 0eba18c2be35baa76e031861fd8b8372d12dc5f935c856452385f0d7110361752fc0df9f6ab58ed6f891999a7b9a66edd26b2640bd94cb941fbb5a4655a002d9
7
+ data.tar.gz: 3e0ec650fd42a939b0c38e4ca855538427974b6c074f6ecdb4f4986e63138bd581f4b54d17913451eb59061b4c202fa4bba9c35296bf354b2ad0a13e38492894
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ElbHealthCheck
2
4
  mattr_accessor :uris, :checks
3
5
 
@@ -5,11 +7,9 @@ module ElbHealthCheck
5
7
  yield self
6
8
  end
7
9
 
8
- # Default config
9
- self.uris = ['/health_check']
10
- self.checks = %i(database)
10
+ self.uris = ['/health-check', '/healthcheck', '/health_check']
11
+ self.checks = %i[database]
11
12
  end
12
13
 
13
14
  require 'elb_health_check/middleware'
14
15
  require 'elb_health_check/railtie'
15
-
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ElbHealthCheck
2
4
  class Middleware
3
5
  attr_accessor :app
@@ -7,18 +9,15 @@ module ElbHealthCheck
7
9
  end
8
10
 
9
11
  def call(env)
10
- if ElbHealthCheck.uris.include?(env['PATH_INFO'])
12
+ return app.call(env) unless ElbHealthCheck.uris.include?(env['PATH_INFO'])
11
13
 
12
- checks = ElbHealthCheck.checks.map { |check| send("#{check}?") }
14
+ checks = ElbHealthCheck.checks.map { |check| send("#{check}?") }
13
15
 
14
- if checks.include?(false)
15
- return [500, {}, ['FAILED']]
16
- else
17
- return [200, {}, ['OK']]
18
- end
16
+ if checks.include?(false)
17
+ [500, {}, ['FAILED']]
18
+ else
19
+ [200, {}, ['OK']]
19
20
  end
20
-
21
- app.call(env)
22
21
  end
23
22
 
24
23
  private
@@ -1,4 +1,4 @@
1
- require 'rails'
1
+ # frozen_string_literal: true
2
2
 
3
3
  module ElbHealthCheck
4
4
  class Railtie < ::Rails::Railtie
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ElbHealthCheck
2
- VERSION = "0.0.1"
4
+ VERSION = '0.1.0'
3
5
  end
metadata CHANGED
@@ -1,37 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elb-health-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joergen Dahlke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-27 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '3.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '3.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
14
+ name: railties
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - ">="
32
18
  - !ruby/object:Gem::Version
33
19
  version: '0'
34
- type: :development
20
+ type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
@@ -39,7 +25,7 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
- name: rake
28
+ name: rubocop
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - ">="
@@ -82,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
68
  - !ruby/object:Gem::Version
83
69
  version: '0'
84
70
  requirements: []
85
- rubyforge_project: elb-health-check
86
- rubygems_version: 2.5.2
71
+ rubygems_version: 3.0.3.1
87
72
  signing_key:
88
73
  specification_version: 4
89
74
  summary: Simple healthcheck for Rails apps