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: f3f9b9406265b2b6201450ad5cc89e05236585e1
4
- data.tar.gz: 05bdb60155491c6602b663e71fc9fc7b22036809
3
+ metadata.gz: 227c7fcd9a6a9990741af16b0c74790bc3ea2be8
4
+ data.tar.gz: cd2b439253d0f68120b99b4c15da1a9e3b79b2cf
5
5
  SHA512:
6
- metadata.gz: fbe768ea452370dfb42422ed426e20e4530f73b9a465b281e120cf2e7175b2033bb6160ba8d2c9085731baa5412bbc67b5dda673c5a7e1711687274600b6ac55
7
- data.tar.gz: 420fb0dd732d450abfbb19eba6c2a08b68bd11679d23fc2f29b88bc789c9c2451c89a6b47396a474bfed7e7c295d8a6a2980f71de7146d21613c6e08ef13292f
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
- # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
10
- def embargo_release_date_with_casting=(date)
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
- # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
9
- def lease_expiration_date_with_casting=(date)
10
- date = DateTime.parse(date) if date && date.kind_of?(String)
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
@@ -11,16 +11,12 @@ module Hydra
11
11
  index.as :searchable
12
12
  end
13
13
 
14
- # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
15
- def description_with_first
16
- description_without_first.first
14
+ def description
15
+ super.first
17
16
  end
18
- alias_method_chain :description, :first
19
17
 
20
- # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
21
- def title_with_first
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.2
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-07-12 00:00:00.000000000 Z
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: