activefedora-aggregation 0.4.0 → 0.4.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: 8f00db6b3c02104511eb24172593e567c17e1c84
4
- data.tar.gz: 4cabc6488f7716bb5a9edd3a26c92c6b4eeebb33
3
+ metadata.gz: 280dd5b02adafa34459d6206a9e0fb696250af69
4
+ data.tar.gz: becbdd66e713db807545eaaeed526a3faf75d1e4
5
5
  SHA512:
6
- metadata.gz: 5f4a6f16a8dc168310c3f781aba33f6de48c0905e1e31fff72115a5d192019b9748ff34776d375d29dd8c89b4a0172025d1d01ab0118c3895e2d487d7e5ae9a4
7
- data.tar.gz: d3d4369c5b6e5975ee180402500c37e3acc81fdd1de9bbb9aba400e0f239f5a3d31d75c26df0b12e2d2bb4ccb74190d21508b3f11010737b0b5197f64f938c45
6
+ metadata.gz: a7dc0b2e993dc64cfe3033aa5cc78fdb73d2b0b8302c2ba399192bcb506ca41d5f3da97c51324aab232de5461b1e1cf059a012a167d6f107fe8af94fc579cb20
7
+ data.tar.gz: 3e9a2d9653096747517d2fdfa7843f9850e8aea9ee4cca8379c3a95462a7e2c5ca9de182af34452ed4df4dc719e12176b0fe80e8e56ddecda563c93fb61a90b1
@@ -16,6 +16,7 @@ module ActiveFedora::Aggregation
16
16
 
17
17
  # Implements the ids reader method, e.g. foo.item_ids for Foo.has_many :items
18
18
  def ids_reader
19
+ return [] if @owner.new_record?
19
20
  if loaded?
20
21
  load_target.map do |record|
21
22
  record.id
@@ -30,6 +31,7 @@ module ActiveFedora::Aggregation
30
31
 
31
32
  # Write a query to find the proxies
32
33
  def construct_proxy_query
34
+ raise "Owner must have an identifier" unless @owner.id
33
35
  @proxy_query ||= begin
34
36
  clauses = { 'proxyIn' => @owner.id }
35
37
  clauses[:has_model] = ActiveFedora::Aggregation::Proxy.to_class_uri
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module Aggregation
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefedora-aggregation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.4.5
188
+ rubygems_version: 2.4.5.1
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Aggregations for active-fedora