ddr-models 1.6.0 → 1.7.0

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.
@@ -5,4 +5,15 @@ RSpec.describe Component, type: :model, components: true do
5
5
  it_behaves_like "an object that can have content"
6
6
  it_behaves_like "it has an association", :belongs_to, :parent, :is_part_of, "Item"
7
7
  it_behaves_like "it has an association", :belongs_to, :target, :has_external_target, "Target"
8
+
9
+ describe "indexing" do
10
+ let(:component) { FactoryGirl.build(:component) }
11
+ before do
12
+ allow_any_instance_of(Component).to receive(:collection) { Collection.new(pid: 'test:1') }
13
+ end
14
+ it "should include the COLLECTION_URI field in its indexing" do
15
+ expect(component.index_fields).to have_key(Ddr::IndexFields::COLLECTION_URI)
16
+ expect(component.index_fields[Ddr::IndexFields::COLLECTION_URI]).to eq('info:fedora/test:1')
17
+ end
18
+ end
8
19
  end
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.6.0
4
+ version: 1.7.0
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: 2014-12-18 00:00:00.000000000 Z
12
+ date: 2015-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -87,14 +87,14 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '1.2'
90
+ version: 1.3.1
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '1.2'
97
+ version: 1.3.1
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: devise-remote-user
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -308,7 +308,6 @@ files:
308
308
  - lib/ddr/managers.rb
309
309
  - lib/ddr/managers/permanent_id_manager.rb
310
310
  - lib/ddr/metadata.rb
311
- - lib/ddr/metadata/#permanent_id_record.rb#
312
311
  - lib/ddr/metadata/duke_terms.rb
313
312
  - lib/ddr/metadata/premis_event.rb
314
313
  - lib/ddr/metadata/rdf_vocabulary_parser.rb
@@ -316,8 +315,6 @@ files:
316
315
  - lib/ddr/metadata/sources/duketerms.rdf.xml
317
316
  - lib/ddr/metadata/vocabulary.rb
318
317
  - lib/ddr/models.rb
319
- - lib/ddr/models/#has_ezid_identifier.rb#
320
- - lib/ddr/models/#has_permanent_identifier.rb#
321
318
  - lib/ddr/models/access_controllable.rb
322
319
  - lib/ddr/models/base.rb
323
320
  - lib/ddr/models/describable.rb
@@ -343,7 +340,6 @@ files:
343
340
  - lib/ddr/notifications.rb
344
341
  - lib/ddr/utils.rb
345
342
  - lib/ddr/vocab.rb
346
- - lib/ddr/vocab.rb~
347
343
  - lib/ddr/vocab/preservation.rb
348
344
  - lib/ddr/workflow.rb
349
345
  - lib/ddr/workflow/workflow_state.rb
@@ -1,13 +0,0 @@
1
- module Ddr
2
- module Metadata
3
- class PermanentIdRecord
4
-
5
- def self.find(id)
6
- Ezid::Identifier.find(id)
7
- end
8
-
9
-
10
-
11
- end
12
- end
13
- end
@@ -1,26 +0,0 @@
1
- module Ddr
2
- module Models
3
- module HasEzidIdentifier
4
-
5
- protected
6
-
7
-
8
- def create_identifier
9
- create_ezid
10
- end
11
-
12
- private
13
-
14
- def create_ezid
15
- metadata = Ddr::Metadata::Ezid.new(self)
16
- ezid_identifier = Ezid::Identifier.create(metadata)
17
- Ddr::Metadata::PermanentIdentifier.new(ezid_identifier.id)
18
- end
19
-
20
- def get_ezid
21
- Ezid::Identifier.find(permanent_id.value)
22
- end
23
-
24
- end
25
- end
26
- end
@@ -1,9 +0,0 @@
1
- module Ddr
2
- module Models
3
- module HasPermanentIdentifier
4
-
5
-
6
-
7
- end
8
- end
9
- end
data/lib/ddr/vocab.rb~ DELETED
@@ -1,9 +0,0 @@
1
- module Ddr
2
- module Vocab
3
- extend ActiveSupport::Autoload
4
-
5
- autoload :PREMIS
6
- autoload :Preservation
7
-
8
- end
9
- end