Sha256: 001076d3e02de65efd40eed7daeea00db1a31402e0625d9e1a255bb5e547f8b0

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

module Docman

  class Git
    def get_repo(repo, path, type, version)
      if File.directory? path
        Dir.chdir path
        `git checkout #{version} && git pull origin #{version}` if type == 'branch'
        `git checkout #{version}` if type == 'tag'
      else
        `git clone #{repo} #{path}`
        Dir.chdir path
        `git checkout #{version}`
      end

      # if result.nil?
      #   puts "Error: #{$?}"
      # end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docman-0.0.2 lib/docman/git.rb
docman-0.0.1 lib/docman/git.rb