Sha256: d6dcc7ce87bc6b4b52c4fc0527936d4f1a82e09d41c3682f6330e25ee8ca0de6

Contents?: true

Size: 317 Bytes

Versions: 6

Compression:

Stored size: 317 Bytes

Contents

module Lolcommits
  class GitInfo
    attr_accessor :sha, :message, :repo_internal_path
    def initialize
      g    = Git.open('.')
      commit = g.log.first

      self.message = commit.message.split("\n").first
      self.sha     = commit.sha[0..10]
      self.repo_internal_path = g.repo.path
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lolcommits-0.4.1pre1 lib/lolcommits/git_info.rb
lolcommits-0.4.0 lib/lolcommits/git_info.rb
lolcommits-0.4.0.pre2 lib/lolcommits/git_info.rb
lolcommits-0.4.0.pre1 lib/lolcommits/git_info.rb
lolcommits-0.3.4 lib/lolcommits/git_info.rb
lolcommits-0.3.3 lib/lolcommits/git_info.rb