puree 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 585ed698743104873457d87a11f27bb057dbf058
4
- data.tar.gz: d07c203393a1bf086334717f3ba1a7522b6ad112
3
+ metadata.gz: 4995f2080d8092029331df8ba6752cea555b1b48
4
+ data.tar.gz: 24aec0bda1634d0bbced242f261634bf28675e5d
5
5
  SHA512:
6
- metadata.gz: 18bf2dc5e85692a4a9f575426c8716ace87239070f84545a57de4cb9936ebee91c4321ac53a1e87e0fe7ad20409c663efd3fe09f434ac28487e15acacfc343bb
7
- data.tar.gz: 0e6696e6c19c715186622a29bb73e2175a8ed0aed1c69bf220aed3d03f9653fbe86614ee317657d56c276d9779fc582b54aba324e0030d540b41e13c5a45a6fd
6
+ metadata.gz: 07a2f1c6329cda2041e0afaa3f97993671dbb2fd995d20acb5dcb53073c11681f29771ba939281f76681dab12c7b11c2d31f317c67175eb65719b095e5853d75
7
+ data.tar.gz: 9c3bc62895e8abf97120d11dee78e6d2130a965db3c29b68ed9330b44043dcb0ced0ddd381760833419084b1c6bdae45576c8d51edc0818d00dbbd831958e17c
@@ -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
@@ -56,6 +56,9 @@ module Puree
56
56
  # @return [String, nil]
57
57
  attr_accessor :publisher
58
58
 
59
+ # @return [String, nil]
60
+ attr_accessor :scopus_id
61
+
59
62
  # @return [Array<Puree::Model::PublicationStatus>]
60
63
  attr_accessor :statuses
61
64
 
@@ -1,5 +1,5 @@
1
1
  module Puree
2
2
  # Semantic version number
3
3
  #
4
- VERSION = "1.7.0"
4
+ VERSION = "1.8.0"
5
5
  end
@@ -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.7.0
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: 2017-11-03 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http