Class: Degem::GitAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/degem/git_adapter.rb

Instance Method Summary collapse

Instance Method Details

#call(gem_name) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/degem/git_adapter.rb', line 8

def call(gem_name)
  out, _err, status = git_log(gem_name)
  return [] unless status.zero?

  out.split("\n").map do |commit|
    hash, date, title = commit.split("\t")
    Commit.new(hash:, date:, title:, url: to_commit_url(hash))
  end
end