sidecloq 0.4.6 → 0.4.7

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: 391595a334f67b866a31fdee2e0c0c1c7d3c2de6e9009825c7e473e1a89171df
4
- data.tar.gz: 44991afad3f26e97d70b22a8861641ad9b1619ec83c51c63c62ef8ff2a1ae723
3
+ metadata.gz: 369b9ecaad14a3f613c3c2a4afef4d3b439ceed861525ca99286668293fa61c8
4
+ data.tar.gz: 75f2d86e8ccaea4b089407eef5cf834f9ee7c0f31251b6a1acb72c5b43a15e78
5
5
  SHA512:
6
- metadata.gz: 2f7df231b254bf0915229a4de09a3df0fdc9d4e90cc8e8855c2f7b157a300c3636fe10669413066fe13ed86d5194ba6b416a74c628a31a9da70ace3e575ff7ad
7
- data.tar.gz: 05c6c316b6f4258b46385d3d950915e80f02a21d2dcd57549b35d11d696bb75579488b5873530044fb4bb8e65835526095fdf908f79c40e6022826ed1b2be49f
6
+ metadata.gz: 3b60ac764c22dbff7d9519a0f9ce8b8484da0b775e3b875506332d71d17bf377ab6655c92f966a3140a258fb684a440638d8941e0eba0a72e3b58d4dbbd75c2f
7
+ data.tar.gz: f5877e191dd1cbca6650e3f293c3a601aee96029a8034ecc6490bfd9badc3492d340b75aa2d508b6270decf8da75f46a3dce28d739ca75fe759d14a01e74bbc0
data/README.md CHANGED
@@ -16,7 +16,7 @@ Recurring / Periodic / Scheduled / Cron job extension for
16
16
  There are several options for running periodic tasks with Sidekiq,
17
17
  including [sidekiq-scheduler](https://github.com/Moove-it/sidekiq-scheduler),
18
18
  [sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron), as well as
19
- [Sidekiq Pro](http://sidekiq.org/products/pro). Each tackles the
19
+ [Sidekiq Enterprise](https://sidekiq.org/products/enterprise.html). Each tackles the
20
20
  problem slightly differently. Sidecloq is inspired by various facets
21
21
  of these projects, as well as
22
22
  [resque-scheduler](https://github.com/resque/resque-scheduler). I urge
@@ -32,7 +32,7 @@ module Sidecloq
32
32
  end
33
33
 
34
34
  def self.from_hash(hash)
35
- hash = hash[Rails.env] if defined?(Rails) && hash.key?(Rails.env)
35
+ hash = hash[env] if hash.key?(env)
36
36
 
37
37
  specs = hash.each_with_object({}) do |(name, spec), memo|
38
38
  memo[name] = spec.dup.tap do |s|
@@ -72,5 +72,17 @@ module Sidecloq
72
72
  end
73
73
  end
74
74
  end
75
+
76
+ def self.env
77
+ rails_env || rack_env
78
+ end
79
+
80
+ def self.rails_env
81
+ Rails.env if defined?(Rails)
82
+ end
83
+
84
+ def self.rack_env
85
+ ENV['RACK_ENV']
86
+ end
75
87
  end
76
88
  end
@@ -1,3 +1,3 @@
1
1
  module Sidecloq
2
- VERSION = '0.4.6'
2
+ VERSION = '0.4.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidecloq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Robinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-21 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq