uatu 0.6.1 → 0.6.2
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/lib/uatu.rb +6 -6
- metadata +1 -1
data/lib/uatu.rb
CHANGED
@@ -32,8 +32,8 @@ private
|
|
32
32
|
puts "Changed %s" % [paths]
|
33
33
|
|
34
34
|
if paths.any? { |p| include? p }
|
35
|
-
run_script
|
36
|
-
run_command
|
35
|
+
run_script paths if @options[:script]
|
36
|
+
run_command paths if @options[:cmd]
|
37
37
|
@last_update = Time.now
|
38
38
|
end
|
39
39
|
end
|
@@ -54,17 +54,17 @@ private
|
|
54
54
|
@last_update + @options[:time] <= Time.now
|
55
55
|
end
|
56
56
|
|
57
|
-
def run_script(
|
57
|
+
def run_script(change_paths)
|
58
58
|
puts "Triggered '%s'" % [@options[:script]]
|
59
59
|
fork do
|
60
|
-
exec("%s %s" % [@options[:script],
|
60
|
+
exec("%s %s" % [@options[:script], change_paths.join(' ')])
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
def run_command(
|
64
|
+
def run_command(change_paths)
|
65
65
|
puts "Triggered '%s'" % [@options[:cmd]]
|
66
66
|
fork do
|
67
|
-
exec(@options[:cmd] % [
|
67
|
+
exec(@options[:cmd] % [change_paths.join(' ')])
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|