elocal_capistrano 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elocal_capistrano/version.rb +1 -1
- data/lib/tasks/upstart.rake +17 -14
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b779ac46b4fa07441c31d4a0b4f4237159c5053e
|
4
|
+
data.tar.gz: f908bc9469ef3ac724d565a2b51525c9df4e7529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8cf4923dca33a942af2ce6dbaf1fb647bf0eb716a271f60df483d2e3055ed5d87c2269112066cab31ceab9756cdbc289b393004d0b25f4dfbcd332bc8e04ced
|
7
|
+
data.tar.gz: 4ac02db8ee335134649a0d38c64408e9726cfe98ef6ddcd965ac3784176aba5d67cc7658d138dfd8746a00e6f001192208cbc1d7cd03e21462226adaff6397ca
|
data/lib/tasks/upstart.rake
CHANGED
@@ -2,6 +2,7 @@ namespace :load do
|
|
2
2
|
task :defaults do
|
3
3
|
set :puma_application_name, -> { "#{fetch(:application)}_puma" }
|
4
4
|
set :delayed_job_application_name, -> { "#{fetch(:application)}_delayed_job" }
|
5
|
+
set :shoryuken_application_name, -> { "#{fetch(:application)}_shoryuken" }
|
5
6
|
end
|
6
7
|
end
|
7
8
|
|
@@ -39,23 +40,25 @@ namespace :upstart do
|
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
%i(delayed_job shoryuken).each do |task_name|
|
44
|
+
namespace task_name do
|
45
|
+
%w(start stop status).each do |t|
|
46
|
+
desc "Perform #{t} of the #{task_name} service"
|
47
|
+
task t do
|
48
|
+
on release_roles :app do
|
49
|
+
sudo t, fetch(:"#{task_name}_application_name")
|
50
|
+
end
|
48
51
|
end
|
49
52
|
end
|
50
|
-
end
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
desc 'Perform a restart of the application #{task_name} service'
|
55
|
+
task :restart do
|
56
|
+
on release_roles :app do
|
57
|
+
job_name = fetch(:"#{task_name}_application_name")
|
58
|
+
execute <<-CMD.strip
|
59
|
+
pid=`status #{job_name} | grep -o -E '[0-9]+'`; if [ -z $pid ]; then sudo start #{job_name}; else sudo restart #{job_name}; fi
|
60
|
+
CMD
|
61
|
+
end
|
59
62
|
end
|
60
63
|
end
|
61
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elocal_capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Di Marco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,9 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.4.
|
82
|
+
rubygems_version: 2.4.8
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Common eLocal Capistrano tasks
|
86
86
|
test_files: []
|
87
|
-
has_rdoc:
|