sidekiq-performing_context 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +22 -8
- data/lib/sidekiq/performing_context/version.rb +1 -1
- data/sidekiq-performing_context.gemspec +3 -3
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: faa7473e1add97c5da405f4b4ee24d70d3081a03
|
|
4
|
+
data.tar.gz: 855d297751c8cfe1ba43144b1eaeb2139cd7304d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fe9dbe4178e14e75899c18e64b596f8e66059c81e32e32e1473e48329d5f240c32d24660fa92a66c35efbcfb24869a6f08be540bdd84a68addd97b6a9da3f78
|
|
7
|
+
data.tar.gz: 17713f44e9833dd016f92fd2a74f3f454620df97240d1f534b262043c3f8fec9309be077c2c87b2af8231c11fe2bea26ae624b881b396a45e2fdeb8ef40a1b67
|
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Sidekiq::PerformingContext
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
Sidekiq::PerformingContext is a server-side Sidekiq middleware which provides a way to passing context values when create a job for Sidekiq Jobs.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -22,15 +20,31 @@ Or install it yourself as:
|
|
|
22
20
|
|
|
23
21
|
## Usage
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
```ruby
|
|
24
|
+
class Worker
|
|
25
|
+
include Sidekiq::Worker
|
|
26
|
+
|
|
27
|
+
attr_reader :context_attr_1
|
|
28
|
+
attr_reader :context_attr_2
|
|
29
|
+
|
|
30
|
+
def perform
|
|
31
|
+
@context_attr_1 # => 'sample'
|
|
32
|
+
@context_attr_2 # => 1
|
|
33
|
+
@context_attr_3 # => 'not accessor'
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
@performing_context # => {context_attr_1: 'sample', context_attr_2: 1, context_attr_3: 'not accessor'}
|
|
36
|
+
end
|
|
37
|
+
end
|
|
28
38
|
|
|
29
|
-
|
|
39
|
+
Worker.with_context(context_attr_1: 'sample', context_attr_2: 1, context_attr_3: 'not accessor').perform_async
|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
````
|
|
32
42
|
|
|
33
43
|
## Contributing
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
1. Fork it ( https://github.com/dany1468/sidekiq-performing_context/fork )
|
|
46
|
+
2. Create your feature branch (git checkout -b my-new-feature)
|
|
47
|
+
3. Commit your changes (git commit -am 'Add some feature')
|
|
48
|
+
4. Push to the branch (git push origin my-new-feature)
|
|
49
|
+
5. Create a new Pull Request
|
|
36
50
|
|
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ['dany1468']
|
|
9
9
|
spec.email = ['dany1468@gmail.com']
|
|
10
10
|
|
|
11
|
-
spec.summary = 'Passing context values when
|
|
12
|
-
spec.description = 'Passing context values when
|
|
11
|
+
spec.summary = 'Passing context values when create a job for Sidekiq Jobs'
|
|
12
|
+
spec.description = 'Passing context values when create a job for Sidekiq Jobs'
|
|
13
13
|
spec.homepage = 'https://github.com/dany1468/sidekiq-performing_context'
|
|
14
14
|
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
20
20
|
spec.require_paths = ['lib']
|
|
21
21
|
|
|
22
|
-
spec.add_dependency 'sidekiq'
|
|
22
|
+
spec.add_dependency 'sidekiq', '>= 4.1.0'
|
|
23
23
|
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sidekiq-performing_context
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dany1468
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 4.1.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 4.1.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,7 +80,7 @@ dependencies:
|
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
|
-
description: Passing context values when
|
|
83
|
+
description: Passing context values when create a job for Sidekiq Jobs
|
|
84
84
|
email:
|
|
85
85
|
- dany1468@gmail.com
|
|
86
86
|
executables: []
|
|
@@ -120,5 +120,5 @@ rubyforge_project:
|
|
|
120
120
|
rubygems_version: 2.4.5.1
|
|
121
121
|
signing_key:
|
|
122
122
|
specification_version: 4
|
|
123
|
-
summary: Passing context values when
|
|
123
|
+
summary: Passing context values when create a job for Sidekiq Jobs
|
|
124
124
|
test_files: []
|