capistrano-unformatt 2.0 → 2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/capistrano-unformatt.gemspec +1 -1
- data/lib/capistrano/tasks/setup.rake +30 -30
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd2d1f6e3286697ea327d825b0ac10896feacb19
|
4
|
+
data.tar.gz: 1a619611105567559684c4dd92ca150f5b47f913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfc4f5d1f8acfe764506aef882d1b466b5b33f3188f0b146fdadefb864d83529fbf4884a906f6355d355f21a4f2ead18db8b7f647c96ffa8c7b1b96ea187ea52
|
7
|
+
data.tar.gz: c9115b1c04a76a403ed557376922b9e260df5445f004629c4bfdead75a1e34e452e43e1d3f47853b0e3c64a11143036c4dd9d97f89efb73c7e2308c52556848a
|
data/CHANGELOG.md
CHANGED
@@ -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 = "capistrano-unformatt"
|
7
|
-
spec.version = '2.
|
7
|
+
spec.version = '2.1'
|
8
8
|
spec.authors = ["unformatt"]
|
9
9
|
spec.email = ["unformatt@gmail.com"]
|
10
10
|
spec.description = "Custom recipes for Unformatt projects"
|
@@ -1,39 +1,41 @@
|
|
1
1
|
namespace :deploy do
|
2
2
|
namespace :install do
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
task yaml do
|
7
|
-
append :templating_paths, File.expand_path('../../../vendor/templates', File.dirname(__FILE__))
|
3
|
+
desc "Creates config for yml"
|
4
|
+
task :yaml, :command do |task, args|
|
5
|
+
append :templating_paths, File.expand_path('../../../vendor/templates', File.dirname(__FILE__))
|
8
6
|
|
9
|
-
|
10
|
-
|
7
|
+
on roles :app do
|
8
|
+
execute "mkdir -p #{shared_path}/{config,tmp,log,pids}"
|
11
9
|
|
12
|
-
|
13
|
-
|
10
|
+
yamls = fetch(:setup_yamls, [])
|
11
|
+
yamls.keep_if { |x| args[:command].split('/').map(&:strip).include?(x.to_s) }
|
12
|
+
|
13
|
+
yamls.each do |yaml|
|
14
|
+
template "#{yaml}.yml.erb", "#{shared_path}/config/#{yaml}.yml"
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
task daemon do
|
22
|
-
append :templating_paths, File.expand_path('../../../vendor/templates', File.dirname(__FILE__))
|
23
|
-
|
24
|
-
on roles :app do
|
25
|
-
execute "mkdir -p #{shared_path}/{config,tmp,log,pids}"
|
19
|
+
desc "Creates config for daemon"
|
20
|
+
task :daemon, :command do |task, args|
|
21
|
+
append :templating_paths, File.expand_path('../../../vendor/templates', File.dirname(__FILE__))
|
26
22
|
|
27
|
-
|
28
|
-
|
29
|
-
end
|
23
|
+
on roles :app do
|
24
|
+
execute "mkdir -p #{shared_path}/{config,tmp,log,pids}"
|
30
25
|
|
31
|
-
|
32
|
-
|
26
|
+
daemons = fetch(:setup_daemons, [])
|
27
|
+
daemons.keep_if { |x| args[:command].split('/').map(&:strip).include?(x[:name].to_s) }
|
33
28
|
|
34
|
-
|
35
|
-
|
29
|
+
daemons.each do |daemon|
|
30
|
+
if daemon[:config] == true
|
31
|
+
template "#{daemon[:name]}.rb.erb", "#{shared_path}/config/#{daemon[:name]}.rb", 0644
|
36
32
|
end
|
33
|
+
|
34
|
+
template "#{daemon[:name]}.daemon.erb", "#{shared_path}/tmp/#{daemon[:name]}.daemon", 0755
|
35
|
+
execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.daemon #{fetch(:daemons_path)}/#{fetch(:application)}-#{daemon[:name]}"
|
36
|
+
|
37
|
+
template "#{daemon[:name]}.monit.erb", "#{shared_path}/tmp/#{daemon[:name]}.monit", 0644
|
38
|
+
execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.monit #{fetch(:monit_scripts_path)}/#{fetch(:application)}-#{daemon[:name]}"
|
37
39
|
end
|
38
40
|
end
|
39
41
|
end
|
@@ -54,15 +56,13 @@ namespace :deploy do
|
|
54
56
|
desc "Creates all project files."
|
55
57
|
task :all do
|
56
58
|
unless ENV['SKIP_YAMLS'] == 'true'
|
57
|
-
fetch(:setup_yamls, []).
|
58
|
-
|
59
|
-
end
|
59
|
+
yaml_names_param = fetch(:setup_yamls, []).map { |x| x.to_s }.join('/')
|
60
|
+
invoke "deploy:install:yaml[#{yaml_names_param}]"
|
60
61
|
end
|
61
62
|
|
62
63
|
unless ENV['SKIP_DAEMONS'] == 'true'
|
63
|
-
fetch(:setup_daemons, []).
|
64
|
-
|
65
|
-
end
|
64
|
+
daemon_names_param = fetch(:setup_daemons, []).map { |x| x[:name].to_s }.join('/')
|
65
|
+
invoke "deploy:install:daemon[#{daemon_names_param}]"
|
66
66
|
end
|
67
67
|
|
68
68
|
if fetch(:setup_nginx, false) == true
|