hydra-access-controls 10.0.2 → 10.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 227c7fcd9a6a9990741af16b0c74790bc3ea2be8
|
4
|
+
data.tar.gz: cd2b439253d0f68120b99b4c15da1a9e3b79b2cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 425b092455b7191fd781dd267dab81495ef33cae744403d0e13b1efc1a65e9ee200fed164757831c433b8f8d5502500ee63a8002a932cfedf2a6a9cca681bd3e
|
7
|
+
data.tar.gz: de0ede421bf5fcdc13ad69010a2e0423c7e74fe4d7b0ec7405bce2d9a769a4f86dfc9f2bd6bdd8c8ec50c77a581747424a809aaa97bf456a189f5ea58364a4cd
|
@@ -5,13 +5,10 @@ module Hydra::AccessControls
|
|
5
5
|
property :embargo_release_date, predicate: Hydra::ACL.embargoReleaseDate, multiple:false
|
6
6
|
property :embargo_history, predicate: Hydra::ACL.embargoHistory
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
date = DateTime.parse(date) if date && date.kind_of?(String)
|
12
|
-
self.embargo_release_date_without_casting = date
|
8
|
+
def embargo_release_date=(date)
|
9
|
+
date = DateTime.parse(date) if date.kind_of?(String)
|
10
|
+
super(date)
|
13
11
|
end
|
14
|
-
alias_method_chain :embargo_release_date=, :casting
|
15
12
|
|
16
13
|
def active?
|
17
14
|
(embargo_release_date.present? && Date.today < embargo_release_date)
|
@@ -5,12 +5,10 @@ module Hydra::AccessControls
|
|
5
5
|
property :lease_expiration_date, predicate: Hydra::ACL.leaseExpirationDate, multiple:false
|
6
6
|
property :lease_history, predicate: Hydra::ACL.leaseHistory
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
self.lease_expiration_date_without_casting = date
|
8
|
+
def lease_expiration_date=(date)
|
9
|
+
date = DateTime.parse(date) if date.kind_of?(String)
|
10
|
+
super(date)
|
12
11
|
end
|
13
|
-
alias_method_chain :lease_expiration_date=, :casting
|
14
12
|
|
15
13
|
def active?
|
16
14
|
lease_expiration_date.present? && Date.today < lease_expiration_date
|
data/lib/hydra/admin_policy.rb
CHANGED
@@ -11,16 +11,12 @@ module Hydra
|
|
11
11
|
index.as :searchable
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
description_without_first.first
|
14
|
+
def description
|
15
|
+
super.first
|
17
16
|
end
|
18
|
-
alias_method_chain :description, :first
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
title_without_first.first
|
18
|
+
def title
|
19
|
+
super.first
|
23
20
|
end
|
24
|
-
alias_method_chain :title, :first
|
25
21
|
end
|
26
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-access-controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0
|
4
|
+
version: 10.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -269,4 +269,3 @@ test_files:
|
|
269
269
|
- spec/unit/with_access_right_spec.rb
|
270
270
|
- spec/unit/with_depositor_spec.rb
|
271
271
|
- spec/validators/future_date_validator_spec.rb
|
272
|
-
has_rdoc:
|