capistrano-shoryuken 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDZmODU5ZjljNGE4N2NkMWI2MjcyN2NhM2I1YjZlMTYzMTU3MTE5ZA==
4
+ Y2JiMTM3NzliMDhhNzA4ZWYzYzkyMTRmOGZiYWJiMjUxZTYzYzllNw==
5
5
  data.tar.gz: !binary |-
6
- MjgwMTVjMmYzOWNkN2E5MzY5NDE1YmM5ODRiMDRiMTc2MzM1OTcwMg==
6
+ MzZmYzViOTM1YTYwNGJkMWNmN2MxZTBiZjA4MTdkOTM1YTMyZDcxOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YWNhMTY0ZWRkZjU3MGNkYTQxY2ZhMjU2NzVmMWIzYTUyZDM1YTIzNmYzMGNk
10
- NDJjYjcyODllM2I4NDU5N2JmMTBmMzczOWJhM2RmNWYzNzdmN2Q1MWIzOWZh
11
- NWVkOWQ5NjI2NzdiMmMzOGEwZmIxMWViMDJiNmEzM2M4MTczYzY=
9
+ MDZhNjMzYjU1NzUzMjc4NmQwMzczNjQyMWYzNDEyNjIwYWE5MzQxZDIwZGEw
10
+ NTEwYTllYTdjNjQxNzA3YTk3Yjg1NjIxMzI5N2Y0YjQ3NGNlODkwMDI4NDZk
11
+ MDkxZmFjNDIxODhiMWMxN2FjZmUxMTNjYTBhYTJlZGY0YjY0ODk=
12
12
  data.tar.gz: !binary |-
13
- ZjRjZDdlNTJhODcxOGE5OTE4ZGM3NmI4OTNmYmY5ZmFiODdjYTJiZWZmNGNl
14
- MWRlYTg0NGY2YTgzN2I2NDJlMmE5YWRkNWYxYjlmMDlhYzNhMzU0NTdiZGQw
15
- ODNiOGJkOTMzNjQxZWZhNmRjOGM4ODk3OTFlMzc5ZDZmNmE1YjQ=
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
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Shoryuken
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
@@ -2,16 +2,17 @@ Capistrano::Configuration.instance.load do
2
2
 
3
3
  _cset(:shoryuken_default_hooks) { true }
4
4
 
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_options) { '--rails' }
10
- _cset(:shoryuken_queues) { nil }
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) { "#{fetch(:bundle_cmd, 'bundle')} exec shoryuken" }
13
+ _cset(:shoryuken_cmd) { "#{fetch(:bundle_cmd, 'bundle')} exec shoryuken" }
13
14
 
14
- _cset(:shoryuken_role) { :app }
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, -> { 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_options, -> { '--rails' }
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, -> { :app }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-shoryuken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Khoobyar