capistrano3-delayed-job 1.7.2 → 1.7.3

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: 208242ae221650f600d11e49bcef622b4a2f8ff2
4
- data.tar.gz: 5a00c1528b2fd8bd1a27ff9bca1674d118a4aafa
3
+ metadata.gz: 8695030201916e5d7ee2fc013b575eb49d6b6fbc
4
+ data.tar.gz: 579d7a880bfb07b87b5391ffd4be995bf2e2506c
5
5
  SHA512:
6
- metadata.gz: b9641db7e60e0cc30e962ff5541be6930218bca13cf7ba788c52222a20cbd66158480c39365c37a740252d5db087fa1e63e064380fc89e87d974084825d1d124
7
- data.tar.gz: 47689dd4119cd20311ce29f1fa76f1663c66a8ed391385c65b1bbfbfb9b0df6ec2f7f6f1441f8df192fecfb4f696aff1cfc4d62fb19b2b7dd4fa566d68feeef3
6
+ metadata.gz: cf85dce5eaa6b9aac31e7e24a53e809a0a3cd1faa781c16f33173fa6cc9719b536d4c1fd373210d624d67090dad5cc11167f356c0466746f9f71327825086db6
7
+ data.tar.gz: a2da0ccad039e29fbd8baada6cb1542a27123bdbb2e403bf1bc0b3e505a126d76e6283125bd77b364f17c77fc71af2b9116a7f0328dd90bf1e0181c9a841c3c4
data/README.md CHANGED
@@ -105,19 +105,25 @@ set :delayed_job_roles, [:app, :background]
105
105
  # set :delayed_job_pid_dir, 'path_to_pid_dir'
106
106
  ```
107
107
 
108
- It also adds the following hook
108
+ It also conditionally adds the following hook:
109
109
 
110
110
  ```ruby
111
- after 'deploy:published', 'delayed_job:restart' do
112
- invoke 'delayed_job:restart'
113
- end
111
+ if Rake::Task.task_defined?('deploy:published')
112
+ after 'deploy:published', 'delayed_job:restart'
113
+ end
114
+ ```
115
+
116
+ You can disable default hook by setting `delayed_job_default_hooks` to `false`. (It still gets _defined_, but will not do anything when called.)
117
+
118
+ ```ruby
119
+ set :delayed_job_default_hooks, false
114
120
  ```
115
121
 
116
122
  Following setting is recommended to avoid stop/restart problem.
117
123
  See [Issue #16](https://github.com/platanus/capistrano3-delayed-job/issues/16) or [PR #22](https://github.com/platanus/capistrano3-delayed-job/pull/22) for more detail.
118
124
 
119
125
  ```ruby
120
- set: linked_dirs, %w(tmp/pids)
126
+ set :linked_dirs, %w(tmp/pids)
121
127
 
122
128
  # or
123
129
 
@@ -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.7.2"
7
+ spec.version = "1.7.3"
8
8
  spec.authors = ["Rob Biedenharn",
9
9
  "Juan Ignacio Donoso",
10
10
  "Agustin Feuerhake",
@@ -24,7 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency 'capistrano', '~> 3.0', '>= 3.0.0'
27
+ spec.add_dependency 'daemons', '~> 1.2.4'
27
28
 
28
- spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rake", ">= 10.0"
29
30
  spec.add_development_dependency "rubocop", "~> 0.0", '>= 0.39.0'
30
31
  end
@@ -63,19 +63,20 @@ namespace :delayed_job do
63
63
 
64
64
  desc 'Restart the delayed_job process'
65
65
  task :restart do
66
- on roles(delayed_job_roles) do
67
- within release_path do
68
- with rails_env: fetch(:rails_env) do
69
- execute :bundle, :exec, delayed_job_bin, delayed_job_args, :restart
66
+ if fetch(:delayed_job_default_hooks)
67
+ on roles(delayed_job_roles) do
68
+ within release_path do
69
+ with rails_env: fetch(:rails_env) do
70
+ execute :bundle, :exec, delayed_job_bin, delayed_job_args, :restart
71
+ end
70
72
  end
71
73
  end
72
74
  end
73
75
  end
74
76
 
75
- after 'deploy:published', 'delayed_job:restart' do
76
- invoke 'delayed_job:restart'
77
+ if Rake::Task.task_defined?('deploy:published')
78
+ after 'deploy:published', 'delayed_job:restart'
77
79
  end
78
-
79
80
  end
80
81
 
81
82
  namespace :load do
@@ -86,5 +87,6 @@ namespace :load do
86
87
  set :delayed_job_roles, :app
87
88
  set :delayed_job_bin_path, 'bin'
88
89
  set :delayed_job_monitor, nil
90
+ set :delayed_job_default_hooks, true
89
91
  end
90
92
  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.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Biedenharn
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-04-28 00:00:00.000000000 Z
14
+ date: 2017-01-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capistrano
@@ -34,17 +34,31 @@ dependencies:
34
34
  - !ruby/object:Gem::Version
35
35
  version: 3.0.0
36
36
  - !ruby/object:Gem::Dependency
37
- name: rake
37
+ name: daemons
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 1.2.4
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 1.2.4
50
+ - !ruby/object:Gem::Dependency
51
+ name: rake
52
+ requirement: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
41
55
  - !ruby/object:Gem::Version
42
56
  version: '10.0'
43
57
  type: :development
44
58
  prerelease: false
45
59
  version_requirements: !ruby/object:Gem::Requirement
46
60
  requirements:
47
- - - "~>"
61
+ - - ">="
48
62
  - !ruby/object:Gem::Version
49
63
  version: '10.0'
50
64
  - !ruby/object:Gem::Dependency
@@ -109,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
123
  version: '0'
110
124
  requirements: []
111
125
  rubyforge_project:
112
- rubygems_version: 2.5.1
126
+ rubygems_version: 2.6.8
113
127
  signing_key:
114
128
  specification_version: 4
115
129
  summary: Adds support for delayed_jobs to Capistrano 3.x