Class: CapistranoEvroneRecipes::Util
- Inherits:
-
Object
- Object
- CapistranoEvroneRecipes::Util
- Defined in:
- lib/capistrano_evrone_recipes/util.rb
Class Method Summary collapse
- .changed?(cap, path, options = {}) ⇒ Boolean
- .ensure_changed_remote_dirs(cap, path) ⇒ Object
- .ensure_changed_remote_files(cap, path) ⇒ Object
Class Method Details
.changed?(cap, path, options = {}) ⇒ Boolean
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/capistrano_evrone_recipes/util.rb', line 12 def changed?(cap, path, = {}) r = [:recursive] ? "-r" : "" %{ test -e #{cap.previous_release}/#{path} && diff #{r} #{cap.previous_release}/#{path} #{cap.latest_release}/#{path} > /dev/null ; ST=$? ; if [ $ST -eq 0 ] ; then echo -n '----> #{path} is not changed' ; else echo -n '----> #{path} is changed' ; fi }.compact end |
.ensure_changed_remote_dirs(cap, path) ⇒ Object
4 5 6 |
# File 'lib/capistrano_evrone_recipes/util.rb', line 4 def ensure_changed_remote_dirs(cap, path) yield end |
.ensure_changed_remote_files(cap, path) ⇒ Object
8 9 10 |
# File 'lib/capistrano_evrone_recipes/util.rb', line 8 def ensure_changed_remote_files(cap, path) yield end |