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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a421b5e1e74e810aaf294c8ecdeec707ea56cc00
4
- data.tar.gz: 677ae2fe643f932e2545ec1b250d7142a71d0b82
3
+ metadata.gz: faa7473e1add97c5da405f4b4ee24d70d3081a03
4
+ data.tar.gz: 855d297751c8cfe1ba43144b1eaeb2139cd7304d
5
5
  SHA512:
6
- metadata.gz: f5691c9a3f826cd0f64c6de10fd3a3b7ca0b6958f8f1e2efbdd0d05bde6e55c59306ffab1d71fb3e31724258979ac4ea4732569bc5b7fff66f9ec263f576e0db
7
- data.tar.gz: e74b62ddfd47aad195315ed9ed11a5d4605432f75a01c540b4f6157ed93d136cc5a84adf7f4a4e99ccbbc2c7b1dfe95b7bb4906ea1bbcc95f746240c169d4fc4
6
+ metadata.gz: 1fe9dbe4178e14e75899c18e64b596f8e66059c81e32e32e1473e48329d5f240c32d24660fa92a66c35efbcfb24869a6f08be540bdd84a68addd97b6a9da3f78
7
+ data.tar.gz: 17713f44e9833dd016f92fd2a74f3f454620df97240d1f534b262043c3f8fec9309be077c2c87b2af8231c11fe2bea26ae624b881b396a45e2fdeb8ef40a1b67
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Sidekiq::PerformingContext
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sidekiq/performing_context`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
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
- ## Development
35
+ @performing_context # => {context_attr_1: 'sample', context_attr_2: 1, context_attr_3: 'not accessor'}
36
+ end
37
+ end
28
38
 
29
- 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.
39
+ Worker.with_context(context_attr_1: 'sample', context_attr_2: 1, context_attr_3: 'not accessor').perform_async
30
40
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
41
+ ````
32
42
 
33
43
  ## Contributing
34
44
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sidekiq-performing_context.
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
 
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module PerformingContext
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -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 calling async method for Sidekiq worker'
12
- spec.description = 'Passing context values when calling async method for Sidekiq worker'
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.0
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: '0'
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: '0'
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 calling async method for Sidekiq worker
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 calling async method for Sidekiq worker
123
+ summary: Passing context values when create a job for Sidekiq Jobs
124
124
  test_files: []