puree 2.3.0 → 2.4.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 951d9defbfc0c08a02ce5a113e567fe2483bb0273fdaf6357b8b69b1af8f82d5
|
4
|
+
data.tar.gz: 644f09fe6de39e789ef0b186ece794a044bacc49aed60912d3c6ccf8cb6f958b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5ae5ad398b0f593d0a89535bddf7ac9b42335457305d60657176b933d42d56ece5ed3d45b8366e46002bfdc9c225682506898a7b6ad24e6d75198256f7b973
|
7
|
+
data.tar.gz: ce2ad05d7fe37585fa768988b506be9de69c927e8156fb1c51d8e48197bb416c3e6c58b2b87fad242f0a7da8dd347c587d0d97af77273612a3e346f79d779915
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,14 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
-
|
5
|
+
## 2.4.0 2018-10-17
|
6
|
+
### Added
|
7
|
+
- Research output - dois.
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
- Research output - doi combining multiple dois.
|
11
|
+
|
12
|
+
## 2.3.0 2018-10-09
|
6
13
|
### Added
|
7
14
|
- POST for REST module.
|
8
15
|
- Count and random in extractor extended with GET and POST parameters.
|
data/lib/puree/version.rb
CHANGED
@@ -31,10 +31,17 @@ module Puree
|
|
31
31
|
xpath_query_for_single_value '/category'
|
32
32
|
end
|
33
33
|
|
34
|
-
# Digital Object Identifier
|
34
|
+
# Digital Object Identifier (first one, if many)
|
35
35
|
# @return [String, nil]
|
36
36
|
def doi
|
37
|
-
|
37
|
+
multiple_dois = dois
|
38
|
+
multiple_dois.empty? ? nil : multiple_dois.first
|
39
|
+
end
|
40
|
+
|
41
|
+
# Digital Object Identifiers
|
42
|
+
# @return [Array<String>]
|
43
|
+
def dois
|
44
|
+
xpath_query_for_multi_value '/electronicVersions/electronicVersion[@type="wsElectronicVersionDoiAssociation"]/doi'
|
38
45
|
end
|
39
46
|
|
40
47
|
# @return [Array<Puree::Model::File>]
|
@@ -170,6 +177,7 @@ module Puree
|
|
170
177
|
@model.category = category
|
171
178
|
@model.description = description
|
172
179
|
@model.doi = doi
|
180
|
+
@model.dois = dois
|
173
181
|
@model.files = files
|
174
182
|
@model.keywords = keywords
|
175
183
|
@model.language = language
|
data/puree.gemspec
CHANGED
@@ -9,7 +9,9 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = 'Adrian Albin-Clark'
|
10
10
|
spec.email = 'a.albin-clark@lancaster.ac.uk'
|
11
11
|
spec.summary = %q{Metadata extraction from the Pure Research Information System.}
|
12
|
-
spec.
|
12
|
+
spec.metadata = {
|
13
|
+
'source_code_uri' => 'https://github.com/lulibrary/puree'
|
14
|
+
}
|
13
15
|
spec.license = 'MIT'
|
14
16
|
spec.files = `git ls-files -z`.split("\x0")
|
15
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -88,6 +88,15 @@ class TestXMLExtractorResearchOutput < Minitest::Test
|
|
88
88
|
refute_empty x.bibliographical_note
|
89
89
|
end
|
90
90
|
|
91
|
+
def test_dois
|
92
|
+
# The spatial-temporal characteristics and health impacts of ambient fine particulate matter in China
|
93
|
+
id = 'a06ce5cd-a9e8-4e87-aa55-7a8616d1d69d'
|
94
|
+
x = xml_extractor_from_id id
|
95
|
+
|
96
|
+
assert_instance_of Array, x.dois
|
97
|
+
refute_empty x.dois
|
98
|
+
end
|
99
|
+
|
91
100
|
def test_keywords
|
92
101
|
# The effect of humic substances on barite precipitation-dissolution behaviour in natural and synthetic lake waters
|
93
102
|
id = 'ce76dbda-8b22-422b-9bb6-8143820171b8'
|
@@ -170,6 +179,8 @@ class TestXMLExtractorResearchOutput < Minitest::Test
|
|
170
179
|
|
171
180
|
assert_nil x.doi
|
172
181
|
|
182
|
+
assert_empty x.dois
|
183
|
+
|
173
184
|
assert_instance_of Array, x.files
|
174
185
|
assert_empty x.files
|
175
186
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Albin-Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -222,10 +222,11 @@ files:
|
|
222
222
|
- test/xml_extractor/xml_extractor_publisher_test.rb
|
223
223
|
- test/xml_extractor/xml_extractor_research_output_test.rb
|
224
224
|
- test/xml_extractor/xml_extractor_thesis_test.rb
|
225
|
-
homepage:
|
225
|
+
homepage:
|
226
226
|
licenses:
|
227
227
|
- MIT
|
228
|
-
metadata:
|
228
|
+
metadata:
|
229
|
+
source_code_uri: https://github.com/lulibrary/puree
|
229
230
|
post_install_message:
|
230
231
|
rdoc_options: []
|
231
232
|
require_paths:
|