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 CHANGED
@@ -1,5 +1,10 @@
1
1
  == git
2
2
 
3
+ == 2.0.8 (March 17, 2009)
4
+
5
+ * :config task now renders configs directly to remote server if locally
6
+ rendered versions (from :config_gen task) do not exist.
7
+
3
8
  == 2.0.7 (March 17, 2009)
4
9
 
5
10
  * bugfix
@@ -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
- sudo "test -d #{File.dirname(full_remote_path)} || sudo mkdir -p #{File.dirname(full_remote_path)}"
171
- #
172
- # XXX work this in to check for per-host variants of config files
173
- #
174
- # if any variants of this file exist for this host (they have -hostname at end)
175
- # servers = find_servers_for_task(current_task)
176
- # servers.each do |server|
177
- # puts server(..., :hosts => server) # XXX find a way to restrict su_put to one host
178
- # end
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
- # end
183
- #
184
- sudo "chown #{file[:owner]} #{full_remote_path}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bailey