diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-27 17:14:47 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-27 17:14:47 +0300 |
commit | 9351a295c1ac84e2e67559a9140cb921445c8951 (patch) | |
tree | e0657e5672b7eb971a4e8fad54b11a990626b677 | |
parent | e26d149cd8a4eedaf56810de01e085c5661f1c02 (diff) | |
download | gitlab-ce-9351a295c1ac84e2e67559a9140cb921445c8951.tar.gz |
Up grape version. Fix issue with raw content being escaped
-rw-r--r-- | Gemfile | 4 | ||||
-rw-r--r-- | Gemfile.lock | 8 | ||||
-rw-r--r-- | lib/api/repositories.rb | 2 |
3 files changed, 8 insertions, 6 deletions
@@ -41,8 +41,8 @@ gem "gitlab-gollum-lib", "~> 1.0.0", require: 'gollum-lib' gem "github-linguist", require: "linguist" # API -gem "grape", "~> 0.3.1" -gem "grape-entity", "~> 0.2.0" +gem "grape", "~> 0.4.1" +gem "grape-entity", "~> 0.3.0" # Format dates and times # based on human-friendly examples diff --git a/Gemfile.lock b/Gemfile.lock index 32745866b4f..0af3d516eec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -173,7 +173,7 @@ GEM gon (4.1.0) actionpack (>= 2.3.0) json - grape (0.3.1) + grape (0.4.1) activesupport builder hashie (>= 1.2.0) @@ -183,7 +183,7 @@ GEM rack-accept rack-mount virtus - grape-entity (0.2.0) + grape-entity (0.3.0) activesupport multi_json (>= 1.3.2) growl (1.0.3) @@ -528,8 +528,8 @@ DEPENDENCIES gitlab_meta (= 5.0) gitlab_omniauth-ldap (= 1.0.2) gon - grape - grape-entity + grape (~> 0.4.1) + grape-entity (~> 0.3.0) growl guard-rspec guard-spinach diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index 964b9eb38ac..2ed5ea20891 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -124,6 +124,8 @@ module API blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath]) not_found! "File" unless blob.exists? + env['api.format'] = :txt + content_type blob.mime_type present blob.data end |