makandra_sidekiq 0.1.3 → 0.1.4

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
- SHA1:
3
- metadata.gz: 39f9cb8d4180c57f0333ccaf56d611d46a89ccf4
4
- data.tar.gz: 0e4ce34ef6280d53a3788c210638cb4c8c3d2c27
2
+ SHA256:
3
+ metadata.gz: d1a031fd7e128b55c5af83a18fd3c66b1bce4253a71506d3d7d6e5ea863ede57
4
+ data.tar.gz: 797ec99395f49ab6099288054b407a8b2b7f277539037662aaae9329bc13ce24
5
5
  SHA512:
6
- metadata.gz: 52c3fb15a307cab8a24efd8c8f9321a4442fce04a2b05f2bb899a58923c1a7f61ca6bff1cf6d7ca36857f7a137de75e16392e39cda3975062a76c27af386e572
7
- data.tar.gz: 7ab4c0282373834c04edcf57e8330b5a413371eab6d0b3c7c1b174c6b7637260add9adf523d025b04eb9a1fb437a203b96b5c3e71e010a3113369b90b1d69a6f
6
+ metadata.gz: 9cb9832fe0e4c3ab143abcd544bd76b30dda4d916f35ce2536e2f4f7158c10dfbd9988ddfdd49be1750fa616966f284cfc58c1326b6411381b5efd11a77860a4
7
+ data.tar.gz: 13881f0bd8099f15bcf8c838b256d33e0f5b7dd7542696f696f1a6cc973ca2517fa8b42a796d152fcdc2c1941453caed35be51613914377963692c99e729cca7
@@ -1,7 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.1
4
+ - 2.3.3
5
5
  script: bundle exec rspec spec
6
6
  cache: bundler
7
7
  notifications:
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.3][] (2017-02-13)
6
+
7
+ Gem no longer depends on `capistrano`, since using its Capistrano recipes is optional.
8
+
5
9
  ## [0.1.2][] (2017-01-12)
6
10
 
7
11
  `sidekiq:start` checks that sidekiq really comes up and will retry a few times.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- makandra_sidekiq (0.1.3)
4
+ makandra_sidekiq (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 1.13.6
35
+ 1.16.1
data/README.md CHANGED
@@ -27,6 +27,17 @@ Make sure you include at least `:pidfile` and `:logfile`. Sane values are
27
27
  :logfile: ./log/sidekiq.log
28
28
  ```
29
29
 
30
+
31
+ ### Passing additional options to sidekiq
32
+
33
+ Sometimes you will have to pass additional options to the sidekiq binary. You can do this by adding
34
+
35
+ ```
36
+ :sidekiq_command_line_args: '--some --options'
37
+ ```
38
+ to your `config/sidekiq.yml`.
39
+
40
+
30
41
  ### Capistrano
31
42
 
32
43
  makandra_sidekiq comes with [Capistrano](https://github.com/capistrano/capistrano) recipes to call its rake tasks for (re)starting Sidekiq during deployment.
@@ -1,3 +1,4 @@
1
+ require 'bundler'
1
2
  require 'pathname'
2
3
  require 'yaml'
3
4
  require 'open3'
@@ -131,17 +132,26 @@ module MakandraSidekiq
131
132
  '--index', sidekiq_index.to_s,
132
133
  '--environment', rails_env,
133
134
  '--config', config_path.to_s,
134
- '--daemon'
135
+ '--daemon',
136
+ *additional_command_line_args,
135
137
  ]
136
138
  bundle_exec('sidekiq', *arguments)
137
139
  end
138
140
 
141
+ def additional_command_line_args
142
+ if (raw_args = @config[:sidekiq_command_line_args])
143
+ raw_args.split(' ')
144
+ else
145
+ []
146
+ end
147
+ end
148
+
139
149
  def sidekiq_index
140
150
  ENV['SIDEKIQ_INDEX'] || 0
141
151
  end
142
152
 
143
153
  def bundle_exec(*command)
144
- stdout_str, stderr_str, status = Open3.capture3('bundle', 'exec', *command, chdir: @root.to_s)
154
+ stdout_str, stderr_str, status = Bundler.with_clean_env { Open3.capture3('bundle', 'exec', *command, chdir: @root.to_s) }
145
155
  puts stdout_str
146
156
  unless status.success?
147
157
  fail "#{command} failed with message: #{stderr_str}"
@@ -1,3 +1,3 @@
1
1
  module MakandraSidekiq
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makandra_sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-13 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.5.2
100
+ rubygems_version: 2.7.6
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Support code for sidekiq, including rake tasks and capistrano recipes.