puree 2.5.1 → 2.6.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/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/puree/model/resource.rb +8 -0
- data/lib/puree/version.rb +1 -1
- data/lib/puree/xml_extractor/resource.rb +6 -0
- data/test/xml_extractor/xml_extractor_project_test.rb +7 -0
- data/test/xml_extractor/xml_extractor_research_output_test.rb +7 -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: 4c24eb641ac01ba9ed21562d4dce8df4046b08000f41940fc508a6db329ce7da
|
4
|
+
data.tar.gz: d89a38743bf799cfe5ac1e40cdfbbf50194849d54e6a2dc7ddbf81121cf3fb4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0fc15bc9e77345916ff7bc1265dbf453a5a57c3dfe9045d47e5d8e56a45c6a94c42b9a5319c682f83db5cc52edd6c4a0c2dc7fcb8403b8b865e1b2cffd35991
|
7
|
+
data.tar.gz: e782937aa2b31e9515e494f3d6dff3f0000fcd947670dfe38a0e5e65b566e966c1eb900ea08ed91b47e0ddf825c340e5539793610c012d6cec07a53c7422e175
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
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
|
+
## 2.6.0 2019-01-14
|
6
|
+
### Added
|
7
|
+
- Resource subclasses - previous_uuids.
|
8
|
+
|
5
9
|
## 2.5.1 2019-01-11
|
6
10
|
### Fixed
|
7
11
|
- Research output - file URL, scopus metric data types.
|
data/README.md
CHANGED
@@ -36,9 +36,9 @@ Purée is tested using known data within a Pure installation.
|
|
36
36
|
|
37
37
|
Purée version | Pure API version
|
38
38
|
:---: | :---:
|
39
|
-
< 2 | < 59
|
40
|
-
< 2.5 |
|
41
|
-
2.5 |
|
39
|
+
< 2.0 | < 59
|
40
|
+
>= 2.0, < 2.5 | 59, 510
|
41
|
+
>= 2.5 | 511, 512
|
42
42
|
|
43
43
|
## Extractor module
|
44
44
|
```ruby
|
data/lib/puree/model/resource.rb
CHANGED
@@ -8,6 +8,9 @@ module Puree
|
|
8
8
|
# @return [String, nil]
|
9
9
|
attr_reader :uuid
|
10
10
|
|
11
|
+
# @return [Array<String>]
|
12
|
+
attr_reader :previous_uuids
|
13
|
+
|
11
14
|
# @return [String, nil]
|
12
15
|
attr_reader :created_by
|
13
16
|
|
@@ -25,6 +28,11 @@ module Puree
|
|
25
28
|
@uuid = v if v && !v.empty?
|
26
29
|
end
|
27
30
|
|
31
|
+
# @param v [String]
|
32
|
+
def previous_uuids=(v)
|
33
|
+
@previous_uuids = v
|
34
|
+
end
|
35
|
+
|
28
36
|
# @param v [String]
|
29
37
|
def created_by=(v)
|
30
38
|
@created_by = v
|
data/lib/puree/version.rb
CHANGED
@@ -42,6 +42,11 @@ module Puree
|
|
42
42
|
xpath_query_for_single_value '/@uuid'
|
43
43
|
end
|
44
44
|
|
45
|
+
# @return [Array<String>]
|
46
|
+
def previous_uuids
|
47
|
+
xpath_query_for_multi_value '/info/previousUuids/previousUuid'
|
48
|
+
end
|
49
|
+
|
45
50
|
private
|
46
51
|
|
47
52
|
def xpath_query(path)
|
@@ -58,6 +63,7 @@ module Puree
|
|
58
63
|
@model.created_at = created_at
|
59
64
|
@model.modified_by = modified_by
|
60
65
|
@model.modified_at = modified_at
|
66
|
+
@model.previous_uuids = previous_uuids
|
61
67
|
end
|
62
68
|
|
63
69
|
end
|
@@ -40,6 +40,10 @@ class TestXMLExtractorProject < Minitest::Test
|
|
40
40
|
assert x.organisational_units.first.data?
|
41
41
|
assert_name_header x.organisational_units.first
|
42
42
|
|
43
|
+
assert_instance_of Array, x.previous_uuids
|
44
|
+
refute_empty x.previous_uuids
|
45
|
+
assert_instance_of String, x.previous_uuids.first
|
46
|
+
|
43
47
|
assert_instance_of String, x.status
|
44
48
|
refute_empty x.status
|
45
49
|
|
@@ -141,6 +145,9 @@ class TestXMLExtractorProject < Minitest::Test
|
|
141
145
|
assert_instance_of Array, x.persons_other
|
142
146
|
assert_empty x.persons_other
|
143
147
|
|
148
|
+
assert_instance_of Array, x.previous_uuids
|
149
|
+
assert_empty x.previous_uuids
|
150
|
+
|
144
151
|
assert_nil x.status
|
145
152
|
|
146
153
|
assert_nil x.temporal
|
@@ -69,6 +69,10 @@ class TestXMLExtractorResearchOutput < Minitest::Test
|
|
69
69
|
assert_instance_of Array, x.persons_external
|
70
70
|
assert_endeavour_person x.persons_external.first
|
71
71
|
|
72
|
+
assert_instance_of Array, x.previous_uuids
|
73
|
+
refute_empty x.previous_uuids
|
74
|
+
assert_instance_of String, x.previous_uuids.first
|
75
|
+
|
72
76
|
assert_instance_of Array, x.publication_statuses
|
73
77
|
data = x.publication_statuses.first
|
74
78
|
assert_instance_of Puree::Model::PublicationStatus, data
|
@@ -239,6 +243,9 @@ class TestXMLExtractorResearchOutput < Minitest::Test
|
|
239
243
|
assert_instance_of Array, x.persons_other
|
240
244
|
assert_empty x.persons_other
|
241
245
|
|
246
|
+
assert_instance_of Array, x.previous_uuids
|
247
|
+
assert_empty x.previous_uuids
|
248
|
+
|
242
249
|
assert_instance_of Array, x.projects
|
243
250
|
assert_empty x.projects
|
244
251
|
|
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.6.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: 2019-01-
|
11
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|