lib/gitlab/client/repositories.rb in gitlab-2.0.0 vs lib/gitlab/client/repositories.rb in gitlab-2.1.0
- old
+ new
@@ -13,11 +13,11 @@
# @option options [Integer] :per_page The number of results per page.
# @return [Array<Gitlab::ObjectifiedHash>]
def tags(project, options={})
get("/projects/#{project}/repository/tags", :query => options)
end
- alias :repo_tags :tags
+ alias_method :repo_tags, :tags
# Gets a list of project repositiory branches.
#
# @example
# Gitlab.branches(42)
@@ -29,11 +29,11 @@
# @option options [Integer] :per_page The number of results per page.
# @return [Array<Gitlab::ObjectifiedHash>]
def branches(project, options={})
get("/projects/#{project}/repository/branches", :query => options)
end
- alias :repo_branches :branches
+ alias_method :repo_branches, :branches
# Gets information about a repository branch.
#
# @example
# Gitlab.branch(3, 'api')
@@ -43,11 +43,11 @@
# @param [String] branch The name of the branch.
# @return [Gitlab::ObjectifiedHash]
def branch(project, branch)
get("/projects/#{project}/repository/branches/#{branch}")
end
- alias :repo_branch :branch
+ alias_method :repo_branch, :branch
# Gets a list of project commits.
#
# @example
# Gitlab.commits('viking')
@@ -60,8 +60,8 @@
# @option options [Integer] :per_page The number of results per page.
# @return [Array<Gitlab::ObjectifiedHash>]
def commits(project, options={})
get("/projects/#{project}/repository/commits", :query => options)
end
- alias :repo_commits :commits
+ alias_method :repo_commits, :commits
end
end