Sha256: 6c29acf167741fc46486e616ab3ed25a2de648cc3d7c2d298bca71ea3e662db3

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

require 'repertoire/media/media'

module Repertoire
  class SVN < Media

    uses_schemes 'svn', 'svn+ssh'

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

    #
    # Checks out the SVN repository located at the specified _uri_ into the
    # specified _path_.
    #
    def self.checkout(uri,path)
      sh('svn','co',uri,path)
    end

    #
    # Updated the SVN repository located at the specified _path_.
    #
    def self.update(path,uri=nil)
      sh('svn','up',path)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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