active-fedora 7.0.0.rc2 → 7.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +13 -3
- data/CONTRIBUTORS.md +1 -0
- data/Gemfile +2 -3
- data/active-fedora.gemspec +4 -3
- data/gemfiles/rails3.gemfile +1 -7
- data/gemfiles/rails4.1.gemfile +5 -0
- data/gemfiles/rails4.gemfile +1 -6
- data/lib/active_fedora.rb +6 -6
- data/lib/active_fedora/associations/association_scope.rb +1 -1
- data/lib/active_fedora/base.rb +2 -0
- data/lib/active_fedora/datastream.rb +29 -2
- data/lib/active_fedora/datastream_collections.rb +2 -2
- data/lib/active_fedora/datastream_hash.rb +1 -1
- data/lib/active_fedora/datastreams.rb +4 -23
- data/lib/active_fedora/file_configurator.rb +8 -7
- data/lib/active_fedora/om_datastream.rb +1 -1
- data/lib/active_fedora/rdf.rb +9 -0
- data/lib/active_fedora/rdf/configurable.rb +59 -0
- data/lib/active_fedora/rdf/identifiable.rb +59 -0
- data/lib/active_fedora/rdf/indexing.rb +24 -23
- data/lib/active_fedora/rdf/list.rb +154 -0
- data/lib/active_fedora/{ntriples_rdf_datastream.rb → rdf/ntriples_rdf_datastream.rb} +0 -0
- data/lib/active_fedora/rdf/object_resource.rb +20 -0
- data/lib/active_fedora/rdf/properties.rb +108 -0
- data/lib/active_fedora/rdf/rdf_datastream.rb +113 -0
- data/lib/active_fedora/{rdfxml_rdf_datastream.rb → rdf/rdfxml_rdf_datastream.rb} +0 -0
- data/lib/active_fedora/rdf/repositories.rb +36 -0
- data/lib/active_fedora/rdf/resource.rb +324 -0
- data/lib/active_fedora/rdf/term.rb +188 -0
- data/lib/active_fedora/relation.rb +1 -0
- data/lib/active_fedora/relation/finder_methods.rb +16 -17
- data/lib/active_fedora/relation/merger.rb +1 -1
- data/lib/active_fedora/relation/query_methods.rb +13 -5
- data/lib/active_fedora/reload_on_save.rb +16 -0
- data/lib/active_fedora/rubydora_connection.rb +0 -1
- data/lib/active_fedora/sharding.rb +1 -1
- data/lib/active_fedora/version.rb +1 -1
- data/script/console +10 -11
- data/spec/config_helper.rb +1 -1
- data/spec/fixtures/solr_rdf_descMetadata.nt +1 -1
- data/spec/integration/auditable_spec.rb +1 -1
- data/spec/integration/base_spec.rb +21 -3
- data/spec/integration/complex_rdf_datastream_spec.rb +32 -55
- data/spec/integration/field_to_solr_name_spec.rb +6 -8
- data/spec/integration/has_many_associations_spec.rb +10 -3
- data/spec/integration/load_from_solr_spec.rb +15 -17
- data/spec/integration/ntriples_datastream_spec.rb +19 -23
- data/spec/integration/om_datastream_spec.rb +1 -1
- data/spec/integration/rdf_nested_attributes_spec.rb +51 -70
- data/spec/integration/relation_spec.rb +24 -11
- data/spec/integration/scoped_query_spec.rb +5 -1
- data/spec/samples/hydra-mods_article_datastream.rb +4 -0
- data/spec/samples/hydra-rights_metadata_datastream.rb +5 -0
- data/spec/samples/marpa-dc_datastream.rb +6 -1
- data/spec/samples/special_thing.rb +5 -5
- data/spec/spec_helper.rb +0 -3
- data/spec/support/an_active_model.rb +5 -12
- data/spec/unit/active_fedora_spec.rb +2 -2
- data/spec/unit/attributes_spec.rb +4 -8
- data/spec/unit/base_datastream_management_spec.rb +5 -29
- data/spec/unit/base_spec.rb +4 -0
- data/spec/unit/code_configurator_spec.rb +2 -2
- data/spec/unit/config_spec.rb +2 -2
- data/spec/unit/core_spec.rb +2 -4
- data/spec/unit/datastream_spec.rb +15 -0
- data/spec/unit/datastreams_spec.rb +1 -12
- data/spec/unit/file_configurator_spec.rb +1 -1
- data/spec/unit/ntriples_datastream_spec.rb +52 -57
- data/spec/unit/om_datastream_spec.rb +3 -3
- data/spec/unit/query_spec.rb +3 -4
- data/spec/unit/rdf_configurable_spec.rb +37 -0
- data/spec/unit/rdf_datastream_spec.rb +5 -7
- data/spec/unit/rdf_list_nested_attributes_spec.rb +22 -36
- data/spec/unit/rdf_list_spec.rb +26 -38
- data/spec/unit/rdf_properties_spec.rb +70 -0
- data/spec/unit/rdf_repositories_spec.rb +28 -0
- data/spec/unit/rdf_resource_datastream_spec.rb +287 -0
- data/spec/unit/rdf_resource_spec.rb +341 -0
- data/spec/unit/rdfxml_rdf_datastream_spec.rb +10 -26
- data/spec/unit/reload_on_save_spec.rb +24 -0
- data/spec/unit/solr_service_spec.rb +3 -3
- metadata +45 -16
- data/lib/active_fedora/rdf_datastream.rb +0 -113
- data/lib/active_fedora/rdf_list.rb +0 -162
- data/lib/active_fedora/rdf_node.rb +0 -332
- data/lib/active_fedora/rdf_node/term_proxy.rb +0 -141
- data/lib/active_fedora/rdf_object.rb +0 -24
- data/lib/active_fedora/yaml_adaptor.rb +0 -12
- data/spec/unit/rdf_node_spec.rb +0 -36
@@ -1,24 +0,0 @@
|
|
1
|
-
module ActiveFedora
|
2
|
-
module RdfObject
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
included do
|
6
|
-
include RdfNode
|
7
|
-
attr_reader :rdf_subject, :graph
|
8
|
-
end
|
9
|
-
|
10
|
-
def initialize(graph = RDF::Graph.new, subject=nil)
|
11
|
-
subject ||= RDF::Node.new
|
12
|
-
@graph = graph
|
13
|
-
@rdf_subject = subject
|
14
|
-
insert_type_assertion
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def insert_type_assertion
|
20
|
-
rdf_type = self.class.rdf_type
|
21
|
-
@graph.insert([@rdf_subject, RDF.type, rdf_type]) if rdf_type
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'psych'
|
3
|
-
YAMLAdaptor = Psych
|
4
|
-
rescue LoadError
|
5
|
-
$stderr.puts "*"*80
|
6
|
-
$stderr.puts "WARNING: Unable to load Psych, falling back to YAML for parser."
|
7
|
-
$stderr.puts " YAML will be removed in ActiveFedora 7.0.0."
|
8
|
-
$stderr.puts " YAMLAdaptor will be removed in ActiveFedora 7.0.0, and replaced with Psych"
|
9
|
-
$stderr.puts "*"*80
|
10
|
-
require 'yaml'
|
11
|
-
YAMLAdaptor = YAML
|
12
|
-
end
|
data/spec/unit/rdf_node_spec.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe ActiveFedora::RdfNode do
|
4
|
-
describe "inheritance" do
|
5
|
-
before do
|
6
|
-
class Parent
|
7
|
-
include ActiveFedora::RdfObject
|
8
|
-
map_predicates do |map|
|
9
|
-
map.title(in: RDF::DC)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
class Child < Parent
|
14
|
-
map_predicates do |map|
|
15
|
-
map.description(in: RDF::DC)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
after do
|
21
|
-
Object.send(:remove_const, :Child)
|
22
|
-
Object.send(:remove_const, :Parent)
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "child class" do
|
26
|
-
it "should inherit the terms" do
|
27
|
-
Child.config.keys.should == ['title', 'description']
|
28
|
-
end
|
29
|
-
end
|
30
|
-
describe "parent class" do
|
31
|
-
it "should not be infected with the child terms" do
|
32
|
-
Parent.config.keys.should == ['title']
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|