Skip to content

Commit

Permalink
escape ref parameter for repo_file_contents
Browse files Browse the repository at this point in the history
fixes #113
  • Loading branch information
NARKOZ committed Apr 7, 2015
1 parent 8dcfec5 commit a04f3af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gitlab/client/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def commit_diff(project, sha)
# @param [String] ref The name of a repository branch or tag or if not given the default branch.
# @return [String]
def file_contents(project, filepath, ref = 'master')
ref = URI.encode(ref, /\W/)
get "/projects/#{project}/repository/blobs/#{ref}?filepath=#{filepath}",
format: nil,
headers: { Accept: 'text/plain' },
Expand Down

0 comments on commit a04f3af

Please sign in to comment.