Skip to content

Instantly share code, notes, and snippets.

@bleonard
Created January 14, 2013 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bleonard/4527774 to your computer and use it in GitHub Desktop.
Save bleonard/4527774 to your computer and use it in GitHub Desktop.
def fetch_sha(repo_name, sha)
VCR.use_cassette("#{repo_name}/shas/#{sha}", :record => :new_episodes) do
return client.commit(repo_name, sha)
end
end
def commits_window(repo_name, username, since_time, until_time)
options = { :author => username, :since =>since_time.iso8601, :until = until_time.iso8601 }
VCR.use_cassette("#{repo_name}/#{username}/commits/#{since_time.to_i}-#{until_time.to_i}", :record => :new_episodes) do
return client.commits(repo_name, "master", options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment