Commit 9351a295c1ac84e2e67559a9140cb921445c8951

Authored by Dmitriy Zaporozhets
1 parent e26d149c

Up grape version. Fix issue with raw content being escaped

Gemfile
... ... @@ -41,8 +41,8 @@ gem "gitlab-gollum-lib", "~> 1.0.0", require: 'gollum-lib'
41 41 gem "github-linguist", require: "linguist"
42 42  
43 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 47 # Format dates and times
48 48 # based on human-friendly examples
... ...
Gemfile.lock
... ... @@ -173,7 +173,7 @@ GEM
173 173 gon (4.1.0)
174 174 actionpack (>= 2.3.0)
175 175 json
176   - grape (0.3.1)
  176 + grape (0.4.1)
177 177 activesupport
178 178 builder
179 179 hashie (>= 1.2.0)
... ... @@ -183,7 +183,7 @@ GEM
183 183 rack-accept
184 184 rack-mount
185 185 virtus
186   - grape-entity (0.2.0)
  186 + grape-entity (0.3.0)
187 187 activesupport
188 188 multi_json (>= 1.3.2)
189 189 growl (1.0.3)
... ... @@ -528,8 +528,8 @@ DEPENDENCIES
528 528 gitlab_meta (= 5.0)
529 529 gitlab_omniauth-ldap (= 1.0.2)
530 530 gon
531   - grape
532   - grape-entity
  531 + grape (~> 0.4.1)
  532 + grape-entity (~> 0.3.0)
533 533 growl
534 534 guard-rspec
535 535 guard-spinach
... ...
lib/api/repositories.rb
... ... @@ -124,6 +124,8 @@ module API
124 124 blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath])
125 125 not_found! "File" unless blob.exists?
126 126  
  127 + env['api.format'] = :txt
  128 +
127 129 content_type blob.mime_type
128 130 present blob.data
129 131 end
... ...