sucker_punch 2.0.3 → 2.0.4

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
  SHA1:
3
- metadata.gz: f9888e735e4566c4c0d789d328c78553caa09e35
4
- data.tar.gz: 5e70f216542d0bc65fb5fbb1757dfce2ce529100
3
+ metadata.gz: 02222eadf72ce92d2552755c7bfb66332397c33e
4
+ data.tar.gz: d3d339c4ad293760b2dd6f4e3eb3675758fc3a2f
5
5
  SHA512:
6
- metadata.gz: 295aceab156ca6df316d095be72b2052591a0a4895893ce75e4751db160b8eb675dac3385757c94f0776b90587c292bcf4a1b666df6a3c387d471a4569e1c520
7
- data.tar.gz: 49db7fbff4f68c9015566162ba26794365d535a5dfc0a9957dc107e4006ec7baae125ad52c1b0ff29c813f080aaf1919c0b2b0bec4e8ac6498adda43fa254d18
6
+ metadata.gz: eca020b9b49c2df52d474ba4d18b801c8f0723bda7a4a55bdecb23eb8fe886047b6765cf06939a8289a78a46471eebde8776b2a4caad96781013dc1ca589be8c
7
+ data.tar.gz: d05ec8872904d0d9720b6d150375ad42d5a4c06aad5d271f58fa782e3171e26a8c01868b6e816d779e2c762c8dbddc12ec8f674a026108537af67e591ba2157b
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.0.4
2
+ -------
3
+ - Better initialization of variables and names to remove warnings
4
+
1
5
  2.0.3
2
6
  -------
3
7
  - Rewrite shutdown strategy to fix bug related to premature shutdown when only
@@ -10,12 +10,12 @@ module SuckerPunch
10
10
  RUNNING = Concurrent::AtomicBoolean.new(true)
11
11
 
12
12
  class << self
13
- def exception_handler=(handler)
14
- @exception_handler = handler
13
+ def exception_handler
14
+ @exception_handler ||= method(:default_exception_handler)
15
15
  end
16
16
 
17
- def exception_handler
18
- @exception_handler || method(:default_exception_handler)
17
+ def exception_handler=(handler)
18
+ @exception_handler = handler
19
19
  end
20
20
 
21
21
  def default_exception_handler(ex, klass, args)
@@ -26,11 +26,7 @@ module SuckerPunch
26
26
  end
27
27
 
28
28
  def logger
29
- @logger || default_logger
30
- end
31
-
32
- def logger=(log)
33
- @logger = (log ? log : Logger.new('/dev/null'))
29
+ @logger ||= default_logger
34
30
  end
35
31
 
36
32
  def default_logger
@@ -39,9 +35,13 @@ module SuckerPunch
39
35
  l
40
36
  end
41
37
 
38
+ def logger=(log)
39
+ @logger = (log ? log : Logger.new('/dev/null'))
40
+ end
41
+
42
42
  def shutdown_timeout
43
43
  # 10 seconds on heroku, minus a grace period
44
- @shutdown_timeout || 8
44
+ @shutdown_timeout ||= 8
45
45
  end
46
46
 
47
47
  def shutdown_timeout=(timeout)
@@ -33,7 +33,7 @@ module SuckerPunch
33
33
  def perform_async(*args)
34
34
  return unless SuckerPunch::RUNNING.true?
35
35
  queue = SuckerPunch::Queue.find_or_create(self.to_s, num_workers)
36
- queue.post(args) { |args| __run_perform(*args) }
36
+ queue.post(args) { |job_args| __run_perform(*job_args) }
37
37
  end
38
38
 
39
39
  def perform_in(interval, *args)
@@ -1,3 +1,3 @@
1
1
  module SuckerPunch
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sucker_punch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hilkert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-23 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.6.11
123
+ rubygems_version: 2.6.13
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Sucker Punch is a Ruby asynchronous processing using concurrent-ruby, heavily