wip: extract tarball downloading into separate command

This commit is contained in:
2021-04-09 00:38:35 +01:00
parent 2054c8c0aa
commit 9c977a75b5
7 changed files with 258 additions and 0 deletions

29
lib/commit.rb Normal file
View File

@@ -0,0 +1,29 @@
# frozen_string_literal: true
require 'yaml'
class Commit
attr_reader :sha
attr_reader :time
def initialize(sha:, time:)
@sha = sha
@time = time
end
def sha_short
sha[0..6]
end
def to_hash
{
'sha' => sha,
'sha_short' => sha_short,
'time' => time
}
end
def to_yaml
to_hash.to_yaml
end
end