sidekiq_alive 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbebd769f1de056322e4efcae5e38a6ec9f6257dc7b66e7c01ed8383c3f92159
4
- data.tar.gz: c17640dff13d58911b06c27ec262718050f949dd649aa4ca70d113aeb04ff99d
3
+ metadata.gz: '08d38ee6866d0c487f93b13d5c4fc64d70d5775efbf29e1c44e3e6d0a968ec0c'
4
+ data.tar.gz: 2d5955184dd20b771897edf42f23471023faa95ed19ffea0850ef9ca086d7193
5
5
  SHA512:
6
- metadata.gz: 101e33628eb65ed68b753d7d7fd6704176895c80085e18d0a72c4eee80d08f331d2533de0853c708de9f716f694d09219baaf16805c2d36b854473c04ef0f010
7
- data.tar.gz: 351477e70c6480d85fc035d82b46f294b2da82ea6faac039754c26c388aa9db24ecedb14f867ad5793effcd240d7c50852fbdabe52fc26da1c07d1026e7f1fa1
6
+ metadata.gz: c9e8b6b12990a57f4075b7e8b79d8006c399240e0d17fb678437bf6fc8798164502761f3920543ca351a2248bcd1cefc57e0bf9d105da951b1942fd78a440dad
7
+ data.tar.gz: a0bbe436f1ca6e2601d2dd3daa7f321c6ddbcf6e69f51b3a222daedeb8c2f4b3b5bffde590b68ffcba43a179877d5694459ea7bf5cf9cef295fed27164d378d7
@@ -0,0 +1,48 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [master]
13
+ pull_request:
14
+ branches: [master]
15
+
16
+ jobs:
17
+ test:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ ruby-version: ["2.6", "2.7", "3.0"]
22
+ services:
23
+ # Label used to access the service container
24
+ redis:
25
+ # Docker Hub image
26
+ image: redis
27
+ # Set health checks to wait until redis has started
28
+ options: >-
29
+ --health-cmd "redis-cli ping"
30
+ --health-interval 10s
31
+ --health-timeout 5s
32
+ --health-retries 5
33
+ ports:
34
+ # Maps port 6379 on service container to the host
35
+ - 6379:6379
36
+
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+ - name: Set up Ruby
40
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
41
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
42
+ # uses: ruby/setup-ruby@v1
43
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
44
+ with:
45
+ ruby-version: ${{ matrix.ruby-version }}
46
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
47
+ - name: Run tests
48
+ run: bundle exec rake
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq_alive (2.1.1)
4
+ sidekiq_alive (2.1.2)
5
5
  sidekiq
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SidekiqAlive
2
2
 
3
- [![Build Status](https://travis-ci.org/arturictus/sidekiq_alive.svg?branch=master)](https://travis-ci.org/arturictus/sidekiq_alive)
3
+ ![build](https://github.com/arturictus/sidekiq_alive/actions/workflows/ruby.yml/badge.svg)
4
4
  [![Maintainability](https://api.codeclimate.com/v1/badges/35c39124564ffeb0ce4e/maintainability)](https://codeclimate.com/github/arturictus/sidekiq_alive/maintainability)
5
5
  [![Test Coverage](https://api.codeclimate.com/v1/badges/35c39124564ffeb0ce4e/test_coverage)](https://codeclimate.com/github/arturictus/sidekiq_alive/test_coverage)
6
6
 
data/lib/sidekiq_alive.rb CHANGED
@@ -163,4 +163,4 @@ end
163
163
  require 'sidekiq_alive/worker'
164
164
  require 'sidekiq_alive/server'
165
165
 
166
- SidekiqAlive.start unless ENV['DISABLE_SIDEKIQ_ALIVE']
166
+ SidekiqAlive.start unless ENV.fetch('DISABLE_SIDEKIQ_ALIVE', '').casecmp("true") == 0
@@ -20,15 +20,15 @@ module SidekiqAlive
20
20
  end
21
21
 
22
22
  def set_defaults
23
- @host = ENV['SIDEKIQ_ALIVE_HOST'] || '0.0.0.0'
24
- @port = ENV['SIDEKIQ_ALIVE_PORT'] || 7433
25
- @path = ENV['SIDEKIQ_ALIVE_PATH'] || '/'
23
+ @host = ENV.fetch('SIDEKIQ_ALIVE_HOST', '0.0.0.0')
24
+ @port = ENV.fetch('SIDEKIQ_ALIVE_PORT', 7433)
25
+ @path = ENV.fetch('SIDEKIQ_ALIVE_PATH', '/')
26
26
  @liveness_key = 'SIDEKIQ::LIVENESS_PROBE_TIMESTAMP'
27
27
  @time_to_live = 10 * 60
28
28
  @callback = proc {}
29
29
  @registered_instance_key = 'SIDEKIQ_REGISTERED_INSTANCE'
30
30
  @queue_prefix = :sidekiq_alive
31
- @server = ENV['SIDEKIQ_ALIVE_SERVER'] || 'webrick'
31
+ @server = ENV.fetch('SIDEKIQ_ALIVE_SERVER', 'webrick')
32
32
  @custom_liveness_probe = proc { true }
33
33
  end
34
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqAlive
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_alive
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Pañach
@@ -125,7 +125,7 @@ executables: []
125
125
  extensions: []
126
126
  extra_rdoc_files: []
127
127
  files:
128
- - ".github/workflows/test.yml"
128
+ - ".github/workflows/ruby.yml"
129
129
  - ".gitignore"
130
130
  - ".rspec"
131
131
  - ".tool-versions"
@@ -1,41 +0,0 @@
1
- name: Ruby CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- ruby-version: [3.0.x, 2.7.x, 2.6.x, 2.5.x]
16
- # Service containers to run with `runner-job`
17
- services:
18
- # Label used to access the service container
19
- redis:
20
- # Docker Hub image
21
- image: redis
22
- # Set health checks to wait until redis has started
23
- options: >-
24
- --health-cmd "redis-cli ping"
25
- --health-interval 10s
26
- --health-timeout 5s
27
- --health-retries 5
28
- ports:
29
- # Maps port 6379 on service container to the host
30
- - 6379:6379
31
-
32
- steps:
33
- - uses: actions/checkout@v2
34
- - name: Set up Ruby ${{ matrix.ruby-version }}
35
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
36
- with:
37
- ruby-version: ${{ matrix.ruby-version }}
38
- - name: Install dependencies
39
- run: bundle install
40
- - name: Run tests
41
- run: bundle exec rspec