capistrano-shoryuken 0.1.1 → 0.1.2
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 +8 -8
- data/README.md +59 -1
- data/lib/capistrano/shoryuken/version.rb +1 -1
- data/lib/capistrano/tasks/capistrano2.rb +10 -8
- data/lib/capistrano/tasks/shoryuken.cap +9 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2JiMTM3NzliMDhhNzA4ZWYzYzkyMTRmOGZiYWJiMjUxZTYzYzllNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzZmYzViOTM1YTYwNGJkMWNmN2MxZTBiZjA4MTdkOTM1YTMyZDcxOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDZhNjMzYjU1NzUzMjc4NmQwMzczNjQyMWYzNDEyNjIwYWE5MzQxZDIwZGEw
|
10
|
+
NTEwYTllYTdjNjQxNzA3YTk3Yjg1NjIxMzI5N2Y0YjQ3NGNlODkwMDI4NDZk
|
11
|
+
MDkxZmFjNDIxODhiMWMxN2FjZmUxMTNjYTBhYTJlZGY0YjY0ODk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODY3ZGMyY2Y5MDgyMDBjYTBiMzFjZjA1NTdkOWUyZjBhYTk3OTIxM2YyZTkw
|
14
|
+
ZGM4M2IzMGQyZDc1Nzg5MjIzNGQ5NGMwYThhYTkwMTY3NjUyZTY1OWZhYTdk
|
15
|
+
ZmMyZTNiMDY4ZDI4N2Q5OTJjODAyYjJmNjZmYTI0YTk0MjRmYWU=
|
data/README.md
CHANGED
@@ -1,2 +1,60 @@
|
|
1
1
|
# capistrano-shoryuken
|
2
|
-
Shoryuken integration for Capistrano
|
2
|
+
Shoryuken integration for Capistrano. Loosely based on `capistrano-sidekiq`
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
gem 'capistrano-shoryuken', github: 'joekhoobyar/capistrano-shoryuken'
|
9
|
+
|
10
|
+
or:
|
11
|
+
|
12
|
+
gem 'capistrano-shoryuken', group: :development
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
```ruby
|
21
|
+
# Capfile
|
22
|
+
|
23
|
+
require 'capistrano/shoryuken'
|
24
|
+
```
|
25
|
+
|
26
|
+
|
27
|
+
Configurable options, shown here with defaults (using Capistrano 3 syntax):
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# config/deploy.rb
|
31
|
+
|
32
|
+
# Whether or not to hook into the default deployment recipe.
|
33
|
+
set :shoryuken_default_hooks, true
|
34
|
+
|
35
|
+
set :shoryuken_pid, -> { File.join(shared_path, 'tmp', 'pids', 'shoryuken.pid') }
|
36
|
+
set :shoryuken_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
|
37
|
+
set :shoryuken_log, -> { File.join(shared_path, 'log', 'shoryuken.log') }
|
38
|
+
set :shoryuken_config, -> { File.join(release_path, 'config', 'shoryuken.yml') }
|
39
|
+
set :shoryuken_requires, -> { [] }
|
40
|
+
set :shoryuken_options, -> { ['--rails'] }
|
41
|
+
set :shoryuken_queues, -> { [] }
|
42
|
+
set :shoryuken_role, :app
|
43
|
+
```
|
44
|
+
|
45
|
+
## Changelog
|
46
|
+
- 0.1.2: Support --require option.
|
47
|
+
- 0.1.1: Default --rails option. Support Capistrano 3
|
48
|
+
- 0.1.0: Support Capistrano 2
|
49
|
+
|
50
|
+
## Contributors
|
51
|
+
|
52
|
+
- [Joe Khoobyar] (https://github.com/joekhoobyar)
|
53
|
+
|
54
|
+
## Contributing
|
55
|
+
|
56
|
+
1. Fork it
|
57
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
58
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
59
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
60
|
+
5. Create new Pull Request
|
@@ -2,16 +2,17 @@ Capistrano::Configuration.instance.load do
|
|
2
2
|
|
3
3
|
_cset(:shoryuken_default_hooks) { true }
|
4
4
|
|
5
|
-
_cset(:shoryuken_pid)
|
6
|
-
_cset(:shoryuken_env)
|
7
|
-
_cset(:shoryuken_log)
|
8
|
-
_cset(:shoryuken_config)
|
9
|
-
_cset(:
|
10
|
-
_cset(:shoryuken_queues)
|
5
|
+
_cset(:shoryuken_pid) { File.join(shared_path, 'pids', 'shoryuken.pid') }
|
6
|
+
_cset(:shoryuken_env) { fetch(:rack_env, fetch(:rails_env, 'production')) }
|
7
|
+
_cset(:shoryuken_log) { File.join(shared_path, 'log', 'shoryuken.log') }
|
8
|
+
_cset(:shoryuken_config) { "#{current_path}/config/shoryuken.yml" }
|
9
|
+
_cset(:shoryuken_requires) { [] }
|
10
|
+
_cset(:shoryuken_queues) { [] }
|
11
|
+
_cset(:shoryuken_options) { '--rails' }
|
11
12
|
|
12
|
-
_cset(:shoryuken_cmd)
|
13
|
+
_cset(:shoryuken_cmd) { "#{fetch(:bundle_cmd, 'bundle')} exec shoryuken" }
|
13
14
|
|
14
|
-
_cset(:shoryuken_role)
|
15
|
+
_cset(:shoryuken_role) { :app }
|
15
16
|
|
16
17
|
if fetch(:shoryuken_default_hooks)
|
17
18
|
after 'deploy:stop', 'shoryuken:stop'
|
@@ -43,6 +44,7 @@ Capistrano::Configuration.instance.load do
|
|
43
44
|
logfile = fetch(:shoryuken_log) and args.push "--logfile '#{logfile}'"
|
44
45
|
config = fetch(:shoryuken_config) and args.push "--config '#{config}'"
|
45
46
|
queues = Array(fetch(:shoryuken_queues)) and queues.each{|queue| args.push "--queue #{queue}" }
|
47
|
+
reqs = Array(fetch(:shoryuken_requires)) and reqs.each{|req| args.push "--require #{req}" }
|
46
48
|
options = fetch(:shoryuken_options) and args.push Array(options).join(' ')
|
47
49
|
|
48
50
|
cmd = fetch(:shoryuken_cmd)
|
@@ -2,13 +2,15 @@ namespace :load do
|
|
2
2
|
task :defaults do
|
3
3
|
set :shoryuken_default_hooks, -> { true }
|
4
4
|
|
5
|
-
set :shoryuken_pid,
|
6
|
-
set :shoryuken_env,
|
7
|
-
set :shoryuken_log,
|
8
|
-
set :shoryuken_config,
|
9
|
-
set :
|
5
|
+
set :shoryuken_pid, -> { File.join(shared_path, 'tmp', 'pids', 'shoryuken.pid') }
|
6
|
+
set :shoryuken_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
|
7
|
+
set :shoryuken_log, -> { File.join(shared_path, 'log', 'shoryuken.log') }
|
8
|
+
set :shoryuken_config, -> { File.join(release_path, 'config', 'shoryuken.yml') }
|
9
|
+
set :shoryuken_requires, -> { [] }
|
10
|
+
set :shoryuken_queues, -> { [] }
|
11
|
+
set :shoryuken_options, -> { '--rails' }
|
10
12
|
|
11
|
-
set :shoryuken_role,
|
13
|
+
set :shoryuken_role, -> { :app }
|
12
14
|
|
13
15
|
# Rbenv and RVM integration
|
14
16
|
set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(shoryuken))
|
@@ -89,6 +91,7 @@ namespace :shoryuken do
|
|
89
91
|
logfile = fetch(:shoryuken_log) and args.push "--logfile '#{logfile}'"
|
90
92
|
config = fetch(:shoryuken_config) and args.push "--config '#{config}'"
|
91
93
|
queues = Array(fetch(:shoryuken_queues)) and queues.each{|queue| args.push "--queue #{queue}" }
|
94
|
+
reqs = Array(fetch(:shoryuken_requires)) and reqs.each{|req| args.push "--require #{req}" }
|
92
95
|
options = fetch(:shoryuken_options) and args.push Array(options).join(' ')
|
93
96
|
|
94
97
|
with rails_env: fetch(:shoryuken_env) do
|