spec/support/repo.rb
def commit_options(repo, index, message)
  options = {}
  options[:tree] = index.write_tree(repo)
  options[:author] = {
    email: "test@example.com",
    name: "Test Author",
    time: Time.gm(2014, "mar", 3, 20, 15, 1)
  }
  options[:committer] = {
    email: "test@example.com",
    name: "Test Author",
    time: Time.gm(2014, "mar", 3, 20, 15, 1)
  }
  options[:message] ||= message
  options[:parents] = repo.empty? ? [] : [repo.head.target].compact
  options[:update_ref] = "HEAD"

  options
end
# Build the options hash that's passed to Rugged::Commit#create
Build the options hash that's passed to Rugged::Commit#create
Build the options hash that ' s passed to Rugged :: Commit#create
def commit_options(repo, index, message)
  options = {}
  options[:tree] = index.write_tree(repo)
  options[:author] = {
    email: "test@example.com",
    name: "Test Author",
    time: Time.gm(2014, "mar", 3, 20, 15, 1)
  }
  options[:committer] = {
    email: "test@example.com",
    name: "Test Author",
    time: Time.gm(2014, "mar", 3, 20, 15, 1)
  }
  options[:message] ||= message
  options[:parents] = repo.empty? ? [] : [repo.head.target].compact
  options[:update_ref] = "HEAD"
  options
end
def commit_options ( repo , index , message ) options = { } options [ :tree ] = index . write_tree ( repo ) options [ :author ] = { email : "test@example.com" , name : "Test Author" , time : Time . gm ( 2014 , "mar" , 3 , 20 , 15 , 1 ) } options [ :committer ] = { email : "test@example.com" , name : "Test Author" , time : Time . gm ( 2014 , "mar" , 3 , 20 , 15 , 1 ) } options [ :message ] ||= message options [ :parents ] = repo . empty? ? [ ] : [ repo . head . target ] . compact options [ :update_ref ] = "HEAD" options end
Build the options hash that's passed to Rugged::Commit#create
Build the options hash that ' s passed to Rugged :: Commit#create
repo
index
message