openaccess-apc 0.2.0 → 0.2.1

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: c7586d3504dbc05753219a917ddfb3a5bb291cee
4
- data.tar.gz: acfdfc03743136f6abdbedd5a16d106fd835e325
3
+ metadata.gz: e052242ed7b781cea0a4d318ecb246c4af62c022
4
+ data.tar.gz: afa2a441d87730981498dcbd9f589ecd56f2723e
5
5
  SHA512:
6
- metadata.gz: f72b1e5f906952088bcae00e6e51df2b1bc0a250e2ad75bbf5a6d8ff89afc34734c0c39a81bfa1a79cec9c980eb4e859558cee6a8c043a8d3e761fb74952dd9d
7
- data.tar.gz: 20f41df5cce18bc86912289f35bf5841943de3324b28883cfa4509d98afb1740af07d33294d594b5a809b31bf2a05c929fc17471a809a2c8d4672b5a1f86e774
6
+ metadata.gz: ff34a37d56c2c8eb51642c6ef9a09e6e8d50090d95fa91b51a19d1ce75e4e3f8dec3ce75150a4ff8504cf9439d6db2ea00aa0936422b4d9c56753ec7cb674256
7
+ data.tar.gz: 00bc92546e0af2a73b4c37b711de361a8977bee04052d110547fa9772a9191c9e6d7a65aceec41b98b044ad5c24f08f864812e27ba635d87de06d9807dacf493
@@ -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]])
@@ -1,5 +1,5 @@
1
1
  module OpenAccess
2
2
  module APC
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
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.0
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-21 00:00:00.000000000 Z
11
+ date: 2017-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ldap