Class: Nanoc::Deploying::Deployer Abstract Private
- Inherits:
-
Object
- Object
- Nanoc::Deploying::Deployer
- Extended by:
- DDPlugin::Plugin
- Defined in:
- lib/nanoc/deploying/deployer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Subclass and override #run to implement a custom filter.
Represents a deployer, an object that allows uploading the compiled site to a specific (remote) location.
Direct Known Subclasses
Nanoc::Deploying::Deployers::Fog, Nanoc::Deploying::Deployers::Git, Nanoc::Deploying::Deployers::Rsync
Instance Attribute Summary collapse
-
#config ⇒ Hash
readonly
private
The deployer configuration.
-
#dry_run ⇒ Boolean
(also: #dry_run?)
readonly
private
True if the deployer should only show what would be deployed instead of doing the actual deployment.
-
#source_path ⇒ String
readonly
private
The path to the directory that contains the files to upload.
Instance Method Summary collapse
-
#initialize(source_path, config, dry_run: false) ⇒ Hash
constructor
private
Config The deployer configuration.
-
#run ⇒ Object
abstract
private
Performs the actual deployment.
Constructor Details
#initialize(source_path, config, dry_run: false) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns config The deployer configuration.
33 34 35 36 37 |
# File 'lib/nanoc/deploying/deployer.rb', line 33 def initialize(source_path, config, dry_run: false) @source_path = source_path @config = config @dry_run = dry_run end |
Instance Attribute Details
#config ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The deployer configuration.
19 20 21 |
# File 'lib/nanoc/deploying/deployer.rb', line 19 def config @config end |
#dry_run ⇒ Boolean (readonly) Also known as: dry_run?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if the deployer should only show what would be deployed instead of doing the actual deployment.
23 24 25 |
# File 'lib/nanoc/deploying/deployer.rb', line 23 def dry_run @dry_run end |
#source_path ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The path to the directory that contains the files to upload. It should not have a trailing slash.
16 17 18 |
# File 'lib/nanoc/deploying/deployer.rb', line 16 def source_path @source_path end |
Instance Method Details
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Performs the actual deployment.
42 43 44 |
# File 'lib/nanoc/deploying/deployer.rb', line 42 def run raise NotImplementedError.new('Nanoc::Deploying::Deployer subclasses must implement #run') end |