bolognese 0.9.82 → 0.9.83
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bolognese/metadata.rb +5 -1
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +2 -2
- data/lib/bolognese/writers/citeproc_writer.rb +2 -2
- data/lib/bolognese/writers/schema_org_writer.rb +1 -1
- data/spec/writers/bibtex_writer_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e52069454439f8145657e5ccf472fe86c474732ee011a958a8293649698f33b
|
4
|
+
data.tar.gz: 42114ed33d07570de88e156f311e8b23dbc4751ed20a889c7b4a263b5a12c2f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0d9fff17398712563e76a038745305b90972938faaea4d58f346609f608337717dfe886a7ee4cde6d491ee17fbeb40a76aa60ab2d5b8e89a4ff88013daa86e
|
7
|
+
data.tar.gz: 1faaa011c2ce692af45d92d9b2e5a17e5388a01e075456a6997a1f2db5815cd586015ae5544c549f5b4f68589fb4e1ed618577f35d22f9bbe1c9200a61032a8b
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/metadata.rb
CHANGED
@@ -61,7 +61,7 @@ module Bolognese
|
|
61
61
|
include Bolognese::Writers::SchemaOrgWriter
|
62
62
|
include Bolognese::Writers::TurtleWriter
|
63
63
|
|
64
|
-
attr_accessor :id, :doi, :author, :creator, :title, :publisher, :contributor, :license,
|
64
|
+
attr_accessor :id, :identifier, :doi, :author, :creator, :title, :publisher, :contributor, :license,
|
65
65
|
:date_accepted, :date_available, :date_copyrighted, :date_collected,
|
66
66
|
:date_submitted, :date_valid, :date_created, :date_modified,
|
67
67
|
:date_registered, :date_updated, :provider_id, :client_id, :journal,
|
@@ -202,6 +202,10 @@ module Bolognese
|
|
202
202
|
@url ||= metadata.fetch("url", nil)
|
203
203
|
end
|
204
204
|
|
205
|
+
def identifier
|
206
|
+
@identifier ||= metadata.fetch("id", nil)
|
207
|
+
end
|
208
|
+
|
205
209
|
def state
|
206
210
|
@state ||= metadata.fetch("state", nil)
|
207
211
|
end
|
data/lib/bolognese/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Bolognese
|
|
6
6
|
|
7
7
|
bib = {
|
8
8
|
bibtex_type: bibtex_type.presence || "misc",
|
9
|
-
bibtex_key:
|
9
|
+
bibtex_key: identifier,
|
10
10
|
doi: doi,
|
11
11
|
url: url,
|
12
12
|
author: authors_as_string(author),
|
@@ -16,7 +16,7 @@ module Bolognese
|
|
16
16
|
journal: container_title,
|
17
17
|
volume: volume,
|
18
18
|
issue: issue,
|
19
|
-
pages: [first_page
|
19
|
+
pages: [first_page, last_page].compact.join("-").presence,
|
20
20
|
publisher: publisher,
|
21
21
|
year: publication_year
|
22
22
|
}.compact
|
@@ -4,7 +4,7 @@ module Bolognese
|
|
4
4
|
def citeproc
|
5
5
|
hsh = {
|
6
6
|
"type" => citeproc_type,
|
7
|
-
"id" =>
|
7
|
+
"id" => identifier,
|
8
8
|
"categories" => parse_attributes(keywords, content: "text"),
|
9
9
|
"language" => language,
|
10
10
|
"author" => to_citeproc(author),
|
@@ -15,7 +15,7 @@ module Bolognese
|
|
15
15
|
"container-title" => container_title,
|
16
16
|
"DOI" => doi,
|
17
17
|
"issue" => issue,
|
18
|
-
"page" => [first_page, last_page].join("-").presence,
|
18
|
+
"page" => [first_page, last_page].compact.join("-").presence,
|
19
19
|
"publisher" => publisher,
|
20
20
|
"title" => parse_attributes(title, content: "text", first: true),
|
21
21
|
"URL" => url,
|
@@ -23,7 +23,7 @@ module Bolognese
|
|
23
23
|
"pageStart" => first_page,
|
24
24
|
"pageEnd" => last_page,
|
25
25
|
"spatialCoverage" => spatial_coverage,
|
26
|
-
"sameAs" =>
|
26
|
+
"sameAs" => to_schema_org(is_identical_to),
|
27
27
|
"isPartOf" => to_schema_org(is_part_of),
|
28
28
|
"hasPart" => to_schema_org(has_part),
|
29
29
|
"predecessor_of" => to_schema_org(is_previous_version_of),
|
@@ -40,6 +40,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
40
40
|
expect(bibtex[:bibtex_key]).to eq("https://doi.org/10.17173/pretest8")
|
41
41
|
expect(bibtex[:doi]).to eq("10.17173/pretest8")
|
42
42
|
expect(bibtex[:title]).to eq("PIAAC-Longitudinal (PIAAC-L) 2015")
|
43
|
+
expect(bibtex[:pages]).to be_nil
|
43
44
|
end
|
44
45
|
|
45
46
|
it "maremma" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolognese
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.83
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|