-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in friendly querystring for Crossref and update VCR cassettes acc…
…ordingly
- Loading branch information
1 parent
590d9eb
commit 8834f2c
Showing
57 changed files
with
6,295 additions
and
1,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,8 @@ def show | |
if response.status == 200 | ||
@metadata = Bolognese::Metadata.new(input: response.body.fetch("data", nil), from: "datacite_json") | ||
else | ||
url = "https://api.crossref.org/works/#{@doi}/transform/application/vnd.crossref.unixsd+xml" | ||
useragent = "Mozilla/5.0 (compatible; Maremma/#{Maremma::VERSION}; +https://github.com/datacite/maremma; mailto:[email protected])" | ||
response = Maremma.get(url, accept: "text/xml", raw: true, timeout: 2, useragent: useragent) | ||
url = "https://api.crossref.org/works/#{@doi}/transform/application/[email protected]" | ||
response = Maremma.get(url, accept: "text/xml", raw: true, timeout: 2) | ||
|
||
if response.status == 200 | ||
string = response.body.fetch("data", nil) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"result": { | ||
"covered_percent": 69.09 | ||
"covered_percent": 93.17 | ||
} | ||
} |
Oops, something went wrong.