lib/ash/common.rb in capistrano-ash-1.3.3 vs lib/ash/common.rb in capistrano-ash-1.3.4

- old
+ new

@@ -24,11 +24,11 @@ # Check if a directory exists by providing the full path to the expected location def local_dir_exists?(full_path) File.directory?(full_path) end -# Test to see if a file exists by providing +# Test to see if a file exists by providing # the full path to the expected file location def remote_file_exists?(full_path) 'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip end @@ -40,14 +40,14 @@ # +dir_path+ def remote_dir_exists?(dir_path) 'true' == capture("if [[ -d #{dir_path} ]]; then echo 'true'; fi").strip end -# set the permissions for files recurisvely from the starting directory (dir_path) +# set the permissions for files recurisvely from the starting directory (dir_path) def set_perms_files(dir_path, perm = 644) try_sudo "find #{dir_path} -type f -print0 | xargs -0 chmod #{perm}" end -# set the permissions for directories recurisvely from the starting directory (dir_path) +# set the permissions for directories recurisvely from the starting directory (dir_path) def set_perms_dirs(dir_path, perm = 755) - try_sudo "find #{dir_path} -type d -print0 | xargs -0 chmod #{perm}" + try_sudo "find #{dir_path} -type d -print0 | xargs -0 chmod #{perm}" if File.directory?(dir_path) end