le1t0-deprec 2.1.6.073 → 2.1.6.074

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,7 +49,7 @@ module Deprec2
49
49
  local_file_full_path = (File.exists?(File.join('config', stage, hostname, app.to_s, local_file)) ?
50
50
  File.join('config', stage, hostname, app.to_s, local_file) :
51
51
  File.join('config', stage, app.to_s, local_file))
52
- puts `diff -u #{local_file_full_path} #{tmp_file}`
52
+ puts `diff -u #{local_file_full_path} #{tmp_file}` if File.exists?(local_file_full_path)
53
53
  FileUtils.rm_f(tmp_file)
54
54
  end
55
55
  FileUtils.rmdir(tmpdir)
@@ -99,6 +99,16 @@ Capistrano::Configuration.instance(:must_exist).load do
99
99
  end
100
100
  end
101
101
  end
102
+
103
+ task :diff_config do
104
+ top.deprec.namespaces.keys.each do |ns_name|
105
+ ns = top.deprec.send(ns_name)
106
+ recipe_declared_roles = ns.tasks.collect { |k,v| v.options.has_key?(:roles) ? v.options[:roles] : nil }.compact.flatten.uniq
107
+ if recipe_declared_roles.any? { |role| self.roles.keys.include?(role) } && !Dir["config/#{stage}/**/#{ns_name}"].empty?
108
+ ns.send(:diff_config)
109
+ end
110
+ end
111
+ end
102
112
 
103
113
  task :dump do
104
114
  require 'yaml'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: le1t0-deprec
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.1.6.073
5
+ version: 2.1.6.074
6
6
  platform: ruby
7
7
  authors:
8
8
  - Le1t0
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-28 00:00:00 +01:00
13
+ date: 2011-03-01 00:00:00 +01:00
14
14
  default_executable: depify
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency