Up grape version. Fix issue with raw content being escaped

This commit is contained in:
Dmitriy Zaporozhets 2013-05-27 17:14:47 +03:00
parent e26d149cd8
commit 9351a295c1
3 changed files with 8 additions and 6 deletions

View file

@ -41,8 +41,8 @@ gem "gitlab-gollum-lib", "~> 1.0.0", require: 'gollum-lib'
gem "github-linguist", require: "linguist" gem "github-linguist", require: "linguist"
# API # API
gem "grape", "~> 0.3.1" gem "grape", "~> 0.4.1"
gem "grape-entity", "~> 0.2.0" gem "grape-entity", "~> 0.3.0"
# Format dates and times # Format dates and times
# based on human-friendly examples # based on human-friendly examples

View file

@ -173,7 +173,7 @@ GEM
gon (4.1.0) gon (4.1.0)
actionpack (>= 2.3.0) actionpack (>= 2.3.0)
json json
grape (0.3.1) grape (0.4.1)
activesupport activesupport
builder builder
hashie (>= 1.2.0) hashie (>= 1.2.0)
@ -183,7 +183,7 @@ GEM
rack-accept rack-accept
rack-mount rack-mount
virtus virtus
grape-entity (0.2.0) grape-entity (0.3.0)
activesupport activesupport
multi_json (>= 1.3.2) multi_json (>= 1.3.2)
growl (1.0.3) growl (1.0.3)
@ -528,8 +528,8 @@ DEPENDENCIES
gitlab_meta (= 5.0) gitlab_meta (= 5.0)
gitlab_omniauth-ldap (= 1.0.2) gitlab_omniauth-ldap (= 1.0.2)
gon gon
grape grape (~> 0.4.1)
grape-entity grape-entity (~> 0.3.0)
growl growl
guard-rspec guard-rspec
guard-spinach guard-spinach

View file

@ -124,6 +124,8 @@ module API
blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath]) blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath])
not_found! "File" unless blob.exists? not_found! "File" unless blob.exists?
env['api.format'] = :txt
content_type blob.mime_type content_type blob.mime_type
present blob.data present blob.data
end end