active-fedora 9.9.0 → 9.10.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +20 -6
- data/.travis.yml +2 -6
- data/History.txt +146 -0
- data/active-fedora.gemspec +11 -8
- data/lib/active_fedora/associations/association.rb +44 -14
- data/lib/active_fedora/associations/association_scope.rb +6 -2
- data/lib/active_fedora/associations/basic_contains_association.rb +2 -3
- data/lib/active_fedora/associations/belongs_to_association.rb +23 -14
- data/lib/active_fedora/associations/builder/association.rb +95 -41
- data/lib/active_fedora/associations/builder/belongs_to.rb +30 -2
- data/lib/active_fedora/associations/builder/collection_association.rb +36 -4
- data/lib/active_fedora/associations/builder/contains.rb +10 -5
- data/lib/active_fedora/associations/builder/directly_contains.rb +6 -8
- data/lib/active_fedora/associations/builder/directly_contains_one.rb +27 -20
- data/lib/active_fedora/associations/builder/has_and_belongs_to_many.rb +7 -3
- data/lib/active_fedora/associations/builder/has_many.rb +8 -45
- data/lib/active_fedora/associations/builder/indirectly_contains.rb +6 -8
- data/lib/active_fedora/associations/builder/property.rb +6 -12
- data/lib/active_fedora/associations/builder/singular_association.rb +3 -5
- data/lib/active_fedora/associations/builder/singular_property.rb +5 -4
- data/lib/active_fedora/associations/collection_association.rb +22 -26
- data/lib/active_fedora/associations/collection_proxy.rb +1 -1
- data/lib/active_fedora/associations/contained_finder.rb +1 -2
- data/lib/active_fedora/associations/directly_contains_one_association.rb +2 -3
- data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +1 -1
- data/lib/active_fedora/associations/has_many_association.rb +24 -5
- data/lib/active_fedora/associations/rdf.rb +1 -20
- data/lib/active_fedora/associations.rb +1 -1
- data/lib/active_fedora/attached_files.rb +2 -2
- data/lib/active_fedora/attribute_assignment.rb +55 -0
- data/lib/active_fedora/attribute_methods/read.rb +29 -44
- data/lib/active_fedora/attribute_methods/write.rb +16 -19
- data/lib/active_fedora/attribute_methods.rb +149 -29
- data/lib/active_fedora/attributes.rb +6 -18
- data/lib/active_fedora/autosave_association.rb +8 -12
- data/lib/active_fedora/base.rb +2 -2
- data/lib/active_fedora/caching_connection.rb +1 -1
- data/lib/active_fedora/callbacks.rb +9 -9
- data/lib/active_fedora/common.rb +67 -0
- data/lib/active_fedora/core.rb +11 -23
- data/lib/active_fedora/default_model_mapper.rb +24 -0
- data/lib/active_fedora/errors.rb +42 -0
- data/lib/active_fedora/fedora.rb +1 -1
- data/lib/active_fedora/file/attributes.rb +9 -10
- data/lib/active_fedora/file.rb +19 -56
- data/lib/active_fedora/file_persistence.rb +27 -0
- data/lib/active_fedora/indexing.rb +15 -9
- data/lib/active_fedora/indexing_service.rb +4 -4
- data/lib/active_fedora/inheritance.rb +34 -0
- data/lib/active_fedora/ldp_resource.rb +1 -0
- data/lib/active_fedora/model.rb +18 -16
- data/lib/active_fedora/model_classifier.rb +77 -0
- data/lib/active_fedora/nested_attributes.rb +145 -18
- data/lib/active_fedora/persistence.rb +23 -5
- data/lib/active_fedora/predicates.rb +3 -0
- data/lib/active_fedora/qualified_dublin_core_datastream.rb +1 -1
- data/lib/active_fedora/query_result_builder.rb +12 -28
- data/lib/active_fedora/querying.rb +1 -1
- data/lib/active_fedora/rdf/datastream_indexing.rb +1 -1
- data/lib/active_fedora/reflection.rb +212 -80
- data/lib/active_fedora/relation/calculations.rb +1 -5
- data/lib/active_fedora/relation/finder_methods.rb +39 -26
- data/lib/active_fedora/relation.rb +17 -0
- data/lib/active_fedora/scoping/default.rb +117 -0
- data/lib/active_fedora/scoping/named.rb +152 -4
- data/lib/active_fedora/scoping.rb +85 -2
- data/lib/active_fedora/simple_datastream.rb +1 -1
- data/lib/active_fedora/solr_hit.rb +71 -0
- data/lib/active_fedora/solr_instance_loader.rb +12 -36
- data/lib/active_fedora/solr_query_builder.rb +20 -25
- data/lib/active_fedora/solr_service.rb +24 -13
- data/lib/active_fedora/type/boolean.rb +23 -0
- data/lib/active_fedora/type/value.rb +118 -0
- data/lib/active_fedora/type.rb +8 -0
- data/lib/active_fedora/validations.rb +14 -5
- data/lib/active_fedora/version.rb +1 -1
- data/lib/active_fedora/versionable.rb +8 -7
- data/lib/active_fedora/with_metadata/metadata_node.rb +2 -1
- data/lib/active_fedora.rb +35 -15
- data/lib/generators/active_fedora/config/fedora/fedora_generator.rb +4 -0
- data/lib/generators/active_fedora/config/fedora/templates/.fcrepo_wrapper +3 -0
- data/lib/generators/active_fedora/config/solr/solr_generator.rb +4 -0
- data/lib/generators/active_fedora/config/solr/templates/.solr_wrapper +5 -0
- data/lib/generators/active_fedora/config/solr/templates/solr/config/solrconfig.xml +15 -0
- data/solr/config/solrconfig.xml +15 -0
- data/spec/config_helper.rb +0 -5
- data/spec/integration/associations_spec.rb +5 -5
- data/spec/integration/attached_files_spec.rb +4 -4
- data/spec/integration/base_spec.rb +4 -4
- data/spec/integration/bug_spec.rb +0 -1
- data/spec/integration/collection_association_spec.rb +34 -3
- data/spec/integration/file_spec.rb +2 -2
- data/spec/integration/full_featured_model_spec.rb +4 -4
- data/spec/integration/has_and_belongs_to_many_associations_spec.rb +1 -1
- data/spec/integration/has_many_associations_spec.rb +30 -1
- data/spec/integration/indirect_container_spec.rb +1 -1
- data/spec/integration/nested_attribute_spec.rb +6 -0
- data/spec/integration/ntriples_datastream_spec.rb +4 -4
- data/spec/integration/om_datastream_spec.rb +7 -7
- data/spec/integration/persistence_spec.rb +1 -1
- data/spec/integration/relation_delegation_spec.rb +1 -1
- data/spec/integration/scoped_query_spec.rb +13 -13
- data/spec/integration/solr_hit_spec.rb +52 -0
- data/spec/samples/hydra-mods_article_datastream.rb +2 -2
- data/spec/spec_helper.rb +5 -9
- data/spec/unit/active_fedora_spec.rb +0 -26
- data/spec/unit/attributes_spec.rb +13 -7
- data/spec/unit/base_spec.rb +20 -0
- data/spec/unit/builder/has_and_belongs_to_many_spec.rb +2 -3
- data/spec/unit/callback_spec.rb +3 -8
- data/spec/unit/collection_proxy_spec.rb +1 -1
- data/spec/unit/default_model_mapper_spec.rb +39 -0
- data/spec/unit/file_spec.rb +21 -2
- data/spec/unit/finder_methods_spec.rb +30 -6
- data/spec/unit/has_and_belongs_to_many_association_spec.rb +4 -4
- data/spec/unit/has_many_association_spec.rb +25 -3
- data/spec/unit/indexing_spec.rb +17 -3
- data/spec/unit/model_classifier_spec.rb +49 -0
- data/spec/unit/model_spec.rb +0 -9
- data/spec/unit/ntriples_datastream_spec.rb +16 -16
- data/spec/unit/om_datastream_spec.rb +7 -7
- data/spec/unit/qualified_dublin_core_datastream_spec.rb +1 -1
- data/spec/unit/query_result_builder_spec.rb +4 -10
- data/spec/unit/query_spec.rb +28 -28
- data/spec/unit/rdf/indexing_service_spec.rb +16 -16
- data/spec/unit/reflection_spec.rb +2 -2
- data/spec/unit/scoping_spec.rb +67 -0
- data/spec/unit/simple_datastream_spec.rb +2 -2
- data/spec/unit/solr_config_options_spec.rb +29 -32
- data/spec/unit/solr_hit_spec.rb +58 -0
- data/spec/unit/solr_query_builder_spec.rb +9 -1
- data/spec/unit/solr_service_spec.rb +19 -3
- data/spec/unit/validations_spec.rb +1 -1
- metadata +82 -20
- data/spec/support/freeze_mocks.rb +0 -12
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe ActiveFedora::Scoping::Default do
|
|
4
|
+
describe "when default_scope is overridden" do
|
|
5
|
+
before do
|
|
6
|
+
class Book < ActiveFedora::Base
|
|
7
|
+
property :published, predicate: ::RDF::Vocab::EBUCore.pubStatus do |index|
|
|
8
|
+
index.as :symbol
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.default_scope
|
|
12
|
+
where published_ssim: 'true'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
Book.destroy_all
|
|
17
|
+
Book.create!(published: [true])
|
|
18
|
+
Book.create!(published: [true])
|
|
19
|
+
Book.create!(published: [false])
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
after do
|
|
23
|
+
Object.send(:remove_const, :Book)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "returns only the scoped records" do
|
|
27
|
+
expect(Book.all.size).to eq 2
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "returns all the records" do
|
|
31
|
+
Book.unscoped do
|
|
32
|
+
expect(Book.all.size).to eq 3
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe "when default_scope is called" do
|
|
38
|
+
before do
|
|
39
|
+
class Book < ActiveFedora::Base
|
|
40
|
+
property :published, predicate: ::RDF::Vocab::EBUCore.pubStatus do |index|
|
|
41
|
+
index.as :symbol
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
default_scope -> { where published_ssim: 'true' }
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
Book.destroy_all
|
|
48
|
+
Book.create!(published: [true])
|
|
49
|
+
Book.create!(published: [true])
|
|
50
|
+
Book.create!(published: [false])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
after do
|
|
54
|
+
Object.send(:remove_const, :Book)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "returns only the scoped records" do
|
|
58
|
+
expect(Book.all.size).to eq 2
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it "returns all the records" do
|
|
62
|
+
Book.unscoped do
|
|
63
|
+
expect(Book.all.size).to eq 3
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -54,8 +54,8 @@ describe ActiveFedora::SimpleDatastream do
|
|
|
54
54
|
describe "#to_solr" do
|
|
55
55
|
it "has title" do
|
|
56
56
|
solr = @test_ds.to_solr
|
|
57
|
-
expect(solr[ActiveFedora
|
|
58
|
-
expect(solr[ActiveFedora
|
|
57
|
+
expect(solr[ActiveFedora.index_field_mapper.solr_name('publisher', type: :string)]).to eq "publisher1"
|
|
58
|
+
expect(solr[ActiveFedora.index_field_mapper.solr_name('creation_date', type: :date)]).to eq "2012-01-15"
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
@@ -12,52 +12,49 @@ describe ActiveFedora do
|
|
|
12
12
|
@test_object = ActiveFedora::Base.new
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
describe "
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
after(:all) do
|
|
20
|
-
SOLR_DOCUMENT_ID = "id".freeze
|
|
15
|
+
describe ".id_field" do
|
|
16
|
+
let(:field) { "MY_SAMPLE_ID".freeze }
|
|
17
|
+
before do
|
|
18
|
+
allow(described_class).to receive(:id_field).and_return(field)
|
|
21
19
|
end
|
|
20
|
+
|
|
22
21
|
it "is used by ActiveFedora::Base.to_solr" do
|
|
23
22
|
allow(@test_object).to receive(:id).and_return('changeme:123')
|
|
24
|
-
|
|
25
|
-
expect(@test_object.to_solr[SOLR_DOCUMENT_ID.to_sym]).to eq 'changeme:123'
|
|
23
|
+
expect(@test_object.to_solr[field.to_sym]).to eq 'changeme:123'
|
|
26
24
|
expect(@test_object.to_solr[:id]).to be_nil
|
|
27
25
|
end
|
|
28
26
|
|
|
29
|
-
it "is used by ActiveFedora::Base#
|
|
27
|
+
it "is used by ActiveFedora::Base#search_with_conditions" do
|
|
30
28
|
mock_response = double("SolrResponse")
|
|
31
29
|
expect(ActiveFedora::SolrService).to receive(:query)
|
|
32
|
-
.with("_query_:\"{!
|
|
33
|
-
"_query_:\"{!
|
|
34
|
-
sort: ["#{
|
|
30
|
+
.with("_query_:\"{!field f=has_model_ssim}SolrSpecModel::Basic\" AND " \
|
|
31
|
+
"_query_:\"{!field f=#{field}}changeme:30\"",
|
|
32
|
+
sort: ["#{described_class.index_field_mapper.solr_name('system_create', :stored_sortable, type: :date)} asc"])
|
|
35
33
|
.and_return(mock_response)
|
|
36
34
|
|
|
37
|
-
expect(SolrSpecModel::Basic.
|
|
35
|
+
expect(SolrSpecModel::Basic.search_with_conditions(id: "changeme:30")).to equal(mock_response)
|
|
38
36
|
end
|
|
39
37
|
end
|
|
40
38
|
|
|
41
|
-
describe "
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
ENABLE_SOLR_UPDATES = true
|
|
47
|
-
end
|
|
39
|
+
describe ".enable_solr_updates?" do
|
|
40
|
+
context 'with .enable_solr_updates? disabled' do
|
|
41
|
+
before do
|
|
42
|
+
allow(described_class).to receive(:enable_solr_updates?).and_return(false)
|
|
43
|
+
end
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
it "prevents Base.save from calling update_index if false" do
|
|
46
|
+
dirty_ds = ActiveFedora::SimpleDatastream.new
|
|
47
|
+
@test_object.attached_files['ds1'] = dirty_ds
|
|
48
|
+
allow(@test_object).to receive(:datastreams).and_return(ds1: dirty_ds)
|
|
49
|
+
expect(@test_object).to receive(:update_index).never
|
|
50
|
+
expect(@test_object).to receive(:refresh)
|
|
51
|
+
@test_object.save
|
|
52
|
+
end
|
|
53
|
+
it "prevents Base.delete from deleting the corresponding Solr document if false" do
|
|
54
|
+
expect(ActiveFedora::SolrService.instance.conn).to receive(:delete).with(@test_object.id).never
|
|
55
|
+
expect(@test_object).to receive(:delete)
|
|
56
|
+
@test_object.delete
|
|
57
|
+
end
|
|
61
58
|
end
|
|
62
59
|
end
|
|
63
60
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe ActiveFedora::SolrHit do
|
|
4
|
+
before(:all) do
|
|
5
|
+
class AudioRecord < ActiveFedora::Base
|
|
6
|
+
attr_accessor :id
|
|
7
|
+
def self.connection_for_id(_id)
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
subject { described_class.new "id" => "my:_ID1_", ActiveFedora.index_field_mapper.solr_name("has_model", :symbol) => ["AudioRecord"] }
|
|
13
|
+
|
|
14
|
+
describe "#reify" do
|
|
15
|
+
it "uses .find to instantiate objects" do
|
|
16
|
+
expect(AudioRecord).to receive(:find).with("my:_ID1_", cast: true)
|
|
17
|
+
subject.reify
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
describe "#id" do
|
|
22
|
+
it "extracts the id from the solr hit" do
|
|
23
|
+
expect(subject.id).to eq "my:_ID1_"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe "#rdf_uri" do
|
|
28
|
+
it "provides an RDF URI for the solr hit" do
|
|
29
|
+
expect(subject.rdf_uri).to eq ::RDF::URI.new(ActiveFedora::Base.id_to_uri("my:_ID1_"))
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe "#model" do
|
|
34
|
+
it "selects the appropriate model for the solr result" do
|
|
35
|
+
expect(subject.model).to eq AudioRecord
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe "#models" do
|
|
40
|
+
it "provides all the relevant models for the solr result" do
|
|
41
|
+
expect(subject.models).to match_array [AudioRecord]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe "#model?" do
|
|
46
|
+
it 'is true if the object has the given model' do
|
|
47
|
+
expect(subject.model?(AudioRecord)).to eq true
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'is true if the object has an ancestor of the given model' do
|
|
51
|
+
expect(subject.model?(ActiveFedora::Base)).to eq true
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
it 'is false if the given model is not in the ancestor tree for the models' do
|
|
55
|
+
expect(subject.model?(String)).to eq false
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -3,7 +3,15 @@ require 'spec_helper'
|
|
|
3
3
|
describe ActiveFedora::SolrQueryBuilder do
|
|
4
4
|
describe "raw_query" do
|
|
5
5
|
it "generates a raw query clause" do
|
|
6
|
-
|
|
6
|
+
Deprecation.silence(described_class) do
|
|
7
|
+
expect(described_class.raw_query('id', "my:_ID1_")).to eq '_query_:"{!raw f=id}my:_ID1_"'
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
describe "construct_query" do
|
|
13
|
+
it "generates a query clause" do
|
|
14
|
+
expect(described_class.construct_query('id' => "my:_ID1_")).to eq '_query_:"{!field f=id}my:_ID1_"'
|
|
7
15
|
end
|
|
8
16
|
end
|
|
9
17
|
|
|
@@ -48,13 +48,13 @@ describe ActiveFedora::SolrService do
|
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
describe "
|
|
51
|
+
describe "#get" do
|
|
52
52
|
it "calls solr" do
|
|
53
53
|
mock_conn = double("Connection")
|
|
54
54
|
stub_result = double("Result")
|
|
55
55
|
expect(mock_conn).to receive(:get).with('select', params: { q: 'querytext', qt: 'standard' }).and_return(stub_result)
|
|
56
56
|
allow(described_class).to receive(:instance).and_return(double("instance", conn: mock_conn))
|
|
57
|
-
expect(described_class.
|
|
57
|
+
expect(described_class.get('querytext')).to eq stub_result
|
|
58
58
|
end
|
|
59
59
|
it "uses select_path" do
|
|
60
60
|
mock_conn = double("Connection")
|
|
@@ -62,9 +62,25 @@ describe ActiveFedora::SolrService do
|
|
|
62
62
|
expect(mock_conn).to receive(:get).with('select_test', params: { q: 'querytext', qt: 'standard' }).and_return(stub_result)
|
|
63
63
|
expect(described_class).to receive(:select_path).and_return('select_test')
|
|
64
64
|
allow(described_class).to receive(:instance).and_return(double("instance", conn: mock_conn))
|
|
65
|
-
expect(described_class.
|
|
65
|
+
expect(described_class.get('querytext')).to eq stub_result
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
|
+
|
|
69
|
+
describe "#query" do
|
|
70
|
+
let(:doc) { { 'id' => 'x' } }
|
|
71
|
+
let(:docs) { [doc] }
|
|
72
|
+
|
|
73
|
+
it "wraps the solr response documents in Solr hits" do
|
|
74
|
+
mock_conn = double("Connection")
|
|
75
|
+
stub_result = { 'response' => { 'docs' => docs } }
|
|
76
|
+
expect(mock_conn).to receive(:get).with('select', params: { q: 'querytext', qt: 'standard' }).and_return(stub_result)
|
|
77
|
+
allow(described_class).to receive(:instance).and_return(double("instance", conn: mock_conn))
|
|
78
|
+
result = described_class.query('querytext')
|
|
79
|
+
expect(result.size).to eq 1
|
|
80
|
+
expect(result.first.id).to eq 'x'
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
68
84
|
describe ".count" do
|
|
69
85
|
it "returns a count of matching records" do
|
|
70
86
|
mock_conn = double("Connection")
|
|
@@ -47,7 +47,7 @@ describe ActiveFedora::Base do
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
describe "#save!" do
|
|
50
|
-
before { allow(subject).to receive(:
|
|
50
|
+
before { allow(subject).to receive(:_create_record) } # prevent saving to Fedora/Solr
|
|
51
51
|
|
|
52
52
|
it "validates only once" do
|
|
53
53
|
expect(subject).to receive(:perform_validations).once.and_return(true)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active-fedora
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.
|
|
4
|
+
version: 9.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Zumwalt
|
|
@@ -10,13 +10,16 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-
|
|
13
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rsolr
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
requirements:
|
|
19
19
|
- - "~>"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '1.0'
|
|
22
|
+
- - ">="
|
|
20
23
|
- !ruby/object:Gem::Version
|
|
21
24
|
version: 1.0.10
|
|
22
25
|
type: :runtime
|
|
@@ -24,8 +27,25 @@ dependencies:
|
|
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
28
|
requirements:
|
|
26
29
|
- - "~>"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '1.0'
|
|
32
|
+
- - ">="
|
|
27
33
|
- !ruby/object:Gem::Version
|
|
28
34
|
version: 1.0.10
|
|
35
|
+
- !ruby/object:Gem::Dependency
|
|
36
|
+
name: solrizer
|
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - "~>"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '3.4'
|
|
42
|
+
type: :runtime
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - "~>"
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '3.4'
|
|
29
49
|
- !ruby/object:Gem::Dependency
|
|
30
50
|
name: om
|
|
31
51
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -60,14 +80,40 @@ dependencies:
|
|
|
60
80
|
requirements:
|
|
61
81
|
- - ">="
|
|
62
82
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: 4.
|
|
83
|
+
version: '4.2'
|
|
84
|
+
- - "<"
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: '6'
|
|
64
87
|
type: :runtime
|
|
65
88
|
prerelease: false
|
|
66
89
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
90
|
requirements:
|
|
68
91
|
- - ">="
|
|
69
92
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: 4.
|
|
93
|
+
version: '4.2'
|
|
94
|
+
- - "<"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '6'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: activemodel
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '4.2'
|
|
104
|
+
- - "<"
|
|
105
|
+
- !ruby/object:Gem::Version
|
|
106
|
+
version: '6'
|
|
107
|
+
type: :runtime
|
|
108
|
+
prerelease: false
|
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
110
|
+
requirements:
|
|
111
|
+
- - ">="
|
|
112
|
+
- !ruby/object:Gem::Version
|
|
113
|
+
version: '4.2'
|
|
114
|
+
- - "<"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '6'
|
|
71
117
|
- !ruby/object:Gem::Dependency
|
|
72
118
|
name: active-triples
|
|
73
119
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -130,14 +176,14 @@ dependencies:
|
|
|
130
176
|
requirements:
|
|
131
177
|
- - "~>"
|
|
132
178
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 0.
|
|
179
|
+
version: 0.5.0
|
|
134
180
|
type: :runtime
|
|
135
181
|
prerelease: false
|
|
136
182
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
183
|
requirements:
|
|
138
184
|
- - "~>"
|
|
139
185
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: 0.
|
|
186
|
+
version: 0.5.0
|
|
141
187
|
- !ruby/object:Gem::Dependency
|
|
142
188
|
name: rdoc
|
|
143
189
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,16 +216,16 @@ dependencies:
|
|
|
170
216
|
name: rake
|
|
171
217
|
requirement: !ruby/object:Gem::Requirement
|
|
172
218
|
requirements:
|
|
173
|
-
- - "
|
|
219
|
+
- - "~>"
|
|
174
220
|
- !ruby/object:Gem::Version
|
|
175
|
-
version: '0'
|
|
221
|
+
version: '10.0'
|
|
176
222
|
type: :development
|
|
177
223
|
prerelease: false
|
|
178
224
|
version_requirements: !ruby/object:Gem::Requirement
|
|
179
225
|
requirements:
|
|
180
|
-
- - "
|
|
226
|
+
- - "~>"
|
|
181
227
|
- !ruby/object:Gem::Version
|
|
182
|
-
version: '0'
|
|
228
|
+
version: '10.0'
|
|
183
229
|
- !ruby/object:Gem::Dependency
|
|
184
230
|
name: solr_wrapper
|
|
185
231
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -256,42 +302,42 @@ dependencies:
|
|
|
256
302
|
requirements:
|
|
257
303
|
- - "~>"
|
|
258
304
|
- !ruby/object:Gem::Version
|
|
259
|
-
version: 0.
|
|
305
|
+
version: '0.8'
|
|
260
306
|
type: :development
|
|
261
307
|
prerelease: false
|
|
262
308
|
version_requirements: !ruby/object:Gem::Requirement
|
|
263
309
|
requirements:
|
|
264
310
|
- - "~>"
|
|
265
311
|
- !ruby/object:Gem::Version
|
|
266
|
-
version: 0.
|
|
312
|
+
version: '0.8'
|
|
267
313
|
- !ruby/object:Gem::Dependency
|
|
268
314
|
name: rubocop
|
|
269
315
|
requirement: !ruby/object:Gem::Requirement
|
|
270
316
|
requirements:
|
|
271
317
|
- - "~>"
|
|
272
318
|
- !ruby/object:Gem::Version
|
|
273
|
-
version: '0.
|
|
319
|
+
version: '0.37'
|
|
274
320
|
type: :development
|
|
275
321
|
prerelease: false
|
|
276
322
|
version_requirements: !ruby/object:Gem::Requirement
|
|
277
323
|
requirements:
|
|
278
324
|
- - "~>"
|
|
279
325
|
- !ruby/object:Gem::Version
|
|
280
|
-
version: '0.
|
|
326
|
+
version: '0.37'
|
|
281
327
|
- !ruby/object:Gem::Dependency
|
|
282
328
|
name: rubocop-rspec
|
|
283
329
|
requirement: !ruby/object:Gem::Requirement
|
|
284
330
|
requirements:
|
|
285
331
|
- - "~>"
|
|
286
332
|
- !ruby/object:Gem::Version
|
|
287
|
-
version: 1.
|
|
333
|
+
version: '1.4'
|
|
288
334
|
type: :development
|
|
289
335
|
prerelease: false
|
|
290
336
|
version_requirements: !ruby/object:Gem::Requirement
|
|
291
337
|
requirements:
|
|
292
338
|
- - "~>"
|
|
293
339
|
- !ruby/object:Gem::Version
|
|
294
|
-
version: 1.
|
|
340
|
+
version: '1.4'
|
|
295
341
|
description: ActiveFedora provides for creating and managing objects in the Fedora
|
|
296
342
|
Repository Architecture.
|
|
297
343
|
email:
|
|
@@ -359,6 +405,7 @@ files:
|
|
|
359
405
|
- lib/active_fedora/associations/singular_association.rb
|
|
360
406
|
- lib/active_fedora/associations/singular_rdf.rb
|
|
361
407
|
- lib/active_fedora/attached_files.rb
|
|
408
|
+
- lib/active_fedora/attribute_assignment.rb
|
|
362
409
|
- lib/active_fedora/attribute_methods.rb
|
|
363
410
|
- lib/active_fedora/attribute_methods/dirty.rb
|
|
364
411
|
- lib/active_fedora/attribute_methods/read.rb
|
|
@@ -380,6 +427,7 @@ files:
|
|
|
380
427
|
- lib/active_fedora/checksum.rb
|
|
381
428
|
- lib/active_fedora/clean_connection.rb
|
|
382
429
|
- lib/active_fedora/cleaner.rb
|
|
430
|
+
- lib/active_fedora/common.rb
|
|
383
431
|
- lib/active_fedora/config.rb
|
|
384
432
|
- lib/active_fedora/containers/container.rb
|
|
385
433
|
- lib/active_fedora/containers/direct_container.rb
|
|
@@ -390,6 +438,7 @@ files:
|
|
|
390
438
|
- lib/active_fedora/datastream.rb
|
|
391
439
|
- lib/active_fedora/datastreams.rb
|
|
392
440
|
- lib/active_fedora/datastreams/nokogiri_datastreams.rb
|
|
441
|
+
- lib/active_fedora/default_model_mapper.rb
|
|
393
442
|
- lib/active_fedora/delegated_attribute.rb
|
|
394
443
|
- lib/active_fedora/errors.rb
|
|
395
444
|
- lib/active_fedora/fedora.rb
|
|
@@ -399,6 +448,7 @@ files:
|
|
|
399
448
|
- lib/active_fedora/file/streaming.rb
|
|
400
449
|
- lib/active_fedora/file_configurator.rb
|
|
401
450
|
- lib/active_fedora/file_path_builder.rb
|
|
451
|
+
- lib/active_fedora/file_persistence.rb
|
|
402
452
|
- lib/active_fedora/file_relation.rb
|
|
403
453
|
- lib/active_fedora/files_hash.rb
|
|
404
454
|
- lib/active_fedora/fixity_service.rb
|
|
@@ -411,6 +461,7 @@ files:
|
|
|
411
461
|
- lib/active_fedora/indexing/map.rb
|
|
412
462
|
- lib/active_fedora/indexing_service.rb
|
|
413
463
|
- lib/active_fedora/inheritable_accessors.rb
|
|
464
|
+
- lib/active_fedora/inheritance.rb
|
|
414
465
|
- lib/active_fedora/ldp_cache.rb
|
|
415
466
|
- lib/active_fedora/ldp_resource.rb
|
|
416
467
|
- lib/active_fedora/ldp_resource_service.rb
|
|
@@ -418,6 +469,7 @@ files:
|
|
|
418
469
|
- lib/active_fedora/locale/en.yml
|
|
419
470
|
- lib/active_fedora/log_subscriber.rb
|
|
420
471
|
- lib/active_fedora/model.rb
|
|
472
|
+
- lib/active_fedora/model_classifier.rb
|
|
421
473
|
- lib/active_fedora/nested_attributes.rb
|
|
422
474
|
- lib/active_fedora/nom_datastream.rb
|
|
423
475
|
- lib/active_fedora/null_relation.rb
|
|
@@ -462,11 +514,15 @@ files:
|
|
|
462
514
|
- lib/active_fedora/scoping/named.rb
|
|
463
515
|
- lib/active_fedora/serialization.rb
|
|
464
516
|
- lib/active_fedora/simple_datastream.rb
|
|
517
|
+
- lib/active_fedora/solr_hit.rb
|
|
465
518
|
- lib/active_fedora/solr_instance_loader.rb
|
|
466
519
|
- lib/active_fedora/solr_query_builder.rb
|
|
467
520
|
- lib/active_fedora/solr_service.rb
|
|
468
521
|
- lib/active_fedora/sparql_insert.rb
|
|
469
522
|
- lib/active_fedora/test_support.rb
|
|
523
|
+
- lib/active_fedora/type.rb
|
|
524
|
+
- lib/active_fedora/type/boolean.rb
|
|
525
|
+
- lib/active_fedora/type/value.rb
|
|
470
526
|
- lib/active_fedora/validations.rb
|
|
471
527
|
- lib/active_fedora/version.rb
|
|
472
528
|
- lib/active_fedora/versionable.rb
|
|
@@ -476,8 +532,10 @@ files:
|
|
|
476
532
|
- lib/generators/active_fedora/config/USAGE
|
|
477
533
|
- lib/generators/active_fedora/config/config_generator.rb
|
|
478
534
|
- lib/generators/active_fedora/config/fedora/fedora_generator.rb
|
|
535
|
+
- lib/generators/active_fedora/config/fedora/templates/.fcrepo_wrapper
|
|
479
536
|
- lib/generators/active_fedora/config/fedora/templates/fedora.yml
|
|
480
537
|
- lib/generators/active_fedora/config/solr/solr_generator.rb
|
|
538
|
+
- lib/generators/active_fedora/config/solr/templates/.solr_wrapper
|
|
481
539
|
- lib/generators/active_fedora/config/solr/templates/solr.yml
|
|
482
540
|
- lib/generators/active_fedora/config/solr/templates/solr/config/_rest_managed.json
|
|
483
541
|
- lib/generators/active_fedora/config/solr/templates/solr/config/admin-extra.html
|
|
@@ -579,6 +637,7 @@ files:
|
|
|
579
637
|
- spec/integration/relation_delegation_spec.rb
|
|
580
638
|
- spec/integration/relation_spec.rb
|
|
581
639
|
- spec/integration/scoped_query_spec.rb
|
|
640
|
+
- spec/integration/solr_hit_spec.rb
|
|
582
641
|
- spec/integration/solr_instance_loader_spec.rb
|
|
583
642
|
- spec/integration/versionable_spec.rb
|
|
584
643
|
- spec/integration/with_metadata_spec.rb
|
|
@@ -591,7 +650,6 @@ files:
|
|
|
591
650
|
- spec/spec.opts
|
|
592
651
|
- spec/spec_helper.rb
|
|
593
652
|
- spec/support/an_active_model.rb
|
|
594
|
-
- spec/support/freeze_mocks.rb
|
|
595
653
|
- spec/unit/active_fedora_spec.rb
|
|
596
654
|
- spec/unit/association_hash_spec.rb
|
|
597
655
|
- spec/unit/attached_files_spec.rb
|
|
@@ -611,6 +669,7 @@ files:
|
|
|
611
669
|
- spec/unit/core/fedora_id_translator_spec.rb
|
|
612
670
|
- spec/unit/core/fedora_uri_translator_spec.rb
|
|
613
671
|
- spec/unit/core_spec.rb
|
|
672
|
+
- spec/unit/default_model_mapper_spec.rb
|
|
614
673
|
- spec/unit/fedora_spec.rb
|
|
615
674
|
- spec/unit/file_configurator_spec.rb
|
|
616
675
|
- spec/unit/file_path_builder_spec.rb
|
|
@@ -628,6 +687,7 @@ files:
|
|
|
628
687
|
- spec/unit/ldp_resource_spec.rb
|
|
629
688
|
- spec/unit/loadable_from_json_spec.rb
|
|
630
689
|
- spec/unit/logger_spec.rb
|
|
690
|
+
- spec/unit/model_classifier_spec.rb
|
|
631
691
|
- spec/unit/model_spec.rb
|
|
632
692
|
- spec/unit/nom_datastream_spec.rb
|
|
633
693
|
- spec/unit/ntriples_datastream_spec.rb
|
|
@@ -651,9 +711,11 @@ files:
|
|
|
651
711
|
- spec/unit/rspec_matchers/have_many_associated_active_fedora_objects_matcher_spec.rb
|
|
652
712
|
- spec/unit/rspec_matchers/have_predicate_matcher_spec.rb
|
|
653
713
|
- spec/unit/schema_indexing_strategy_spec.rb
|
|
714
|
+
- spec/unit/scoping_spec.rb
|
|
654
715
|
- spec/unit/serializers_spec.rb
|
|
655
716
|
- spec/unit/simple_datastream_spec.rb
|
|
656
717
|
- spec/unit/solr_config_options_spec.rb
|
|
718
|
+
- spec/unit/solr_hit_spec.rb
|
|
657
719
|
- spec/unit/solr_query_builder_spec.rb
|
|
658
720
|
- spec/unit/solr_service_spec.rb
|
|
659
721
|
- spec/unit/sparql_insert_spec.rb
|
|
@@ -669,9 +731,9 @@ require_paths:
|
|
|
669
731
|
- lib
|
|
670
732
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
671
733
|
requirements:
|
|
672
|
-
- - "
|
|
734
|
+
- - "~>"
|
|
673
735
|
- !ruby/object:Gem::Version
|
|
674
|
-
version:
|
|
736
|
+
version: '2.0'
|
|
675
737
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
676
738
|
requirements:
|
|
677
739
|
- - ">="
|
|
@@ -679,7 +741,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
679
741
|
version: '0'
|
|
680
742
|
requirements: []
|
|
681
743
|
rubyforge_project:
|
|
682
|
-
rubygems_version: 2.
|
|
744
|
+
rubygems_version: 2.5.1
|
|
683
745
|
signing_key:
|
|
684
746
|
specification_version: 4
|
|
685
747
|
summary: A convenience libary for manipulating documents in the Fedora Repository.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Don't raise errors if the object is frozen.
|
|
2
|
-
# Work around a bug in rspec-mocks 2.14.4
|
|
3
|
-
# https://github.com/rspec/rspec-mocks/issues/494
|
|
4
|
-
RSpec::Mocks::MethodDouble.class_eval do
|
|
5
|
-
alias_method :original_restore_original_method, :restore_original_method
|
|
6
|
-
def restore_original_method
|
|
7
|
-
original_restore_original_method
|
|
8
|
-
rescue => e
|
|
9
|
-
raise e unless object_singleton_class.frozen?
|
|
10
|
-
Kernel.warn "Unable to remove stub method #{@method_name} because the object was frozen"
|
|
11
|
-
end
|
|
12
|
-
end
|