Skip to content

Commit

Permalink
handle multiple issn #98
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 12, 2020
1 parent 5293713 commit de62bd1
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bolognese (1.8.11)
bolognese (1.8.12)
activesupport (>= 4.2.5)
benchmark_methods (~> 0.7)
bibtex-ruby (>= 5.1.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/bolognese/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bolognese
VERSION = "1.8.11"
VERSION = "1.8.12"
end

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions spec/readers/crossref_reader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,24 @@
expect(subject.date_registered).to eq("2017-12-17T00:37:32Z")
end

it "multiple issn" do
input = "https://doi.org/10.1007/978-3-642-34922-5_19"
subject = Bolognese::Metadata.new(input: input)
expect(subject.valid?).to be true
expect(subject.id).to eq("https://doi.org/10.1007/978-3-642-34922-5_19")
expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-642-34922-5_19")
expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
expect(subject.creators.length).to eq(3)
expect(subject.creators.first).to eq("familyName"=>"Razib", "givenName"=>"Ali", "name"=>"Razib, Ali", "nameType"=>"Personal")
expect(subject.titles).to eq([{"title"=>"Log-Domain Arithmetic for High-Speed Fuzzy Control on a Field-Programmable Gate Array"}])
expect(subject.dates).to include({"date"=>"2013", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2013")
expect(subject.publisher).to eq("Springer Science and Business Media LLC")
expect(subject.container).to eq("identifier"=>"1860-0808", "identifierType"=>"ISSN", "title"=>"Studies in Fuzziness and Soft Computing", "type"=>"Book Series")
expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2012-10-31T16:15:44Z")
end

it "posted content copernicus" do
input = "https://doi.org/10.5194/CP-2020-95"
subject = Bolognese::Metadata.new(input: input)
Expand Down

0 comments on commit de62bd1

Please sign in to comment.