darlingtonia 3.0.4 → 3.0.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be5042f9ac88ade67585052eae9cc2dfa30855be0356bbee2f2895150c5d9a5
|
4
|
+
data.tar.gz: 0466ed8a2f5fd289c591ca230f987d294b3710cac3becc4a0a3194c6c73ea31f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18b96a5efae6c3f30c5965c88cd35e974db44e1abd155ab01fb19cdd1b53719d24c6ed4e0e29b45c4744f7534bd18fe18a7c674d4e9d1bc2cb92f07e7a200233
|
7
|
+
data.tar.gz: 7a3a556e44d1ca0552b84f3db46abe19ec35260c2c6ddfbd0fe370341748e927e1345162bac1e5aba939a9b78343d8a4b1b85d0b2929991729d36ba07e0d6553
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
3.0.5 - Tue Feb 26, 2019
|
2
|
+
|
3
|
+
When setting the depositor, query for user with `find_by_user_key`, which is the Hyrax convention.
|
4
|
+
If user_key isn't found, fall back to querying by User.id for backward compatibility.
|
5
|
+
|
1
6
|
3.0.4 - Fri Feb 22, 2019
|
2
7
|
|
3
8
|
* Allow subclassed libraries not to have a files field
|
@@ -48,8 +48,9 @@ module Darlingtonia
|
|
48
48
|
# "depositor" is a required field for Hyrax. If
|
49
49
|
# it hasn't been set, set it to the Hyrax default
|
50
50
|
# batch user.
|
51
|
-
def set_depositor(
|
52
|
-
user = User.
|
51
|
+
def set_depositor(user_key)
|
52
|
+
user = ::User.find_by_user_key(user_key) if user_key
|
53
|
+
user ||= ::User.find(user_key) if user_key
|
53
54
|
user ||= ::User.find_or_create_system_user(DEFAULT_CREATOR_KEY)
|
54
55
|
self.depositor = user
|
55
56
|
end
|
data/lib/darlingtonia/version.rb
CHANGED
@@ -128,7 +128,7 @@ describe Darlingtonia::HyraxRecordImporter, :clean do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
context 'when depositor is passed to initializer' do
|
131
|
-
subject(:importer) { described_class.new(error_stream: error_stream, info_stream: info_stream, attributes: { depositor_id: user.
|
131
|
+
subject(:importer) { described_class.new(error_stream: error_stream, info_stream: info_stream, attributes: { depositor_id: user.user_key }) }
|
132
132
|
|
133
133
|
let(:user) { ::User.new(id: '123', user_key: 'special_user@example.com') }
|
134
134
|
before { allow(::User).to receive(:find).and_return(user) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darlingtonia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Data Curation Experts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|