cap-tasks 0.0.1 → 0.0.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.
- data/lib/cap_tasks/foreman.rb +8 -4
- data/lib/cap_tasks/version.rb +1 -1
- metadata +3 -3
data/lib/cap_tasks/foreman.rb
CHANGED
|
@@ -10,10 +10,14 @@ Capistrano::Configuration.instance(true).load do
|
|
|
10
10
|
foreman_args = [
|
|
11
11
|
"--app #{app_name}",
|
|
12
12
|
"--user #{fetch(:user)}",
|
|
13
|
-
"--env #{release_path}/config/deploy/#{stage}.env",
|
|
14
13
|
"--log #{shared_path}/log"
|
|
15
14
|
]
|
|
16
15
|
|
|
16
|
+
foreman_env_path = "config/deploy/#{stage}.env"
|
|
17
|
+
if File.exists?(foreman_env_path)
|
|
18
|
+
foreman_args << "--env #{release_path}/#{foreman_env_path}"
|
|
19
|
+
end
|
|
20
|
+
|
|
17
21
|
if exists?(:foreman_concurrency)
|
|
18
22
|
foreman_args << "--concurrency #{fetch(:foreman_concurrency)}"
|
|
19
23
|
end
|
|
@@ -27,17 +31,17 @@ Capistrano::Configuration.instance(true).load do
|
|
|
27
31
|
|
|
28
32
|
desc "Start services in Procfile."
|
|
29
33
|
task :start, :roles => :worker do
|
|
30
|
-
run "#{sudo} start #{fetch(:
|
|
34
|
+
run "#{sudo} start #{fetch(:application)}"
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
desc "Stop services in Procfile."
|
|
34
38
|
task :stop, :roles => :worker do
|
|
35
|
-
run "#{sudo} start #{fetch(:
|
|
39
|
+
run "#{sudo} start #{fetch(:application)}"
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
desc "Restart services in Procfile."
|
|
39
43
|
task :restart, :roles => :worker do
|
|
40
|
-
app_name = fetch(:
|
|
44
|
+
app_name = fetch(:application)
|
|
41
45
|
run "#{sudo} stop #{app_name}; #{sudo} start #{app_name}"
|
|
42
46
|
end
|
|
43
47
|
end
|
data/lib/cap_tasks/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cap-tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
90
90
|
version: '0'
|
|
91
91
|
segments:
|
|
92
92
|
- 0
|
|
93
|
-
hash:
|
|
93
|
+
hash: -4451339206176015584
|
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
none: false
|
|
96
96
|
requirements:
|
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
99
99
|
version: '0'
|
|
100
100
|
segments:
|
|
101
101
|
- 0
|
|
102
|
-
hash:
|
|
102
|
+
hash: -4451339206176015584
|
|
103
103
|
requirements: []
|
|
104
104
|
rubyforge_project:
|
|
105
105
|
rubygems_version: 1.8.25
|