class Nanoc::Deploying::Deployer

Represents a deployer, an object that allows uploading the compiled site to a specific (remote) location.

@abstract Subclass and override {#run} to implement a custom filter.

@api private

Attributes

config[R]

@return [Hash] The deployer configuration

dry_run[R]

@return [Boolean] true if the deployer should only show what would be

deployed instead of doing the actual deployment
dry_run?[R]

@return [Boolean] true if the deployer should only show what would be

deployed instead of doing the actual deployment
source_path[R]

@return [String] The path to the directory that contains the files to

upload. It should not have a trailing slash.

Public Class Methods

new(source_path, config, dry_run: false) click to toggle source

@param [String] source_path The path to the directory that contains the

files to upload. It should not have a trailing slash.

@return [Hash] config The deployer configuration

@param [Boolean] dry_run true if the deployer should

only show what would be deployed instead actually deploying
# 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

Public Instance Methods

run() click to toggle source

Performs the actual deployment.

@abstract

# File lib/nanoc/deploying/deployer.rb, line 42
def run
  raise NotImplementedError.new('Nanoc::Deploying::Deployer subclasses must implement #run')
end