health-monitor-rails 8.6.3 → 9.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
2
  SHA256:
3
- metadata.gz: 826335f7a8e90c2da61f8ee00b8da05cd4116a87f6bb6aa37da90361b89c30e7
4
- data.tar.gz: 464c9c830690482226ea59524716f9be36d47efb3912224e93bb93c14c7fde34
3
+ metadata.gz: f17a76a7f5baaf094524cc1e1e4a3f6a967bffe1900540f9a68abadeee1fcab3
4
+ data.tar.gz: 62d688b2f06bc54e727f9291937cbbb7ed706e5c02125596ac8b0193bdf3321f
5
5
  SHA512:
6
- metadata.gz: '08d8e638c8699c5b6e008608513108264c91792c08a299550774c42fd3f4e8e4ebb62be29a6094f7b4b7a11b2ef96a24f4286f735aa00bb1a38d90e0d0f6452a'
7
- data.tar.gz: 9ad584d379d7abd0332d70ddbbcfb52360e0e2df8d59fb29e93ce9caea6632786390666ced117638952504beab2fb7318b42cb65feb8223b92ff2e77e2244467
6
+ metadata.gz: cf42a67607f30a3fc3cff87abeaad8a3c0dc84b29636890ae82d28aa464eadf52940bbbb2c9fbba385449abdfe81d4c5dab874a9f21c1fefaf81911a65f4b62e
7
+ data.tar.gz: 71e8a6294d988401db16c78ecfb692c5579d3633cb2ebc783fa64d6ffd809ae6af75c4782c7f81038cc6e4156d6aa5b2de1b13344bdc6c61ace13f2fa38effb2
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # health-monitor-rails
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/health-monitor-rails.svg)](http://badge.fury.io/rb/health-monitor-rails)
4
- [![Build Status](https://travis-ci.org/lbeder/health-monitor-rails.svg)](https://travis-ci.org/lbeder/health-monitor-rails)
4
+ [![Build Status](https://travis-ci.com/lbeder/health-monitor-rails.svg?branch=master)](https://travis-ci.com/lbeder/health-monitor-rails)
5
5
  [![Coverage Status](https://coveralls.io/repos/lbeder/health-monitor-rails/badge.svg)](https://coveralls.io/r/lbeder/health-monitor-rails)
6
6
 
7
7
  This is a health monitoring Rails mountable plug-in, which checks various services (db, cache, sidekiq, redis, etc.).
@@ -227,13 +227,24 @@ end
227
227
  # Redis
228
228
  HealthMonitor.configure do |config|
229
229
  config.redis.configure do |redis_config|
230
- redis_config.connection = Redis.current # use your custom redis connection
231
- redis_config.url = 'redis://user:pass@example.redis.com:90210/' # or URL
230
+ redis_config.connection = Redis.current # Use your custom redis connection
232
231
  redis_config.max_used_memory = 200 # Megabytes
233
232
  end
234
233
  end
235
234
  ```
236
235
 
236
+ Additionally, you can configure an explicit URL:
237
+
238
+ ```ruby
239
+ # Redis
240
+ HealthMonitor.configure do |config|
241
+ config.redis.configure do |redis_config|
242
+ redis_config.url = 'redis://user:pass@example.redis.com:90210/'
243
+ redis_config.max_used_memory = 200
244
+ end
245
+ end
246
+ ```
247
+
237
248
  The currently supported settings are:
238
249
 
239
250
  #### Sidekiq
@@ -243,9 +254,11 @@ The currently supported settings are:
243
254
 
244
255
  #### Redis
245
256
 
246
- * `url`: the URL used to connect to your Redis instance - note, this is an optional configuration and will use the default connection if not specified
257
+ * `url`: the URL used to connect to your Redis instance. Note, that this is an optional configuration and will use the default connection if not specified. You can also use `url` to explicitly configure authentication (e.g., `'redis://user:pass@example.redis.com:90210/'`).
247
258
  * `connection`: Use custom Redis connection (e.g., `Redis.current`).
248
- * `max_used_memory`: Set maximum expected memory usage of Redis in megabytes. Prevent memory leaks and keys overstore.
259
+ * `max_used_memory`: Set maximum expected memory usage of Redis in megabytes. Prevent memory leaks and keys over storing.
260
+
261
+ Please note that `url` or `connection` can't be used at the same time.
249
262
 
250
263
  #### Delayed Job
251
264
 
@@ -24,8 +24,7 @@ module HealthMonitor
24
24
 
25
25
  def add_custom_provider(custom_provider_class)
26
26
  unless custom_provider_class < HealthMonitor::Providers::Base
27
- raise ArgumentError.new 'custom provider class must implement '\
28
- 'HealthMonitor::Providers::Base'
27
+ raise ArgumentError.new 'custom provider class must implement HealthMonitor::Providers::Base'
29
28
  end
30
29
 
31
30
  add_provider(custom_provider_class)
@@ -29,7 +29,7 @@ module HealthMonitor
29
29
  {
30
30
  results: results,
31
31
  status: results.any? { |res| res[:status] != STATUSES[:ok] } ? :service_unavailable : :ok,
32
- timestamp: Time.now.to_s(:rfc2822)
32
+ timestamp: Time.now.to_formatted_s(:rfc2822)
33
33
  }
34
34
  end
35
35
 
@@ -37,7 +37,7 @@ module HealthMonitor
37
37
  private
38
38
 
39
39
  def check_values!
40
- time = Time.now.to_s(:rfc2822)
40
+ time = Time.now.to_formatted_s(:rfc2822)
41
41
 
42
42
  redis.set(key, time)
43
43
  fetched = redis.get(key)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HealthMonitor
4
- VERSION = '8.6.3'
4
+ VERSION = '9.1.0'
5
5
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health-monitor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.6.3
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Beder
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-31 00:00:00.000000000 Z
11
+ date: 2021-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: '1.0'
145
+ version: 1.1.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: '1.0'
152
+ version: 1.1.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: resque
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -224,16 +224,16 @@ dependencies:
224
224
  name: sqlite3
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - "~>"
227
+ - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: 1.3.6
229
+ version: '1.3'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - "~>"
234
+ - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: 1.3.6
236
+ version: '1.3'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: timecop
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -276,8 +276,9 @@ files:
276
276
  homepage: https://github.com/lbeder/health-monitor-rails
277
277
  licenses:
278
278
  - MIT
279
- metadata: {}
280
- post_install_message:
279
+ metadata:
280
+ rubygems_mfa_required: 'true'
281
+ post_install_message:
281
282
  rdoc_options: []
282
283
  require_paths:
283
284
  - lib
@@ -285,16 +286,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
286
  requirements:
286
287
  - - ">="
287
288
  - !ruby/object:Gem::Version
288
- version: '0'
289
+ version: '2.5'
289
290
  required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  requirements:
291
292
  - - ">="
292
293
  - !ruby/object:Gem::Version
293
294
  version: '0'
294
295
  requirements: []
295
- rubyforge_project:
296
- rubygems_version: 2.7.8
297
- signing_key:
296
+ rubygems_version: 3.1.6
297
+ signing_key:
298
298
  specification_version: 4
299
299
  summary: Health monitoring Rails plug-in, which checks various services (db, cache,
300
300
  sidekiq, redis, etc.)