Class: Capistrano::Deploy::Strategy::CopyPackage
- Inherits:
-
Copy
- Object
- Copy
- Capistrano::Deploy::Strategy::CopyPackage
- Defined in:
- lib/capistrano/recipes/deploy/strategy/copy_package.rb
Overview
Specialized copy strategy that expects the compressed package to exist after the source is built.
Instance Method Summary collapse
-
#package_file ⇒ Object
Returns the location of the local package file.
-
#package_name ⇒ Object
Returns the package name.
Instance Method Details
#package_file ⇒ Object
Returns the location of the local package file. Returns nil
unless :package_file has been set. If :package_file is true
, a default file location will be returned.
13 14 15 16 17 18 19 |
# File 'lib/capistrano/recipes/deploy/strategy/copy_package.rb', line 13 def package_file @package_file ||= begin file = configuration[:package_file] file = "#{package_name}.#{compression.extension}" if TrueClass === file File.(configuration[:package_file], copy_dir) rescue nil end end |
#package_name ⇒ Object
Returns the package name. Used as a default basename for :package_file
22 23 24 |
# File 'lib/capistrano/recipes/deploy/strategy/copy_package.rb', line 22 def package_name @package_name ||= configuration[:package_name] || "#{configuration[:application]}-#{File.basename(destination)}" end |