healthier 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: a6edf83e9f94bfec7c31425fb9da3271736b0e088abffcf6075b51e9b3384776
4
- data.tar.gz: 6a61b806971ab5aaea9684f8b5e29bfadd16ad60c7a4106ff1406863e6ef9278
3
+ metadata.gz: e3d31d17199c50606705f54e8711cce324edaa9a2e8e56a557d73529d976ef83
4
+ data.tar.gz: d63895420862e07ca45402790400cbfea4c96628827f8b157506491d14b06823
5
5
  SHA512:
6
- metadata.gz: dbdca601bebf47f6a3e8002d9cb0194bf19269a9f17f6a5833f72922fc371775a34ff018d7c30530ac8318c0bdcb3a914ef8a66c6c2d4eff4f56285faef8bd59
7
- data.tar.gz: b205cd863d5c0cadadcdab264d893e5c489aa65e37e6c5399041894cc645832e077d279231ff6a5d7b2fc1daeb58da270571008257e67ab92003893da3f0de33
6
+ metadata.gz: 9a5b5e7f4a60fdf90c0ba443761f9a27ba2992b4ef5ebb534d92825df2409d9fcaa029962867ccab53ed8deef8ecf344b0557dd76d5dc19fc6428db0f472ea50
7
+ data.tar.gz: 3866fec75e625ca437d672354632227901629641a97c4d04b7fb0559aa1594baee27d365e4e5fc6c59961e11009f7608560cef5df9f8a4851cc9d5c7501f52b0
data/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Healthier
2
+
2
3
  Short description and motivation.
3
4
 
4
5
  ## Usage
6
+
5
7
  How to use my plugin.
6
8
 
7
9
  ## Installation
10
+
8
11
  Add this line to your application's Gemfile:
9
12
 
10
13
  ```ruby
@@ -12,17 +15,47 @@ gem "healthier"
12
15
  ```
13
16
 
14
17
  And then execute:
18
+
15
19
  ```bash
16
20
  $ bundle
17
21
  ```
18
22
 
19
23
  Or install it yourself as:
24
+
20
25
  ```bash
21
26
  $ gem install healthier
22
27
  ```
23
28
 
29
+ In your application routes.rb file:
30
+
31
+ ```ruby
32
+ mount Healthier::Engine => '/healthier'
33
+ ```
34
+
35
+ In the config directory, make a healthier folder and create a file
36
+ called services.yml:
37
+
38
+ ```yaml
39
+ ---
40
+ healthier:
41
+ depends_on:
42
+ - name: 'postgresql'
43
+ - name: 'mongodb'
44
+ - name: 'redis'
45
+ - name: 'rabbitmq'
46
+ ```
47
+
48
+ ENVs for basic authentication:
49
+
50
+ ```bash
51
+ USERNAME: 'demouser'
52
+ PASSWORD: 'demouser@2023'
53
+ ```
54
+
24
55
  ## Contributing
56
+
25
57
  Contribution directions go here.
26
58
 
27
59
  ## License
60
+
28
61
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -4,7 +4,7 @@
4
4
  class BasicAuthService
5
5
  def self.authorize(controller)
6
6
  controller.authenticate_or_request_with_http_basic do |username, password|
7
- username == 'healthier' && password == 'Selise23'
7
+ username == ENV['USERNAME'] && password == ENV['PASSWORD']
8
8
  end
9
9
  end
10
10
  end
@@ -31,8 +31,8 @@ module Healthier
31
31
  FAILURE = 400
32
32
 
33
33
  def ping!
34
- conf['depends_on'].each_with_object({}) do |service, obj|
35
- obj[service['name']] = ping_it(service['name'])
34
+ conf['depends_on'].each_with_object({}) do |dependant, obj|
35
+ obj[dependant['name']] = ping_it(dependant['name'])
36
36
  end
37
37
  end
38
38
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Healthier
4
4
  # MAJOR.MINOR.PATCH
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: healthier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nima Yonten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-03 00:00:00.000000000 Z
11
+ date: 2023-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails