deprec 2.0.7 → 2.0.8
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/CHANGELOG +5 -0
- data/lib/deprec/capistrano_extensions.rb +14 -21
- data/lib/deprec/recipes/app/passenger.rb +1 -1
- data/lib/deprec/recipes/integrity.rb +1 -0
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -159,29 +159,22 @@ module Deprec2
|
|
159
159
|
def push_configs(app, files)
|
160
160
|
app = app.to_s
|
161
161
|
files.each do |file|
|
162
|
-
# If the file path is relative we will prepend a path to this projects
|
163
|
-
# own config directory for this service.
|
164
|
-
if file[:path][0,1] != '/'
|
165
|
-
full_remote_path = File.join(deploy_to, app, file[:path])
|
166
|
-
else
|
167
|
-
full_remote_path = file[:path]
|
168
|
-
end
|
169
162
|
full_local_path = File.join('config', app, file[:path])
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
# else
|
180
|
-
# # just send them the normal way, it's quicker in parallel
|
163
|
+
if File.exists?(full_local_path)
|
164
|
+
# If the file path is relative we will prepend a path to this projects
|
165
|
+
# own config directory for this service.
|
166
|
+
if file[:path][0,1] != '/'
|
167
|
+
full_remote_path = File.join(deploy_to, app, file[:path])
|
168
|
+
else
|
169
|
+
full_remote_path = file[:path]
|
170
|
+
end
|
171
|
+
sudo "test -d #{File.dirname(full_remote_path)} || sudo mkdir -p #{File.dirname(full_remote_path)}"
|
181
172
|
std.su_put File.read(full_local_path), full_remote_path, '/tmp/', :mode=>file[:mode]
|
182
|
-
|
183
|
-
|
184
|
-
|
173
|
+
sudo "chown #{file[:owner]} #{full_remote_path}"
|
174
|
+
else
|
175
|
+
# Render directly to remote host.
|
176
|
+
render_template(app, file.merge(:remote => true))
|
177
|
+
end
|
185
178
|
end
|
186
179
|
end
|
187
180
|
|
@@ -52,6 +52,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
initial_config_push
|
55
|
+
activate_system
|
55
56
|
|
56
57
|
end
|
57
58
|
|
@@ -61,7 +62,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
61
62
|
SYSTEM_CONFIG_FILES[:passenger].each do |file|
|
62
63
|
deprec2.render_template(:passenger, file.merge(:remote => true))
|
63
64
|
end
|
64
|
-
activate_system
|
65
65
|
end
|
66
66
|
|
67
67
|
# Install dependencies for Passenger
|
@@ -70,6 +70,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
70
70
|
task :config, :roles => :ci do
|
71
71
|
deprec2.push_configs(:integrity, SYSTEM_CONFIG_FILES[:integrity])
|
72
72
|
sudo "chown #{integrity_user} #{integrity_install_dir}/config.ru"
|
73
|
+
activate
|
73
74
|
end
|
74
75
|
|
75
76
|
# XXX Setup database for testing project
|