sucker_punch 2.1.0 → 2.1.1

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: b3eb96d4ce859dbb4264aeb8a63383493cd76a62ae839a765882c4e8575ddb8a
4
- data.tar.gz: 948e34c2f5b5ceb0574a43f59256128c8ffc7b3444cc19393b86e024088efef5
3
+ metadata.gz: f4da8e31976d1d287c875ac707116b36a4d80b38ed944d71912de088f6b90b02
4
+ data.tar.gz: f95f0efc985a0bbbed2392b713ae8dda2dfac0a0e701bdf06dc4bb25ab6e371c
5
5
  SHA512:
6
- metadata.gz: 3dd97ef36983eee4635601a81b093284f0e19d2203d297a76f18d4cd6293e4fcf119e43cdce14b0419e1cf0750cfc5cafda7f363c60b8023685210831ab6f2ed
7
- data.tar.gz: e0e432152a7490dd3a2d32c157b4f9c7ef4f55bd22a3c6a9417d5b8a4b221adc78a83d64977f82d3615819def5ec1f5f806ad73c43003dccbdad7ad192d25c61
6
+ metadata.gz: f318e445d227d77c4237692bb96f37385321ac79ca34b14c2b0de8f87058dbd7f6ff53fd3b9b7db460f77606369172faff291fa49152635c5641a29de2ef8703
7
+ data.tar.gz: c6b54fd3541a8efecdc2a83ae54fcf3c8f3f6a7cb0a84a737a87f9446025f2241403dc10300d60fac531ea9696e941efded93a365070f1e539a986fb262ccadd
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.1.1
2
+ -------
3
+ - Relax versioning constraint of `concurrent-ruby` to make way for 1.1 release
4
+
1
5
  2.1.0
2
6
  -------
3
7
  - Add `max_jobs` configuration option to set the maximum number of tasks that
@@ -0,0 +1,44 @@
1
+ require 'sucker_punch'
2
+
3
+ # Include this in your tests to simulate
4
+ # a fake job queue. Jobs won't be executed
5
+ # as they normal would be the thread pool.
6
+ # They'll instead be pushed to a fake queue
7
+ # to be checked in a test environment.
8
+ #
9
+ # Include in your test_helper.rb:
10
+ #
11
+ # require 'sucker_punch/testing'
12
+ #
13
+ # In your application code:
14
+ #
15
+ # LogJob.perform_async(1, 2, 3)
16
+ #
17
+ # In your tests:
18
+ #
19
+ # LogJob.jobs => [{ "args" => [1, 2, 3]]
20
+
21
+ module SuckerPunch
22
+ module Job
23
+ def self.jobs
24
+ SuckerPunch::Queue.find_or_create(self.to_s)
25
+ end
26
+
27
+ def self.clear_all
28
+
29
+ end
30
+ end
31
+
32
+ class Queue
33
+ def self.find_or_create(name, number_workers = 2)
34
+ QUEUES.fetch_or_store(name) do
35
+ []
36
+ end
37
+ end
38
+
39
+
40
+ def kill
41
+ true
42
+ end
43
+ end
44
+ end
@@ -1,3 +1,3 @@
1
1
  module SuckerPunch
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -24,5 +24,5 @@ Gem::Specification.new do |gem|
24
24
  gem.add_development_dependency "minitest"
25
25
  gem.add_development_dependency "pry"
26
26
 
27
- gem.add_dependency "concurrent-ruby", "~> 1.0.0"
27
+ gem.add_dependency "concurrent-ruby", "~> 1.0"
28
28
  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.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hilkert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0
68
+ version: '1.0'
69
69
  description: Asynchronous processing library for Ruby
70
70
  email:
71
71
  - brandonhilkert@gmail.com
@@ -89,6 +89,7 @@ files:
89
89
  - lib/sucker_punch/job.rb
90
90
  - lib/sucker_punch/queue.rb
91
91
  - lib/sucker_punch/railtie.rb
92
+ - lib/sucker_punch/testing.rb
92
93
  - lib/sucker_punch/testing/inline.rb
93
94
  - lib/sucker_punch/version.rb
94
95
  - sucker_punch.gemspec