bolognese 0.9.52 → 0.9.53
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 +12 -7
- data/lib/bolognese/readers/datacite_reader.rb +2 -2
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/crosscite_writer.rb +2 -2
- data/lib/bolognese/writers/datacite_json_writer.rb +2 -2
- data/spec/writers/crosscite_writer_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f01562810a69b0db58a381dbf0f9e175d7321b1
|
4
|
+
data.tar.gz: 78c1747d2ef9f71f6fb274b3f575ce4f8d0d3e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a0babc2898b45f2e72f7a7d77347dac0df29de2ccfdd72c414ba1e4e4e4f9e8d568a5246f76facec4fa3f2df35d73b4aaef1e3c46f21226268277c27ed41dab
|
7
|
+
data.tar.gz: cb3f3763a6b00824756b9ddd0eb87f6fb5b8d9e0814d4a63e7411c4ed330f7244981ae8e1626dcf5ea70f28f0f8259c83745cbb62dec91476ed159e4a8138973
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/metadata.rb
CHANGED
@@ -62,7 +62,7 @@ module Bolognese
|
|
62
62
|
attr_accessor :doi, :author, :title, :publisher, :contributor, :license,
|
63
63
|
:date_accepted, :date_available, :date_copyrighted, :date_collected,
|
64
64
|
:date_submitted, :date_valid, :date_created, :date_modified,
|
65
|
-
:date_registered, :date_updated, :
|
65
|
+
:date_registered, :date_updated, :provider_id, :client_id, :journal,
|
66
66
|
:volume, :issue, :pagination, :url, :version, :keywords, :editor,
|
67
67
|
:description, :alternate_name, :language, :content_size, :spatial_coverage,
|
68
68
|
:schema_version, :additional_type, :has_part, :same_as,
|
@@ -97,6 +97,11 @@ module Bolognese
|
|
97
97
|
exit 1
|
98
98
|
end
|
99
99
|
else
|
100
|
+
hsh = { "date_registered" => options.fetch("date_registered", nil),
|
101
|
+
"date_updated" => options.fetch("date_updated", nil),
|
102
|
+
"provider_id" => options.fetch("provider_id", nil),
|
103
|
+
"client_id" => options.fetch("client_id", nil),
|
104
|
+
"url" => options.fetch("url", nil) }
|
100
105
|
string = input
|
101
106
|
@from = from || find_from_format(string: string)
|
102
107
|
end
|
@@ -110,8 +115,8 @@ module Bolognese
|
|
110
115
|
@url = hsh.to_h["url"].presence
|
111
116
|
@date_registered = hsh.to_h["date_registered"].presence
|
112
117
|
@date_updated = hsh.to_h["date_updated"].presence
|
113
|
-
@
|
114
|
-
@
|
118
|
+
@provider_id = hsh.to_h["provider_id"].presence
|
119
|
+
@client_id = hsh.to_h["client_id"].presence
|
115
120
|
|
116
121
|
@style = style || "apa"
|
117
122
|
@locale = locale || "en-US"
|
@@ -276,12 +281,12 @@ module Bolognese
|
|
276
281
|
@funding ||= metadata.fetch("funding", nil)
|
277
282
|
end
|
278
283
|
|
279
|
-
def
|
280
|
-
@
|
284
|
+
def provider_id
|
285
|
+
@provider_id ||= metadata.fetch("provider_id", nil)
|
281
286
|
end
|
282
287
|
|
283
|
-
def
|
284
|
-
@
|
288
|
+
def client_id
|
289
|
+
@client_id ||= metadata.fetch("client_id", nil)
|
285
290
|
end
|
286
291
|
|
287
292
|
def is_identical_to
|
@@ -35,8 +35,8 @@ module Bolognese
|
|
35
35
|
{ "string" => string,
|
36
36
|
"date_registered" => attributes.fetch("minted", nil),
|
37
37
|
"date_updated" => attributes.fetch("updated", nil),
|
38
|
-
"
|
39
|
-
"
|
38
|
+
"provider_id" => attributes.fetch("allocator_symbol", nil),
|
39
|
+
"client_id" => attributes.fetch("datacentre_symbol", nil),
|
40
40
|
"url" => url }
|
41
41
|
end
|
42
42
|
|
data/lib/bolognese/version.rb
CHANGED
@@ -43,8 +43,8 @@ module Bolognese
|
|
43
43
|
"spatial_coverage" => spatial_coverage,
|
44
44
|
"funding" => funding,
|
45
45
|
"schema_version" => schema_version,
|
46
|
-
"
|
47
|
-
"
|
46
|
+
"provider_id" => provider_id,
|
47
|
+
"client_id" => client_id,
|
48
48
|
"provider" => provider
|
49
49
|
}.compact
|
50
50
|
JSON.pretty_generate hsh.presence
|
@@ -39,8 +39,8 @@ module Bolognese
|
|
39
39
|
"geo-location" => spatial_coverage,
|
40
40
|
"funding-reference" => funding,
|
41
41
|
"schemaVersion" => schema_version,
|
42
|
-
"
|
43
|
-
"
|
42
|
+
"provider_id" => provider_id,
|
43
|
+
"client_id" => client_id,
|
44
44
|
"provider" => provider
|
45
45
|
}.compact
|
46
46
|
JSON.pretty_generate hsh.presence
|
@@ -72,8 +72,8 @@ describe Bolognese::Metadata, vcr: true do
|
|
72
72
|
expect(crosscite.fetch("author").first).to eq("type"=>"Person", "familyName" => "Ollomo", "givenName" => "Benjamin", "name" => "Benjamin Ollomo")
|
73
73
|
expect(crosscite.fetch("date_registered")).to eq("2011-02-01T17:32:02Z")
|
74
74
|
expect(crosscite.fetch("date_updated")).to eq("2017-07-14T01:32:56Z")
|
75
|
-
expect(crosscite.fetch("
|
76
|
-
expect(crosscite.fetch("
|
75
|
+
expect(crosscite.fetch("provider_id")).to eq("CDL")
|
76
|
+
expect(crosscite.fetch("client_id")).to eq("CDL.DRYAD")
|
77
77
|
end
|
78
78
|
|
79
79
|
it "maremma" do
|