Commit 07f306d8 authored by Sebastian Ziebell's avatar Sebastian Ziebell

Merge branch 'master' into fixes/api

parents 3b3add35 e4b67d3b
...@@ -39,7 +39,8 @@ gem "pygments.rb", git: "https://github.com/gitlabhq/pygments.rb.git", branch: ...@@ -39,7 +39,8 @@ gem "pygments.rb", git: "https://github.com/gitlabhq/pygments.rb.git", branch:
gem "github-linguist", "~> 2.3.4" , require: "linguist" gem "github-linguist", "~> 2.3.4" , require: "linguist"
# API # API
gem "grape", "~> 0.2.1" gem "grape", "~> 0.3.1"
gem "grape-entity", "~> 0.2.0"
# Format dates and times # Format dates and times
# based on human-friendly examples # based on human-friendly examples
......
...@@ -182,8 +182,9 @@ GEM ...@@ -182,8 +182,9 @@ GEM
pyu-ruby-sasl (~> 0.0.3.1) pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1) rubyntlm (~> 0.1.1)
gitlab_yaml_db (1.0.0) gitlab_yaml_db (1.0.0)
grape (0.2.2) grape (0.3.1)
activesupport activesupport
grape-entity (~> 0.2.0)
hashie (~> 1.2) hashie (~> 1.2)
multi_json (>= 1.3.2) multi_json (>= 1.3.2)
multi_xml multi_xml
...@@ -191,6 +192,7 @@ GEM ...@@ -191,6 +192,7 @@ GEM
rack-accept rack-accept
rack-mount rack-mount
virtus virtus
grape-entity (0.2.0)
growl (1.0.3) growl (1.0.3)
guard (1.5.4) guard (1.5.4)
listen (>= 0.4.2) listen (>= 0.4.2)
...@@ -481,7 +483,8 @@ DEPENDENCIES ...@@ -481,7 +483,8 @@ DEPENDENCIES
gitlab_omniauth-ldap (= 1.0.2) gitlab_omniauth-ldap (= 1.0.2)
gitlab_yaml_db (= 1.0.0) gitlab_yaml_db (= 1.0.0)
grack! grack!
grape (~> 0.2.1) grape (~> 0.3.1)
grape-entity (~> 0.2.0)
grit! grit!
grit_ext! grit_ext!
growl growl
......
...@@ -22,7 +22,6 @@ module Gitlab ...@@ -22,7 +22,6 @@ module Gitlab
end end
format :json format :json
error_format :json
helpers APIHelpers helpers APIHelpers
mount Groups mount Groups
......
...@@ -340,7 +340,7 @@ module Gitlab ...@@ -340,7 +340,7 @@ module Gitlab
authorize! :download_code, user_project authorize! :download_code, user_project
page = params[:page] || 0 page = params[:page] || 0
per_page = params[:per_page] || 20 per_page = params[:per_page].to_i || 20
ref = params[:ref_name] || user_project.try(:default_branch) || 'master' ref = params[:ref_name] || user_project.try(:default_branch) || 'master'
commits = user_project.repository.commits(ref, nil, per_page, page * per_page) commits = user_project.repository.commits(ref, nil, per_page, page * per_page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment