Merge pull request #389 from no-reply/master

fixing misused RuntimeError in AF::Rdf::Resource
Fix belongs_to cmodel inheritance.

While has_many was still working as intended, some changes to
belongs_to broke a cmodel inheritance use case. This use case was
not adequately tested corrected and I've updated the appropriate
unit test to check for the below.

Given the following setup:

    class SimpleCollection < ActiveFedora::Base
       has_many :objects, property: :is_part_of, class_name: 'Object'
     end

     class ComplexCollection < SimpleCollection
     end

     class Item < ActiveFedora::Base
       belongs_to :collection, :property=>:is_part_of, \
       :class_name=>''SimpleCollection”
     end

Doing the following should work:

    object = Item.new
    object.collection = ComplexCollection.create
    object.save!

    object.collection #returns the complex collection

In our exact use case, we have “SystemCollection” and
“OAICollection” that inherit from a base “Collection”
class. Before this fix, mapping to “Collection” would
return neither despite that being in their cmodel
structure since the code was updated to only look at an
exact class match.

As no one else is using inheritance that I am aware of,
this change should not impact any other hydra heads.
Making missing AF::Base objects act as Resources

AF::Base/Rdf::Identifiable objects that have been deleted or are
otherwise missing from Fedora are now treated as a generic Rdf::Resource
when encountered in another object's graph.
fixing assignment of rdf_subjects in #attributes=

Subjects for Rdf::Resources created directly with #attributes= (i.e.
not build) were not getting set. This was causing some nodes with
assigned rdf_subjects to be treated as bnodes. Adds tests for assignment
of rdf_subjects.
Merge pull request #390 from no-reply/feature/rdf-missing-params

fixing assignment of rdf_subjects in #attributes=
Merge pull request #391 from boston-library/cmodel_inheritance_fix

Fix belongs_to cmodel inheritance.
Merge pull request #392 from no-reply/feature/rdf-identifiable

Making missing AF::Base objects act as Resources