Sha256: 260b4f3452d999de25ba601c14dc81dc522a3364c7542432bb87caee772167a6

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

require 'repertoire/media/media'

module Repertoire
  class Darcs < Media

    uses_schemes 'darcs'

    #
    # Returns +true+ if the repository located at the specified _path_
    # contains the +_darcs+ directory, returns +false+ otherwise.
    #
    def self.is_repo?(path)
      File.directory?(File.join(path,'_darcs'))
    end

    #
    # Checks out the Darcs repository located at the specified _uri_ into
    # the specified _path_.
    #
    def self.checkout(uri,path=nil)
      sh('darcs','get','--partial',uri,path)
    end

    #
    # Updated the Darcs repository located at the specified _path_.
    #
    def self.update(uri,path)
      sh('darcs','pull','-a',path)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
repertoire-0.1.0 lib/repertoire/media/darcs.rb