sidekiq-global_id 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -4
- data/sidekiq-global_id.gemspec +2 -2
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa90451ce89bdd82b28178875db1c5acd5fdb7a
|
4
|
+
data.tar.gz: 6d8aa85c35ef4c271b4bc495f405257c78fd9a64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3dd1bc0c915cebdae5e7f90411444f8f74c3122f4280b6c3049485ac7722fe8f150d39be40d306d6ecab8b7c0167289654c28785f9c2b4fee1e8da1441ffbdb
|
7
|
+
data.tar.gz: 30a6fbeab33fae60b7f2656c9ee1788f8fb0ee49ba10239c1e7213698ca9de499416da62be582346ba3f4449bfdc304ab60343e17eaa89772a5ac5a1a2c17ebc
|
data/README.md
CHANGED
@@ -44,19 +44,29 @@ user = User.create!(params)
|
|
44
44
|
WelcomeEmailSender.perform_async(user)
|
45
45
|
```
|
46
46
|
|
47
|
-
## Testing
|
47
|
+
## Testing
|
48
48
|
|
49
49
|
If you're using [rspec-sidekiq](https://github.com/philostler/rspec-sidekiq) gem, `require 'sidekiq/global_id/rspec'` to deserialize global ids:
|
50
|
-
|
50
|
+
|
51
51
|
```ruby
|
52
52
|
require 'sidekiq/global_id/rspec'
|
53
53
|
|
54
|
-
it 'sends welcome email to user' do
|
54
|
+
it 'sends welcome email to user' do
|
55
55
|
WelcomeEmailSender.perform_async(user)
|
56
56
|
expect(WelcomeEmailSender).to have_enqueued_job(user)
|
57
57
|
end
|
58
58
|
```
|
59
|
-
|
59
|
+
|
60
|
+
In the event you are testing Sidekiq workers _inline_ using Sidekiq's [suggested approach](https://github.com/mperham/sidekiq/wiki/Testing#setup). To allow test inline workers to deserialize the GlobalId `Sidekiq::GlobalId::ServerMiddleware` must also be included in the [Sidekiq Test Harness](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware).
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
require "sidekiq/testing"
|
64
|
+
Sidekiq::Testing.inline!
|
65
|
+
Sidekiq::Testing.server_middleware do |chain|
|
66
|
+
chain.prepend Sidekiq::GlobalId::ServerMiddleware
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
60
70
|
## Development
|
61
71
|
|
62
72
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/sidekiq-global_id.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'sidekiq-global_id'
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.2.0'
|
8
8
|
spec.authors = ['Tema Bolshakov']
|
9
9
|
spec.email = ['abolshakov@spbtv.com']
|
10
10
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_runtime_dependency 'sidekiq', '>= 4.0'
|
22
|
-
spec.add_runtime_dependency 'globalid', '
|
22
|
+
spec.add_runtime_dependency 'globalid', '>= 0.3.7', '< 0.5'
|
23
23
|
spec.add_runtime_dependency 'activejob', '>= 4.2.5'
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-global_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tema Bolshakov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: globalid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.3.7
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0.5'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: 0.3.7
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.5'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: activejob
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
199
|
version: '0'
|
194
200
|
requirements: []
|
195
201
|
rubyforge_project:
|
196
|
-
rubygems_version: 2.5.1
|
202
|
+
rubygems_version: 2.5.2.1
|
197
203
|
signing_key:
|
198
204
|
specification_version: 4
|
199
205
|
summary: Sidekiq and GlobalId integration
|