Commit 9351a295c1ac84e2e67559a9140cb921445c8951
1 parent
e26d149c
Exists in
master
and in
4 other branches
Up grape version. Fix issue with raw content being escaped
Showing
3 changed files
with
8 additions
and
6 deletions
Show diff stats
Gemfile
@@ -41,8 +41,8 @@ gem "gitlab-gollum-lib", "~> 1.0.0", require: 'gollum-lib' | @@ -41,8 +41,8 @@ gem "gitlab-gollum-lib", "~> 1.0.0", require: 'gollum-lib' | ||
41 | gem "github-linguist", require: "linguist" | 41 | gem "github-linguist", require: "linguist" |
42 | 42 | ||
43 | # API | 43 | # API |
44 | -gem "grape", "~> 0.3.1" | ||
45 | -gem "grape-entity", "~> 0.2.0" | 44 | +gem "grape", "~> 0.4.1" |
45 | +gem "grape-entity", "~> 0.3.0" | ||
46 | 46 | ||
47 | # Format dates and times | 47 | # Format dates and times |
48 | # based on human-friendly examples | 48 | # based on human-friendly examples |
Gemfile.lock
@@ -173,7 +173,7 @@ GEM | @@ -173,7 +173,7 @@ GEM | ||
173 | gon (4.1.0) | 173 | gon (4.1.0) |
174 | actionpack (>= 2.3.0) | 174 | actionpack (>= 2.3.0) |
175 | json | 175 | json |
176 | - grape (0.3.1) | 176 | + grape (0.4.1) |
177 | activesupport | 177 | activesupport |
178 | builder | 178 | builder |
179 | hashie (>= 1.2.0) | 179 | hashie (>= 1.2.0) |
@@ -183,7 +183,7 @@ GEM | @@ -183,7 +183,7 @@ GEM | ||
183 | rack-accept | 183 | rack-accept |
184 | rack-mount | 184 | rack-mount |
185 | virtus | 185 | virtus |
186 | - grape-entity (0.2.0) | 186 | + grape-entity (0.3.0) |
187 | activesupport | 187 | activesupport |
188 | multi_json (>= 1.3.2) | 188 | multi_json (>= 1.3.2) |
189 | growl (1.0.3) | 189 | growl (1.0.3) |
@@ -528,8 +528,8 @@ DEPENDENCIES | @@ -528,8 +528,8 @@ DEPENDENCIES | ||
528 | gitlab_meta (= 5.0) | 528 | gitlab_meta (= 5.0) |
529 | gitlab_omniauth-ldap (= 1.0.2) | 529 | gitlab_omniauth-ldap (= 1.0.2) |
530 | gon | 530 | gon |
531 | - grape | ||
532 | - grape-entity | 531 | + grape (~> 0.4.1) |
532 | + grape-entity (~> 0.3.0) | ||
533 | growl | 533 | growl |
534 | guard-rspec | 534 | guard-rspec |
535 | guard-spinach | 535 | guard-spinach |
lib/api/repositories.rb
@@ -124,6 +124,8 @@ module API | @@ -124,6 +124,8 @@ module API | ||
124 | blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath]) | 124 | blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath]) |
125 | not_found! "File" unless blob.exists? | 125 | not_found! "File" unless blob.exists? |
126 | 126 | ||
127 | + env['api.format'] = :txt | ||
128 | + | ||
127 | content_type blob.mime_type | 129 | content_type blob.mime_type |
128 | present blob.data | 130 | present blob.data |
129 | end | 131 | end |