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



23
24
25
# File 'lib/nanoc/extra/vcs.rb', line 23

def add(filename)
  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



51
52
53
# File 'lib/nanoc/extra/vcs.rb', line 51

def move(src, dst)
  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



36
37
38
# File 'lib/nanoc/extra/vcs.rb', line 36

def remove(filename)
  not_implemented('remove')
end