Skip to content

Commit

Permalink
use gzip compression
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 8, 2020
1 parent 2e8c528 commit 20bb8a3
Show file tree
Hide file tree
Showing 29 changed files with 376 additions and 552 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "oj_mimic_json", "~> 1.0", ">= 1.0.1"
gem "equivalent-xml", "~> 0.6.0"
gem "nokogiri", ">= 1.10.8"
gem "iso8601", "~> 0.9.0"
gem "maremma", ">= 4.1"
gem "maremma", "4.6.1"
gem "faraday", "0.17.0"
gem "bolognese", "~> 1.0", ">= 1.4"
gem "dalli", "~> 2.7.6"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ GEM
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
maremma (4.7)
maremma (4.6.1)
activesupport (>= 4.2.5)
addressable (>= 2.3.6)
builder (~> 3.2, >= 3.2.2)
Expand Down Expand Up @@ -351,7 +351,7 @@ DEPENDENCIES
lograge (~> 0.11.2)
logstash-event (~> 1.2, >= 1.2.02)
logstash-logger (~> 0.26.1)
maremma (>= 4.1)
maremma (= 4.6.1)
nokogiri (>= 1.10.8)
oj (>= 3.1.0)
oj_mimic_json (~> 1.0, >= 1.0.1)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/index_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def index

def show
url = "#{ENV['API_URL']}/dois/#{@doi}"
response = Maremma.get(url, accept: "application/vnd.datacite.datacite+json", raw: true)
response = Maremma.get(url, accept: "application/vnd.datacite.datacite+json", raw: true, headers: { "Accept-Encoding"=> "gzip" })

if response.status == 200
@metadata = Bolognese::Metadata.new(input: response.body.fetch("data", nil), from: "datacite_json")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20bb8a3

Please sign in to comment.