Skip to content

Commit

Permalink
Fixing indent
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwynn committed Jul 11, 2012
1 parent 0b8d3a9 commit cb3e49c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/octokit/client/contents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module Contents
# @see http://developer.github.com/v3/repos/contents/
# @example Get the readme file for a repo
# Octokit.readme("pengwynn/octokit")
def readme(repo, options={})
get("/repos/#{Repository.new repo}/readme", options, 3)
end
def readme(repo, options={})
get("/repos/#{Repository.new repo}/readme", options, 3)
end

# Receive a listing of a repository folder or the contents of a file
#
Expand All @@ -24,11 +24,11 @@ def readme(repo, options={})
# @see http://developer.github.com/v3/repos/contents/
# @example List the contents of lib/octokit.rb
# Octokit.contents("pengwynn/octokit", :path => 'lib/octokit.rb')
def contents(repo, options={})
repo_path = options.delete :path
url = "/repos/#{Repository.new repo}/contents/#{repo_path}"
get(url, options, 3)
end
def contents(repo, options={})
repo_path = options.delete :path
url = "/repos/#{Repository.new repo}/contents/#{repo_path}"
get(url, options, 3)
end

# This method will provide a URL to download a tarball or zipball archive for a repository.
#
Expand All @@ -39,13 +39,13 @@ def contents(repo, options={})
# @see http://developer.github.com/v3/repos/contents/
# @example Get archive link for pengwynn/octokit
# Octokit.archive_link("pengwynn/octokit")
def archive_link(repo, options={})
repo_ref = options.delete :ref
format = (options.delete :format) || 'tarball'
url = "/repos/#{Repository.new repo}/#{format}/#{repo_ref}"
headers = get(url, options, 3, false, true).headers
return headers['location']
end
def archive_link(repo, options={})
repo_ref = options.delete :ref
format = (options.delete :format) || 'tarball'
url = "/repos/#{Repository.new repo}/#{format}/#{repo_ref}"
headers = get(url, options, 3, false, true).headers
return headers['location']
end
end
end
end

0 comments on commit cb3e49c

Please sign in to comment.