puree 1.7.0 → 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/CHANGELOG.md +4 -0
- data/lib/puree/extractor/publication.rb +1 -0
- data/lib/puree/model/publication.rb +3 -0
- data/lib/puree/version.rb +1 -1
- data/lib/puree/xml_extractor/publication.rb +11 -0
- data/spec/resource/publication_http_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4995f2080d8092029331df8ba6752cea555b1b48
|
|
4
|
+
data.tar.gz: 24aec0bda1634d0bbced242f261634bf28675e5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07a2f1c6329cda2041e0afaa3f97993671dbb2fd995d20acb5dcb53073c11681f29771ba939281f76681dab12c7b11c2d31f317c67175eb65719b095e5853d75
|
|
7
|
+
data.tar.gz: 9c3bc62895e8abf97120d11dee78e6d2130a965db3c29b68ed9330b44043dcb0ced0ddd381760833419084b1c6bdae45576c8d51edc0818d00dbbd831958e17c
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
- Metadata: activity?, clipping?, externalPerson?
|
|
7
7
|
|
|
8
|
+
## 1.8.0 - 2018-03-02
|
|
9
|
+
### Added
|
|
10
|
+
- Publication - Scopus id.
|
|
11
|
+
|
|
8
12
|
## 1.7.0 - 2017-11-03
|
|
9
13
|
### Added
|
|
10
14
|
- Person extractor - find by identifier.
|
|
@@ -34,6 +34,7 @@ module Puree
|
|
|
34
34
|
@model.persons_other = @extractor.persons_other
|
|
35
35
|
@model.publication_place = @extractor.publication_place
|
|
36
36
|
@model.publisher = @extractor.publisher
|
|
37
|
+
@model.scopus_id = @extractor.scopus_id
|
|
37
38
|
@model.statuses = @extractor.statuses
|
|
38
39
|
@model.subtitle = @extractor.subtitle
|
|
39
40
|
@model.title = @extractor.title
|
data/lib/puree/version.rb
CHANGED
|
@@ -116,6 +116,17 @@ module Puree
|
|
|
116
116
|
xpath_result
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
+
# @return [String, nil]
|
|
120
|
+
def scopus_id
|
|
121
|
+
# xpath_result = xpath_query_for_single_value '/external/secondarySource'
|
|
122
|
+
xpath_result = xpath_query '/external/secondarySource'
|
|
123
|
+
return if xpath_result.empty?
|
|
124
|
+
source = xpath_result.xpath('@source')
|
|
125
|
+
if source && source.text.strip === 'Scopus'
|
|
126
|
+
return xpath_result.xpath('@source_id').text.strip
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
119
130
|
# @return [Array<Puree::Model::PublicationStatus>]
|
|
120
131
|
def statuses
|
|
121
132
|
xpath_result = xpath_query '/publicationStatuses/publicationStatus'
|
|
@@ -85,6 +85,10 @@ describe 'Publication' do
|
|
|
85
85
|
expect(@p.publisher).to be_a String if @p.publisher
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
+
it '#scopus_id' do
|
|
89
|
+
expect(@p.scopus_id).to be_a String if @p.scopus_id
|
|
90
|
+
end
|
|
91
|
+
|
|
88
92
|
it '#statuses' do
|
|
89
93
|
expect(@p.statuses).to all( be_a Puree::Model::PublicationStatus )
|
|
90
94
|
end
|
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: 1.
|
|
4
|
+
version: 1.8.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:
|
|
11
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: http
|