Class: Nanoc::Extra::VCS Abstract

Inherits:
Object
  • Object
show all
Extended by:
PluginRegistry::PluginMethods
Defined in:
lib/nanoc/extra/vcs.rb

Overview

This class is abstract.

Subclass and override #add, #remove and #move to implement a custom VCS.

A very simple representation of a version control system (VCS) that abstracts the add, remove and move operations. It does not commit. This class is primarily used by data sources that store data as flat files on the disk.

Direct Known Subclasses

Nanoc::Extra::VCSes::Bazaar, Nanoc::Extra::VCSes::Dummy, Nanoc::Extra::VCSes::Git, Nanoc::Extra::VCSes::Mercurial, Nanoc::Extra::VCSes::Subversion

Instance Method Summary (collapse)

Methods included from PluginRegistry::PluginMethods

all, identifier, identifiers, named, register

Instance Method Details

- (void) add(filename)

This method is abstract.

This method returns an undefined value.

Adds the file with the given filename to the working copy.

Parameters:

  • filename (String)

    The name of the file to add



21
22
23
# File 'lib/nanoc/extra/vcs.rb', line 21

def add(filename) # rubocop:disable Lint/UnusedMethodArgument
  not_implemented('add')
end

- (void) move(src, dst)

This method is abstract.

This method returns an undefined value.

Moves the file with the given filename to a new location. When this method is executed, the original file should no longer be present on the disk.

Parameters:

  • src (String)

    The old filename

  • dst (String)

    The new filename



49
50
51
# File 'lib/nanoc/extra/vcs.rb', line 49

def move(src, dst) # rubocop:disable Lint/UnusedMethodArgument
  not_implemented('move')
end

- (void) remove(filename)

This method is abstract.

This method returns an undefined value.

Removes the file with the given filename from the working copy. When this method is executed, the file should no longer be present on the disk.

Parameters:

  • filename (String)

    The name of the file to remove



34
35
36
# File 'lib/nanoc/extra/vcs.rb', line 34

def remove(filename) # rubocop:disable Lint/UnusedMethodArgument
  not_implemented('remove')
end