openaccess-apc 0.2.0 → 0.2.1
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/lib/openaccess/apc.rb +4 -2
- data/lib/openaccess/apc/version.rb +1 -1
- 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: e052242ed7b781cea0a4d318ecb246c4af62c022
|
|
4
|
+
data.tar.gz: afa2a441d87730981498dcbd9f589ecd56f2723e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff34a37d56c2c8eb51642c6ef9a09e6e8d50090d95fa91b51a19d1ce75e4e3f8dec3ce75150a4ff8504cf9439d6db2ea00aa0936422b4d9c56753ec7cb674256
|
|
7
|
+
data.tar.gz: 00bc92546e0af2a73b4c37b711de361a8977bee04052d110547fa9772a9191c9e6d7a65aceec41b98b044ad5c24f08f864812e27ba635d87de06d9807dacf493
|
data/lib/openaccess/apc.rb
CHANGED
|
@@ -171,6 +171,7 @@ module OpenAccess
|
|
|
171
171
|
|
|
172
172
|
# Returns the Pure person UUID given a network username
|
|
173
173
|
# @param username [String] the network username
|
|
174
|
+
# @param employee_id [Integer, String] the Pure employee ID
|
|
174
175
|
# @return [String] the Pure UUID of the corresponding person
|
|
175
176
|
def self.person(username = nil, employee_id: nil)
|
|
176
177
|
employee_id ||= person_employee_id(username)
|
|
@@ -188,10 +189,11 @@ module OpenAccess
|
|
|
188
189
|
# publications deposited on or up to this date
|
|
189
190
|
# @option opts [Date, DateTime, String, Time] :created_start include
|
|
190
191
|
# publications deposited on or after this date
|
|
192
|
+
# @option opts [Integer, String] the Pure employee ID
|
|
191
193
|
# @option opts [Integer] :results the number of eligible publications
|
|
192
194
|
# required
|
|
193
|
-
def self.publications_for_person(username, **opts)
|
|
194
|
-
person_uuid = person(username)
|
|
195
|
+
def self.publications_for_person(username = nil, **opts)
|
|
196
|
+
person_uuid = person(username, employee_id: opts[:employee_id])
|
|
195
197
|
publications_criteria(opts)
|
|
196
198
|
pubs = @person_query.publications_extended(uuid: person_uuid, **opts)
|
|
197
199
|
publications_summary(pubs[0..opts[:results]])
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openaccess-apc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Digital Innovation, Lancaster University Library
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-ldap
|