capistrano3-delayed-job 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd898a2c65a8b55b2a490c7b283c014ac9102b70
4
- data.tar.gz: 7ae3563d450af6d46bffcaeab1c214b056ec4803
3
+ metadata.gz: 77a24920733ed73310cf1e7dc67b1d292c69be8a
4
+ data.tar.gz: a680cae89fee85459df187d9a7db653cd1b5a0a7
5
5
  SHA512:
6
- metadata.gz: f9c51a3b08ccd9fb1c670c6f990ea7f06f5f794dbe81c3ce3871d9d8b16b1db1f251996998dc8f23024663469bbde4d95208027931351cf7f39f233ab1dcd0b3
7
- data.tar.gz: 7af954d575c312cc6e3ccb89125f43f284ab2e20de1b63be6c61cd1a386013e5b2424f9d75445ac76ba4cee3678c5308390d08f0af484d873f6b64776782fd1f
6
+ metadata.gz: 5a012ebf0aac651a4c6ecfc285f18c7946d4126954c2eea861203e31b22cc7a446b50a201d3c4f8452622d4850b81028fe035804bb0aaf352376a8cc605a0b62
7
+ data.tar.gz: a33a1905e0f370303f0443dd009b9a54fc658b126f8be69f1195041468b60e0cf08645ca0966d8c6928d5eed8c36c18d120209905df216bac2c6f63d63740d35
data/README.md CHANGED
@@ -57,6 +57,11 @@ set :delayed_job_pool, {
57
57
  # Set the roles where the delayed_job process should be started
58
58
  # default value: :app
59
59
  set :delayed_job_roles, [:app, :background]
60
+
61
+ # Set the location of the delayed_job executable
62
+ # Can be relative to the release_path or absolute
63
+ # default value 'bin'
64
+ set :delayed_job_bin_path: 'scripts' # for rails 3.x
60
65
  ```
61
66
 
62
67
  It also adds the following hook
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano3-delayed-job"
7
- spec.version = "1.0.1"
7
+ spec.version = "1.1.0"
8
8
  spec.authors = ["Juan Ignacio Donoso", "Agustin Feuerhake", "Ignacio Baixas"]
9
9
  spec.email = ["juan.ignacio@platan.us", "agustin@platan.us", "ignacio@platanus"]
10
10
  spec.summary = %q{Adds support for delayed_jobs to Capistrano 3.x}
@@ -3,7 +3,7 @@ namespace :delayed_job do
3
3
  def args
4
4
  args = ""
5
5
  args += "-n #{fetch(:delayed_job_workers)}" unless fetch(:delayed_job_workers).nil?
6
- args += "--queues=#{fetch(:delayed_job_queues).join(',')}" unless fetch(:delayed_job_queues).nil?
6
+ args += " --queues=#{fetch(:delayed_job_queues).join(',')} " unless fetch(:delayed_job_queues).nil?
7
7
  args += fetch(:delayed_job_pool).map {|k,v| "--pool=#{k}:#{v}"}.join(' ') unless fetch(:delayed_job_pool).nil?
8
8
  args
9
9
  end
@@ -12,12 +12,16 @@ namespace :delayed_job do
12
12
  fetch(:delayed_job_roles)
13
13
  end
14
14
 
15
+ def delayed_job_bin
16
+ Pathname.new(fetch(:delayed_job_bin_path)).join('delayed_job')
17
+ end
18
+
15
19
  desc 'Stop the delayed_job process'
16
20
  task :stop do
17
21
  on roles(delayed_job_roles) do
18
22
  within release_path do
19
23
  with rails_env: fetch(:rails_env) do
20
- execute :bundle, :exec, :'script/delayed_job', :stop
24
+ execute :bundle, :exec, delayed_job_bin, :stop
21
25
  end
22
26
  end
23
27
  end
@@ -28,7 +32,7 @@ namespace :delayed_job do
28
32
  on roles(delayed_job_roles) do
29
33
  within release_path do
30
34
  with rails_env: fetch(:rails_env) do
31
- execute :bundle, :exec, :'script/delayed_job', args, :start
35
+ execute :bundle, :exec, delayed_job_bin, args, :start
32
36
  end
33
37
  end
34
38
  end
@@ -39,7 +43,7 @@ namespace :delayed_job do
39
43
  on roles(delayed_job_roles) do
40
44
  within release_path do
41
45
  with rails_env: fetch(:rails_env) do
42
- execute :bundle, :exec, :'script/delayed_job', args, :restart
46
+ execute :bundle, :exec, delayed_job_bin, args, :restart
43
47
  end
44
48
  end
45
49
  end
@@ -57,5 +61,6 @@ namespace :load do
57
61
  set :delayed_job_queues, nil
58
62
  set :delayed_job_pool, nil
59
63
  set :delayed_job_roles, :app
64
+ set :delayed_job_bin_path, 'bin'
60
65
  end
61
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-delayed-job
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ignacio Donoso
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-13 00:00:00.000000000 Z
13
+ date: 2014-12-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capistrano