ms_deploy 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ms_deploy/recipes/nginx.rb +14 -18
- data/lib/ms_deploy/version.rb +1 -1
- metadata +2 -2
@@ -49,32 +49,28 @@ Capistrano::Configuration.instance.load do
|
|
49
49
|
'serve_static_files' => fetch(:serve_static_files, true),
|
50
50
|
}
|
51
51
|
|
52
|
+
sites_path = fetch(:nginx_sites_enabled_path, "/etc/nginx/sites-enabled")
|
53
|
+
|
52
54
|
if protocol.nil? or protocol == 'http' or protocol == 'both'
|
53
55
|
config_path = "#{shared_path}/config/#{application}_vhost.conf"
|
54
56
|
|
55
|
-
|
56
|
-
|
57
|
-
if protocol.nil? or protocol == 'http' or protocol == 'both'
|
58
|
-
config_path = "#{shared_path}/config/#{application}_vhost.conf"
|
59
|
-
|
60
|
-
put(render_erb_template(template_path, vars), config_path)
|
57
|
+
put(render_erb_template(template_path, vars), config_path)
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
end
|
59
|
+
with_user(fetch(:setup_user, user)) do
|
60
|
+
try_sudo "rm -f #{sites_path}/#{application}_#{stage}.conf"
|
61
|
+
try_sudo "ln -s #{config_path} #{sites_path}/#{application}_#{stage}.conf"
|
66
62
|
end
|
67
|
-
|
68
|
-
|
63
|
+
end
|
64
|
+
if protocol == 'https' or protocol == 'both'
|
65
|
+
vars.merge!({'protocol' => 'https'})
|
69
66
|
|
70
|
-
|
67
|
+
config_path = "#{shared_path}/config/#{application}_ssl_vhost.conf"
|
71
68
|
|
72
|
-
|
69
|
+
put(render_erb_template(template_path, vars), config_path)
|
73
70
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
end
|
71
|
+
with_user(fetch(:setup_user, user)) do
|
72
|
+
try_sudo "rm -f #{sites_path}/#{application}_#{stage}_ssl.conf"
|
73
|
+
try_sudo "ln -s #{config_path} #{sites_path}/#{application}_#{stage}_ssl.conf"
|
78
74
|
end
|
79
75
|
end
|
80
76
|
end
|
data/lib/ms_deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gemcutter
|