wellness 0.2.1 → 0.2.2

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: b4e81a8991068a5d3b89047d81154d301a0766c8
4
- data.tar.gz: 28d528329b6beda4c53c7a834230dabb3aa84c3a
3
+ metadata.gz: 4dfb06c69ae9ad383213314a083e3d45f29494bc
4
+ data.tar.gz: da02f76f57427872ec6aee0758f47f888cd22aa0
5
5
  SHA512:
6
- metadata.gz: c992c504707bc85f21d7f2a50338e07551ca0ec389517a7f1a7dafaa0a91185d2d1f3dea3946640e3b400c80fd6d0ecb25d31436072fb723be3518fa6f352d32
7
- data.tar.gz: c6a5d412d1c5daeab133ee2ef5a88b141c0093b2b8e04f928b33bf646a08aed3631d71b53af1e2d896ae4f2ce3271e07ca9b366710125fa24904e2e04bf14c1e
6
+ metadata.gz: 2b0bbb5258a83a3c434857e6f1625c1e957937a2db2af93f4de2f24298ef736ad8f4f2757c3f74858c84d0384f80e185653810242cc928723109993c3c9fbdca
7
+ data.tar.gz: 8ea9833a6380a18562e24c752b0a21f8a932279c2a793ed4c653b1f04c3394f4f6c61dd260645c02ef0e349252e8648f3586eec1208e37333fc47b75f7eae97d
@@ -29,17 +29,17 @@ module Wellness
29
29
 
30
30
  def health_status_check
31
31
  if @system.check
32
- [200, { 'Content-Type' => 'text/json' }, [{ status: 'HEALTHY' }.to_json]]
32
+ [200, { 'Content-Type' => 'application/json' }, [{ status: 'HEALTHY' }.to_json]]
33
33
  else
34
- [500, { 'Content-Type' => 'text/json' }, [{ status: 'UNHEALTHY' }.to_json]]
34
+ [500, { 'Content-Type' => 'application/json' }, [{ status: 'UNHEALTHY' }.to_json]]
35
35
  end
36
36
  end
37
37
 
38
38
  def health_details_check
39
39
  if @system.check
40
- [200, { 'Content-Type' => 'text/json' }, [@system.to_json]]
40
+ [200, { 'Content-Type' => 'application/json' }, [@system.to_json]]
41
41
  else
42
- [500, { 'Content-Type' => 'text/json' }, [@system.to_json]]
42
+ [500, { 'Content-Type' => 'application/json' }, [@system.to_json]]
43
43
  end
44
44
  end
45
45
  end
@@ -7,14 +7,14 @@ module Wellness
7
7
  class PostgresService < Wellness::Services::Base
8
8
  def check
9
9
  case ping
10
- when PG::Constants::PQPING_NO_ATTEMPT
11
- ping_failed('no attempt made to ping')
12
- when PG::Constants::PQPING_NO_RESPONSE
13
- ping_failed('no response from ping')
14
- when PG::Constants::PQPING_REJECT
15
- ping_failed('ping was rejected')
16
- else
17
- ping_successful
10
+ when PG::Constants::PQPING_NO_ATTEMPT
11
+ ping_failed('no attempt made to ping')
12
+ when PG::Constants::PQPING_NO_RESPONSE
13
+ ping_failed('no response from ping')
14
+ when PG::Constants::PQPING_REJECT
15
+ ping_failed('ping was rejected')
16
+ else
17
+ ping_successful
18
18
  end
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module Wellness
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -38,7 +38,7 @@ describe Wellness::Middleware do
38
38
  end
39
39
 
40
40
  it 'returns a json content type' do
41
- expect(subject[1]).to eq({ 'Content-Type' => 'text/json' })
41
+ expect(subject[1]).to eq({ 'Content-Type' => 'application/json' })
42
42
  end
43
43
 
44
44
  it 'returns UNHEALTHY' do
@@ -55,7 +55,7 @@ describe Wellness::Middleware do
55
55
  end
56
56
 
57
57
  it 'returns a json content type' do
58
- expect(subject[1]).to eq({ 'Content-Type' => 'text/json' })
58
+ expect(subject[1]).to eq({ 'Content-Type' => 'application/json' })
59
59
  end
60
60
 
61
61
  it 'returns HEALTHY' do
@@ -79,7 +79,7 @@ describe Wellness::Middleware do
79
79
  end
80
80
 
81
81
  it 'returns a json content type' do
82
- expect(subject[1]).to eq({ 'Content-Type' => 'text/json' })
82
+ expect(subject[1]).to eq({ 'Content-Type' => 'application/json' })
83
83
  end
84
84
 
85
85
  it 'returns UNHEALTHY' do
@@ -108,7 +108,7 @@ describe Wellness::Middleware do
108
108
  end
109
109
 
110
110
  it 'returns a json content type' do
111
- expect(subject[1]).to eq({ 'Content-Type' => 'text/json' })
111
+ expect(subject[1]).to eq({ 'Content-Type' => 'application/json' })
112
112
  end
113
113
 
114
114
  it 'returns UNHEALTHY' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wellness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Johnston