relaton-bib 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_bib/bibliographic_item.rb +1 -1
- data/lib/relaton_bib/document_identifier.rb +2 -1
- data/lib/relaton_bib/localized_string.rb +1 -1
- data/lib/relaton_bib/typed_uri.rb +6 -1
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +4 -4
- data/relaton-bib.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dd4730cb860ea6fea05b214a89a7e180acca7cebdfde515924cff5cbc006631
|
4
|
+
data.tar.gz: c71b46fefb288fdc2b3e51122d793cd225431bd5818aad704bbf78dfc8aa36c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22616fba5d4a2a502b2f969efacb00a8384e94d69b75147687ea0f086019d1614db7e5393c6b4d2e7ea5eb336332c5a208690ddda0bdd1593ed29b344a48d049
|
7
|
+
data.tar.gz: f2d074312be6ed3194b08dc0b6e5cc2eb6b269216d1b0500b072fb6868b66e47d09fa21abfc5dd43cf2e22fdb82fd948c0597526fec64da5c8ee2e8dc4ae6c85
|
@@ -171,7 +171,7 @@ module RelatonBib
|
|
171
171
|
# @option link [String] :content
|
172
172
|
def initialize(**args)
|
173
173
|
if args[:type] && !TYPES.include?(args[:type])
|
174
|
-
warn %{
|
174
|
+
warn %{[relaton-bib] document type "#{args[:type]}" is invalid.}
|
175
175
|
end
|
176
176
|
|
177
177
|
@title = (args[:title] || []).map do |t|
|
@@ -6,7 +6,7 @@ module RelatonBib
|
|
6
6
|
# @return [Symbol] :src/:obp/:rss
|
7
7
|
attr_reader :type
|
8
8
|
# @retutn [URI]
|
9
|
-
|
9
|
+
attr_reader :content
|
10
10
|
|
11
11
|
# @param type [String] src/obp/rss
|
12
12
|
# @param content [String]
|
@@ -15,6 +15,11 @@ module RelatonBib
|
|
15
15
|
@content = Addressable::URI.parse content if content
|
16
16
|
end
|
17
17
|
|
18
|
+
# @parma url [String]
|
19
|
+
def content=(url)
|
20
|
+
@content = Addressable::URI.parse url
|
21
|
+
end
|
22
|
+
|
18
23
|
# @param builder [Nokogiri::XML::Builder]
|
19
24
|
def to_xml(builder)
|
20
25
|
builder.uri(content.to_s, type: type)
|
data/lib/relaton_bib/version.rb
CHANGED
@@ -168,12 +168,12 @@ module RelatonBib
|
|
168
168
|
end
|
169
169
|
|
170
170
|
def fetch_dates(item)
|
171
|
-
item.xpath("./date").
|
171
|
+
item.xpath("./date").reduce([]) do |a, d|
|
172
172
|
type = d[:type].to_s.empty? ? "published" : d[:type]
|
173
173
|
if (on = d.at("on"))
|
174
|
-
RelatonBib::BibliographicDate.new(type: type, on: on.text, to: d.at("to")&.text)
|
175
|
-
elsif (from = d.at
|
176
|
-
RelatonBib::BibliographicDate.new(type: type, from: from.text, to: d.at("to")&.text)
|
174
|
+
a << RelatonBib::BibliographicDate.new(type: type, on: on.text, to: d.at("to")&.text)
|
175
|
+
elsif (from = d.at("from"))
|
176
|
+
a << RelatonBib::BibliographicDate.new(type: type, from: from.text, to: d.at("to")&.text)
|
177
177
|
end
|
178
178
|
end
|
179
179
|
end
|
data/relaton-bib.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "RelatonBib: Ruby XMLDOC impementation."
|
12
12
|
spec.description = "RelatonBib: Ruby XMLDOC impementation."
|
13
|
-
spec.homepage = "https://github.com/relaton/relaton-
|
13
|
+
spec.homepage = "https://github.com/relaton/relaton-bib"
|
14
14
|
spec.license = "BSD-2-Clause"
|
15
15
|
|
16
16
|
# Specify which files should be added to the gem when it is released.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -193,7 +193,6 @@ files:
|
|
193
193
|
- ".rspec"
|
194
194
|
- ".rubocop.yml"
|
195
195
|
- Gemfile
|
196
|
-
- Gemfile.lock
|
197
196
|
- LICENSE.txt
|
198
197
|
- README.adoc
|
199
198
|
- Rakefile
|
@@ -235,7 +234,7 @@ files:
|
|
235
234
|
- lib/relaton_bib/workers_pool.rb
|
236
235
|
- lib/relaton_bib/xml_parser.rb
|
237
236
|
- relaton-bib.gemspec
|
238
|
-
homepage: https://github.com/relaton/relaton-
|
237
|
+
homepage: https://github.com/relaton/relaton-bib
|
239
238
|
licenses:
|
240
239
|
- BSD-2-Clause
|
241
240
|
metadata: {}
|