ezid-client 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/VERSION +1 -1
- data/ezid-client.gemspec +2 -0
- data/lib/ezid/client.rb +11 -10
- data/lib/ezid/configuration.rb +11 -4
- data/lib/ezid/identifier.rb +2 -2
- data/lib/ezid/metadata.rb +11 -1
- data/lib/ezid/metadata_transforms/datacite.rb +72 -0
- data/spec/fixtures/datacite_xml/empty.xml +1 -0
- data/spec/fixtures/datacite_xml/populated.xml +1 -0
- data/spec/unit/metadata_transform_datacite_spec.rb +169 -0
- metadata +38 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab1d0301b2fdef9d87602338269625d3f5f6b32f
|
4
|
+
data.tar.gz: 6f1ffabe1d6e126c2ffe39ff5dc091a528144c03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 726c74c5346c4ca85128b4716ef565c888059fb5f3ee1575b04896ca8ba5bf68212e7a699b68dd051251917a05d86bf0f0f465b75feb1b801e195aef17a9d08b
|
7
|
+
data.tar.gz: 8809f5f2ebd0bfe9a2893738368b3442565c171f81dc08e50333c912ea7c173ecc2a130368c4de451929a09ff4a01ee3127df79c4ab4fce5bb8d3e3b851c6fd5
|
data/README.md
CHANGED
@@ -296,11 +296,10 @@ require "ezid/test_helper"
|
|
296
296
|
|
297
297
|
The module provides constants:
|
298
298
|
|
299
|
-
- `
|
300
|
-
- `
|
301
|
-
- `
|
302
|
-
- `
|
303
|
-
- `TEST_PORT` => 443
|
299
|
+
- `EZID_TEST_SHOULDER` => "doi:10.5072/FK2"
|
300
|
+
- `EZID_TEST_USER` => "apitest"
|
301
|
+
- `EZID_TEST_HOST` => "ezid.cdlib.org"
|
302
|
+
- `EZID_TEST_PORT` => 443
|
304
303
|
|
305
304
|
The test user password is not provided - contact EZID and configure as above - or use your own EZID credentials, since all accounts can mint/create on the test shoulders.
|
306
305
|
|
@@ -326,3 +325,7 @@ In order to run the integration tests successfully, you must supply the password
|
|
326
325
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
327
326
|
4. Push to the branch (`git push origin my-new-feature`)
|
328
327
|
5. Create a new Pull Request
|
328
|
+
|
329
|
+
## Acknowledgments
|
330
|
+
|
331
|
+
- Justin Gondron (jgondron) contributed Datacite compatibility code (added in v1.8.0).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.8.0
|
data/ezid-client.gemspec
CHANGED
@@ -20,8 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.required_ruby_version = "~> 2.1"
|
21
21
|
|
22
22
|
spec.add_dependency "hashie", "~> 3.4", ">= 3.4.3"
|
23
|
+
spec.add_dependency "nokogiri"
|
23
24
|
|
24
25
|
spec.add_development_dependency "bundler", "~> 1.7"
|
26
|
+
spec.add_development_dependency "byebug"
|
25
27
|
spec.add_development_dependency "rake"
|
26
28
|
spec.add_development_dependency "rspec", "~> 3.4"
|
27
29
|
spec.add_development_dependency "rspec-its", "~> 1.2"
|
data/lib/ezid/client.rb
CHANGED
@@ -44,12 +44,11 @@ module Ezid
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
attr_reader :user, :password, :host, :port, :
|
47
|
+
attr_reader :user, :password, :host, :port, :timeout
|
48
48
|
|
49
49
|
def initialize(opts = {})
|
50
50
|
@host = opts[:host] || config.host
|
51
51
|
@port = (opts[:port] || config.port).to_i
|
52
|
-
@use_ssl = opts[:use_ssl] || config.use_ssl
|
53
52
|
@timeout = (opts[:timeout] || config.timeout).to_i
|
54
53
|
@user = opts[:user] || config.user
|
55
54
|
@password = opts[:password] || config.password
|
@@ -60,6 +59,12 @@ module Ezid
|
|
60
59
|
end
|
61
60
|
end
|
62
61
|
|
62
|
+
def use_ssl
|
63
|
+
warn "[DEPRECATION] `use_ssl` is deprecated and will be removed in ezid-client v2.0." \
|
64
|
+
" EZID requires SSL as of April 30, 2017."
|
65
|
+
true
|
66
|
+
end
|
67
|
+
|
63
68
|
def inspect
|
64
69
|
"#<#{self.class.name} connection=#{connection.inspect}, " \
|
65
70
|
"user=#{user.inspect}, session=#{logged_in? ? 'OPEN' : 'CLOSED'}>"
|
@@ -188,15 +193,11 @@ module Ezid
|
|
188
193
|
|
189
194
|
private
|
190
195
|
|
191
|
-
def use_ssl?
|
192
|
-
use_ssl || port == 443
|
193
|
-
end
|
194
|
-
|
195
196
|
def build_connection
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
197
|
+
Net::HTTP.new(host, port).tap do |conn|
|
198
|
+
conn.use_ssl = true
|
199
|
+
conn.read_timeout = timeout
|
200
|
+
end
|
200
201
|
end
|
201
202
|
|
202
203
|
def handle_response(response, request_name)
|
data/lib/ezid/configuration.rb
CHANGED
@@ -20,9 +20,6 @@ module Ezid
|
|
20
20
|
# EZID TCP/IP port
|
21
21
|
attr_accessor :port
|
22
22
|
|
23
|
-
# Use HTTPS?
|
24
|
-
attr_accessor :use_ssl
|
25
|
-
|
26
23
|
# HTTP read timeout (seconds)
|
27
24
|
attr_accessor :timeout
|
28
25
|
|
@@ -44,7 +41,6 @@ module Ezid
|
|
44
41
|
@password = ENV["EZID_PASSWORD"]
|
45
42
|
@host = ENV["EZID_HOST"] || HOST
|
46
43
|
@port = ENV["EZID_PORT"] || PORT
|
47
|
-
@use_ssl = true unless ENV["EZID_USE_SSL"] == false.to_s
|
48
44
|
@timeout = ENV["EZID_TIMEOUT"] || TIMEOUT
|
49
45
|
@default_shoulder = ENV["EZID_DEFAULT_SHOULDER"]
|
50
46
|
end
|
@@ -67,5 +63,16 @@ module Ezid
|
|
67
63
|
Metadata
|
68
64
|
end
|
69
65
|
|
66
|
+
def use_ssl
|
67
|
+
warn "[DEPRECATION] `use_ssl` is deprecated and will be removed in ezid-client v2.0." \
|
68
|
+
" EZID requires SSL as of April 30, 2017."
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
def use_ssl=(*)
|
73
|
+
warn "[DEPRECATION] `use_ssl=` is deprecated and will be removed in ezid-client v2.0." \
|
74
|
+
" EZID requires SSL as of April 30, 2017."
|
75
|
+
end
|
76
|
+
|
70
77
|
end
|
71
78
|
end
|
data/lib/ezid/identifier.rb
CHANGED
data/lib/ezid/metadata.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "hashie"
|
2
|
+
require_relative "metadata_transforms/datacite"
|
2
3
|
|
3
4
|
module Ezid
|
4
5
|
#
|
@@ -85,7 +86,12 @@ module Ezid
|
|
85
86
|
end
|
86
87
|
|
87
88
|
def replace(data)
|
88
|
-
|
89
|
+
hsh = coerce(data)
|
90
|
+
|
91
|
+
# Perform additional profile transforms
|
92
|
+
MetadataTransformDatacite.inverse(hsh) if hsh["_profile"] == "datacite"
|
93
|
+
|
94
|
+
super hsh
|
89
95
|
end
|
90
96
|
|
91
97
|
# Output metadata in EZID ANVL format
|
@@ -94,6 +100,10 @@ module Ezid
|
|
94
100
|
def to_anvl(include_readonly = true)
|
95
101
|
hsh = to_h
|
96
102
|
hsh.reject! { |k, v| READONLY.include?(k) } unless include_readonly
|
103
|
+
|
104
|
+
# Perform additional profile transforms
|
105
|
+
MetadataTransformDatacite.transform(hsh) if profile == "datacite"
|
106
|
+
|
97
107
|
lines = hsh.map do |name, value|
|
98
108
|
element = [escape(ESCAPE_NAMES_RE, name), escape(ESCAPE_VALUES_RE, value)]
|
99
109
|
element.join(ANVL_SEPARATOR)
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require "nokogiri"
|
2
|
+
|
3
|
+
module Ezid
|
4
|
+
class MetadataTransformDatacite
|
5
|
+
|
6
|
+
# Transforms the provided metadata hash into the appropriate format for datacite. Removes all "datacite.*" keys
|
7
|
+
# and transforms these to the appropriate datacite xml. The resultant xml is then added to a single "datacite" key.
|
8
|
+
def self.transform(hsh)
|
9
|
+
# Render the datacite xml
|
10
|
+
resource_opts = {
|
11
|
+
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
12
|
+
"xmlns" => "http://datacite.org/schema/kernel-4",
|
13
|
+
"xsi:schemaLocation" => "http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd"
|
14
|
+
}
|
15
|
+
xml_builder = Nokogiri::XML::Builder.new(encoding: "UTF-8") { |builder|
|
16
|
+
builder.resource(resource_opts) {
|
17
|
+
builder.identifier(identifierType: hsh["datacite.identifiertype"] || "DOI") {
|
18
|
+
builder.text hsh["datacite.identifier"]
|
19
|
+
}
|
20
|
+
builder.creators {
|
21
|
+
builder.creator {
|
22
|
+
builder.creatorName hsh["datacite.creator"]
|
23
|
+
}
|
24
|
+
}
|
25
|
+
builder.titles {
|
26
|
+
builder.title hsh["datacite.title"]
|
27
|
+
}
|
28
|
+
builder.publisher hsh["datacite.publisher"]
|
29
|
+
builder.publicationYear hsh["datacite.publicationyear"]
|
30
|
+
builder.resourceType(resourceTypeGeneral: hsh["datacite.resourcetypegeneral"]) {
|
31
|
+
builder.text hsh["datacite.resourcetype"]
|
32
|
+
}
|
33
|
+
builder.descriptions {
|
34
|
+
builder.description(descriptionType: "Abstract") {
|
35
|
+
builder.text hsh["datacite.description"]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
# Using this save option to prevent NG from rendering new lines and tabs
|
41
|
+
# between nodes. This to help with a cleaner anvl conversion. Similarly,
|
42
|
+
# the sub should just remove the new line after the xml header that NG
|
43
|
+
# adds, ex:
|
44
|
+
# <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<resource ...
|
45
|
+
xml = xml_builder
|
46
|
+
.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)
|
47
|
+
.sub("\n", "")
|
48
|
+
|
49
|
+
|
50
|
+
# Transform the hash
|
51
|
+
hsh.reject! { |k, v| k =~ /^datacite\./ }
|
52
|
+
hsh["datacite"] = xml
|
53
|
+
end
|
54
|
+
|
55
|
+
# Transforms the provided datacite metadata hash into the format appropriate for the Metadata class.
|
56
|
+
# Extracts appropriate fields from the datacite xml and creates the corresponding "datacite.*" keys
|
57
|
+
def self.inverse(hsh)
|
58
|
+
xml = Nokogiri::XML(hsh["datacite"])
|
59
|
+
xmlns = "http://datacite.org/schema/kernel-4"
|
60
|
+
hsh["datacite.identifier"] = xml.at_xpath("/ns:resource/ns:identifier/text()", ns: xmlns).to_s
|
61
|
+
hsh["datacite.identifiertype"] = xml.at_xpath("/ns:resource/ns:identifier/attribute::identifierType", ns: xmlns).to_s
|
62
|
+
hsh["datacite.creator"] = xml.at_xpath("/ns:resource/ns:creators/ns:creator/ns:creatorName/text()", ns: xmlns).to_s
|
63
|
+
hsh["datacite.title"] = xml.at_xpath("/ns:resource/ns:titles/ns:title/text()", ns: xmlns).to_s
|
64
|
+
hsh["datacite.publisher"] = xml.at_xpath("/ns:resource/ns:publisher/text()", ns: xmlns).to_s
|
65
|
+
hsh["datacite.publicationyear"] = xml.at_xpath("/ns:resource/ns:publicationYear/text()", ns: xmlns).to_s
|
66
|
+
hsh["datacite.resourcetype"] = xml.at_xpath("/ns:resource/ns:resourceType/text()", ns: xmlns).to_s
|
67
|
+
hsh["datacite.resourcetypegeneral"] = xml.at_xpath("/ns:resource/ns:resourceType/attribute::resourceTypeGeneral", ns: xmlns).to_s
|
68
|
+
hsh["datacite.description"] = xml.at_xpath("/ns:resource/ns:descriptions/ns:description/text()", ns: xmlns).to_s
|
69
|
+
hsh.delete("datacite")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd"><identifier identifierType="DOI"></identifier><creators><creator><creatorName/></creator></creators><titles><title/></titles><publisher/><publicationYear/><resourceType resourceTypeGeneral=""></resourceType><descriptions><description descriptionType="Abstract"></description></descriptions></resource>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd"><identifier identifierType="TestIdentifierType">TestIdentifier</identifier><creators><creator><creatorName>TestCreatorName</creatorName></creator></creators><titles><title>TestTitle</title></titles><publisher>TestPublisher</publisher><publicationYear>TestPublicationYear</publicationYear><resourceType resourceTypeGeneral="TestResourceTypeGeneral">TestResourceType</resourceType><descriptions><description descriptionType="Abstract">TestDescription</description></descriptions></resource>
|
@@ -0,0 +1,169 @@
|
|
1
|
+
module Ezid
|
2
|
+
RSpec.describe MetadataTransformDatacite do
|
3
|
+
describe "#transform" do
|
4
|
+
before(:each) do
|
5
|
+
described_class.transform(test_hash)
|
6
|
+
end
|
7
|
+
|
8
|
+
context "when there are no datacite fields" do
|
9
|
+
let(:test_hash) { {} }
|
10
|
+
let(:expected_xml) { File.read("spec/fixtures/datacite_xml/empty.xml") }
|
11
|
+
|
12
|
+
it "populates a datacite xml field with all required fields as empty" do
|
13
|
+
expect(test_hash["datacite"]).to eq(expected_xml)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context "when there are datacite fields" do
|
18
|
+
let(:test_hash) { {
|
19
|
+
"datacite.identifier" => "TestIdentifier",
|
20
|
+
"datacite.identifiertype" => "TestIdentifierType",
|
21
|
+
"datacite.creator" => "TestCreatorName",
|
22
|
+
"datacite.title" => "TestTitle",
|
23
|
+
"datacite.publisher" => "TestPublisher",
|
24
|
+
"datacite.publicationyear" => "TestPublicationYear",
|
25
|
+
"datacite.resourcetype" => "TestResourceType",
|
26
|
+
"datacite.resourcetypegeneral" => "TestResourceTypeGeneral",
|
27
|
+
"datacite.description" => "TestDescription",
|
28
|
+
"some.other.field" => "SomeOtherValue",
|
29
|
+
} }
|
30
|
+
let(:expected_xml) { File.read("spec/fixtures/datacite_xml/populated.xml") }
|
31
|
+
|
32
|
+
it "populates a datacite xml field using values from the datacite.* fields" do
|
33
|
+
expect(test_hash["datacite"]).to eq(expected_xml)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "removes the datacite.* fields from the hash" do
|
37
|
+
expect(test_hash.keys).not_to include(
|
38
|
+
"datacite.identifer",
|
39
|
+
"datacite.identifiertype",
|
40
|
+
"datacite.creator",
|
41
|
+
"datacite.title",
|
42
|
+
"datacite.publisher",
|
43
|
+
"datacite.publicationyear",
|
44
|
+
"datacite.resourcetype",
|
45
|
+
"datacite.resourcetypegeneral",
|
46
|
+
"datacite.description",
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "does not remove other fields" do
|
51
|
+
expect(test_hash).to include("some.other.field")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "#inverse" do
|
57
|
+
let(:test_hash) { {
|
58
|
+
"datacite" => test_xml,
|
59
|
+
"some.other.field" => "SomeOtherValue"
|
60
|
+
} }
|
61
|
+
|
62
|
+
before(:each) do
|
63
|
+
described_class.inverse(test_hash)
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
context "when there are no datacite fields" do
|
68
|
+
let(:expected_hash) { {
|
69
|
+
"datacite.identifier" => "",
|
70
|
+
"datacite.identifiertype" => "DOI",
|
71
|
+
"datacite.creator" => "",
|
72
|
+
"datacite.description" => "",
|
73
|
+
"datacite.publicationyear" => "",
|
74
|
+
"datacite.publisher" => "",
|
75
|
+
"datacite.resourcetype" => "",
|
76
|
+
"datacite.resourcetypegeneral" => "",
|
77
|
+
"datacite.title" => "",
|
78
|
+
} }
|
79
|
+
let(:test_xml) { File.read("spec/fixtures/datacite_xml/empty.xml") }
|
80
|
+
|
81
|
+
it "populates all required fields as empty" do
|
82
|
+
expect(test_hash).to include(expected_hash)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context "when there are datacite fields" do
|
87
|
+
let(:expected_hash) { {
|
88
|
+
"datacite.identifier" => "TestIdentifier",
|
89
|
+
"datacite.identifiertype" => "TestIdentifierType",
|
90
|
+
"datacite.creator" => "TestCreatorName",
|
91
|
+
"datacite.title" => "TestTitle",
|
92
|
+
"datacite.publisher" => "TestPublisher",
|
93
|
+
"datacite.publicationyear" => "TestPublicationYear",
|
94
|
+
"datacite.resourcetype" => "TestResourceType",
|
95
|
+
"datacite.resourcetypegeneral" => "TestResourceTypeGeneral",
|
96
|
+
"datacite.description" => "TestDescription",
|
97
|
+
} }
|
98
|
+
let(:test_xml) { File.read("spec/fixtures/datacite_xml/populated.xml") }
|
99
|
+
|
100
|
+
it "populates all fields from the datacite.* fields" do
|
101
|
+
expect(test_hash).to include(expected_hash)
|
102
|
+
end
|
103
|
+
|
104
|
+
it "removes the datacite field" do
|
105
|
+
expect(test_hash).not_to include("datacite")
|
106
|
+
end
|
107
|
+
|
108
|
+
it "does not remove other fields" do
|
109
|
+
expect(test_hash).to include("some.other.field")
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe "#transform then #inverse" do
|
115
|
+
let(:test_hash) { {
|
116
|
+
"datacite.identifier" => "TestIdentifier",
|
117
|
+
"datacite.identifiertype" => "TestIdentifierType",
|
118
|
+
"datacite.creator" => "TestCreatorName",
|
119
|
+
"datacite.title" => "TestTitle",
|
120
|
+
"datacite.publisher" => "TestPublisher",
|
121
|
+
"datacite.publicationyear" => "TestPublicationYear",
|
122
|
+
"datacite.resourcetype" => "TestResourceType",
|
123
|
+
"datacite.resourcetypegeneral" => "TestResourceTypeGeneral",
|
124
|
+
"datacite.description" => "TestDescription",
|
125
|
+
"some.other.field" => "SomeOtherValue",
|
126
|
+
} }
|
127
|
+
|
128
|
+
before(:each) do
|
129
|
+
described_class.transform(test_hash)
|
130
|
+
described_class.inverse(test_hash)
|
131
|
+
end
|
132
|
+
|
133
|
+
it "is a lossless transformation" do
|
134
|
+
expect(test_hash).to eq({
|
135
|
+
"datacite.identifier" => "TestIdentifier",
|
136
|
+
"datacite.identifiertype" => "TestIdentifierType",
|
137
|
+
"datacite.creator" => "TestCreatorName",
|
138
|
+
"datacite.title" => "TestTitle",
|
139
|
+
"datacite.publisher" => "TestPublisher",
|
140
|
+
"datacite.publicationyear" => "TestPublicationYear",
|
141
|
+
"datacite.resourcetype" => "TestResourceType",
|
142
|
+
"datacite.resourcetypegeneral" => "TestResourceTypeGeneral",
|
143
|
+
"datacite.description" => "TestDescription",
|
144
|
+
"some.other.field" => "SomeOtherValue",
|
145
|
+
})
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
describe "#inverse then #transform" do
|
150
|
+
let(:test_xml) { File.read("spec/fixtures/datacite_xml/empty.xml") }
|
151
|
+
let(:test_hash) { {
|
152
|
+
"datacite" => test_xml,
|
153
|
+
"some.other.field" => "SomeOtherValue"
|
154
|
+
} }
|
155
|
+
|
156
|
+
before(:each) do
|
157
|
+
described_class.inverse(test_hash)
|
158
|
+
described_class.transform(test_hash)
|
159
|
+
end
|
160
|
+
|
161
|
+
it "is a lossless transformation" do
|
162
|
+
expect(test_hash).to eq({
|
163
|
+
"datacite" => test_xml,
|
164
|
+
"some.other.field" => "SomeOtherValue"
|
165
|
+
})
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezid-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chandek-Stark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 3.4.3
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: nokogiri
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: bundler
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,6 +58,20 @@ dependencies:
|
|
44
58
|
- - "~>"
|
45
59
|
- !ruby/object:Gem::Version
|
46
60
|
version: '1.7'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: byebug
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
47
75
|
- !ruby/object:Gem::Dependency
|
48
76
|
name: rake
|
49
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,6 +138,7 @@ files:
|
|
110
138
|
- lib/ezid/error.rb
|
111
139
|
- lib/ezid/identifier.rb
|
112
140
|
- lib/ezid/metadata.rb
|
141
|
+
- lib/ezid/metadata_transforms/datacite.rb
|
113
142
|
- lib/ezid/proxy_identifier.rb
|
114
143
|
- lib/ezid/requests/batch_download_request.rb
|
115
144
|
- lib/ezid/requests/create_identifier_request.rb
|
@@ -139,6 +168,8 @@ files:
|
|
139
168
|
- lib/ezid/status.rb
|
140
169
|
- lib/ezid/test_helper.rb
|
141
170
|
- spec/fixtures/anvl_batch.txt
|
171
|
+
- spec/fixtures/datacite_xml/empty.xml
|
172
|
+
- spec/fixtures/datacite_xml/populated.xml
|
142
173
|
- spec/integration/batch_download_spec.rb
|
143
174
|
- spec/integration/client_spec.rb
|
144
175
|
- spec/integration/identifier_spec.rb
|
@@ -148,6 +179,7 @@ files:
|
|
148
179
|
- spec/unit/client_spec.rb
|
149
180
|
- spec/unit/identifier_spec.rb
|
150
181
|
- spec/unit/metadata_spec.rb
|
182
|
+
- spec/unit/metadata_transform_datacite_spec.rb
|
151
183
|
- spec/unit/proxy_identifier_spec.rb
|
152
184
|
homepage: https://github.com/duke-libraries/ezid-client
|
153
185
|
licenses:
|
@@ -169,12 +201,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
201
|
version: '0'
|
170
202
|
requirements: []
|
171
203
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.6.
|
204
|
+
rubygems_version: 2.6.12
|
173
205
|
signing_key:
|
174
206
|
specification_version: 4
|
175
207
|
summary: Ruby client for EZID API Version 2
|
176
208
|
test_files:
|
177
209
|
- spec/fixtures/anvl_batch.txt
|
210
|
+
- spec/fixtures/datacite_xml/empty.xml
|
211
|
+
- spec/fixtures/datacite_xml/populated.xml
|
178
212
|
- spec/integration/batch_download_spec.rb
|
179
213
|
- spec/integration/client_spec.rb
|
180
214
|
- spec/integration/identifier_spec.rb
|
@@ -184,4 +218,5 @@ test_files:
|
|
184
218
|
- spec/unit/client_spec.rb
|
185
219
|
- spec/unit/identifier_spec.rb
|
186
220
|
- spec/unit/metadata_spec.rb
|
221
|
+
- spec/unit/metadata_transform_datacite_spec.rb
|
187
222
|
- spec/unit/proxy_identifier_spec.rb
|