Sha256: 704881276fcaa49d83216546ad5400f35b68b2e79340fdf84d2225260656fc00

Contents?: true

Size: 336 Bytes

Versions: 4

Compression:

Stored size: 336 Bytes

Contents

require 'grit'

include Grit

module Heirloom

  class GitDirectory

    def initialize(args)
      @path = args[:path]
    end

    def commit(sha = nil)
      repo = Repo.new @path
      if sha
        commit = repo.commits(sha)
        commit ? commit.first : false
      else
        repo.commits.first
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
heirloom-0.5.0rc2 lib/heirloom/directory/git_directory.rb
heirloom-0.5.0rc1 lib/heirloom/directory/git_directory.rb
heirloom-0.4.1rc1 lib/heirloom/directory/git_directory.rb
heirloom-0.4.0 lib/heirloom/directory/git_directory.rb