ddr-models 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,19 @@ RSpec.describe Collection, :type => :model do
22
22
  end
23
23
  end
24
24
 
25
+ describe "#components_from_solr" do
26
+ let(:collection) { Collection.new(pid: 'test:1') }
27
+ before do
28
+ allow_any_instance_of(Component).to receive(:collection_uri).and_return(collection.internal_uri)
29
+ end
30
+ it "should return the correct component(s)" do
31
+ component = Component.create
32
+ docs = collection.components_from_solr
33
+ expect(docs.size).to eq(1)
34
+ expect(docs.first.id).to eq(component.pid)
35
+ end
36
+ end
37
+
25
38
  context "validation" do
26
39
  let(:collection) { Collection.new }
27
40
  it "should require a title" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddr-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.2
4
+ version: 1.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Coble
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-12 00:00:00.000000000 Z
12
+ date: 2015-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -336,7 +336,6 @@ files:
336
336
  - lib/ddr/datastreams/descriptive_metadata_datastream.rb
337
337
  - lib/ddr/datastreams/preservation_metadata_datastream.rb
338
338
  - lib/ddr/datastreams/properties_datastream.rb
339
- - lib/ddr/datastreams/role_assignments_datastream.rb
340
339
  - lib/ddr/events.rb
341
340
  - lib/ddr/events/creation_event.rb
342
341
  - lib/ddr/events/event.rb
@@ -1,19 +0,0 @@
1
- module Ddr
2
- module Datastreams
3
- class RoleAssignmentsDatastream < ActiveFedora::NtriplesRDFDatastream
4
-
5
- vocabulary = Ddr::Metadata::RolesVocabulary
6
-
7
- vocabulary.each do |term|
8
- property Ddr::Metadata::Vocabulary.term_name(vocabulary, term), predicate: term do |index|
9
- index.as :symbol
10
- end
11
- end
12
-
13
- def principal_has_role?(principal, role)
14
- (send(role) & Array(principal)).any?
15
- end
16
-
17
- end
18
- end
19
- end