lib/capistrano/recipes/deploy/strategy/local_copy.rb in capsaicin-0.1.8 vs lib/capistrano/recipes/deploy/strategy/local_copy.rb in capsaicin-0.1.9
- old
+ new
@@ -1,14 +1,14 @@
require 'capistrano/recipes/deploy/strategy/base'
require 'tempfile'
-module Capistrano
- module Deploy
- module Strategy
- class LocalCopy < Base
+module Capistrano # :nodoc:
+ module Deploy # :nodoc:
+ module Strategy # :nodoc:
+ class LocalCopy < Base # :nodoc:
- def deploy!
+ def deploy! # :nodoc:
logger.debug "compressing local copy to #{filename}"
local_files.tar_cz filename, '.', :verbose=>false do |item|
if (item=item[2..-1]) and item.length > 0
name = File.basename item
name == "." || name == ".." || copy_prune.include?(name) ||
@@ -26,39 +26,39 @@
ensure
FileUtils.rm filename rescue nil
FileUtils.rm_rf destination rescue nil
end
- def check!
+ def check! # :nodoc:
end
private
- def local_copy_dir
+ def local_copy_dir # :nodoc:
@local_copy_dir ||= configuration.fetch(:local_copy_dir, '.')
end
- def copy_exclude
+ def copy_exclude # :nodoc:
@copy_exclude ||= Array(configuration.fetch(:copy_exclude, %w(.*)))
end
- def copy_prune
+ def copy_prune # :nodoc:
@copy_prune ||= Array(configuration.fetch(:copy_exclude, %w(.svn .git)))
end
- def copy_directory_only
+ def copy_directory_only # :nodoc:
@copy_directory_only ||= Array(configuration.fetch(:copy_directory_only, %w(log tmp)))
end
- def filename
+ def filename # :nodoc:
@filename ||= File.join(Dir.tmpdir, "#{configuration.fetch(:application, 'local_copy')}.tgz")
end
- def remote_dir
+ def remote_dir # :nodoc:
@remote_dir ||= configuration[:copy_remote_dir] || "/tmp"
end
- def remote_filename
+ def remote_filename # :nodoc:
@remote_filename ||= File.join(remote_dir, File.basename(filename))
end
end
end