hirefire-resource 1.0.0 → 1.0.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: 1e973c6cacc949a2272e34b4e7d198a0eacf2b6f64c45cd68992365606eacb08
4
- data.tar.gz: fb11287cb45d6d310396dce3b847b9d188bf8cea4ebae0fb83deecc45ac4093a
3
+ metadata.gz: a7b610268d577eb8e6f9a45e515e01484f15a6d8ad57c82073dac2ccd89ae84f
4
+ data.tar.gz: 2bf77a2f62178e7f77b956d81344005aff9b247b09252e577f669a685c599417
5
5
  SHA512:
6
- metadata.gz: a30817796fceb776b6439e9c5d56c4663ff2619fdb0c5efdf88a53b0427d6fed277488bf15f2af0defb089a482702cc3daffcc11351143b091c4fe46905b21a3
7
- data.tar.gz: ee5a162079121d899877b8fdee63b8bb288b1ab7670d5e849e0652d513c463712ad3acfff5bd41249cf1198208bbecc6b22a44507a5138aa0e1c6a7504837142
6
+ metadata.gz: 42acb0f1d897f2ad80305d4618943d55e1b8a47bd7caad542ed799e52862572f6e97c247440955b6b80ddd4062df64e35635754bf3e053df63910820f88599fd
7
+ data.tar.gz: 99706744f9945b01b8498fb19408785df2351367e8358f505e153462f582ef32f413855e75b99e428cf9fd1fa692cf8e00ef9c0850e4745aa4ea3fdf6320edf2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v1.0.2
2
+
3
+ * Add support for dashes in `HireFire::Worker` names to match the Procfile process naming format. `HireFire::Worker` is implicitly used when configuring HireFire using the `HireFire::Configuration#dyno` method.
4
+
5
+ ## v1.0.1
6
+
7
+ * Fix issue where jobs that were enqueued using `sidekiq < 7.2.1` and then processed with `sidekiq >= 7.2.1` (after updating) resulted in a `NoMethodError: undefined method 'queue' for Hash` error during checkups.
8
+
1
9
  ## v1.0.0
2
10
 
3
11
  * `HireFire`:
@@ -122,10 +122,10 @@ module HireFire
122
122
 
123
123
  if !options[:skip_working]
124
124
  in_progress = ::Sidekiq::Workers.new.count do |key, tid, job|
125
- if Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new("7.0.0")
126
- queues.include?(job.queue) && job.run_at <= now
127
- else
125
+ if job.is_a?(Hash) # Sidekiq < 7.2.1
128
126
  queues.include?(job["queue"]) && job["run_at"] <= now_as_i
127
+ else # Sidekiq >= 7.2.1
128
+ queues.include?(job.queue) && job.run_at <= now
129
129
  end
130
130
  end
131
131
  end
@@ -223,10 +223,10 @@ module HireFire
223
223
  now_as_i = now.to_i
224
224
 
225
225
  ::Sidekiq::Workers.new.count do |key, tid, job|
226
- if Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new("7.0.0")
227
- (queues.empty? || queues.include?(job.queue)) && job.run_at <= now
228
- else
226
+ if job.is_a?(Hash) # Sidekiq < 7.2.1
229
227
  (queues.empty? || queues.include?(job["queue"])) && job["run_at"] <= now_as_i
228
+ else # Sidekiq >= 7.2.1
229
+ (queues.empty? || queues.include?(job.queue)) && job.run_at <= now
230
230
  end
231
231
  end
232
232
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HireFire
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -6,7 +6,7 @@ module HireFire
6
6
 
7
7
  class MissingDynoBlockError < StandardError; end
8
8
 
9
- PROCESS_NAME_PATTERN = /\A[a-zA-Z][a-zA-Z0-9_]{0,29}\z/
9
+ PROCESS_NAME_PATTERN = /\A[a-zA-Z][a-zA-Z0-9_-]{0,29}\z/
10
10
 
11
11
  attr_reader :name
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hirefire-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-23 00:00:00.000000000 Z
11
+ date: 2024-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal