Skip to content

Releases: samvera/active_fedora

ActiveFedora 9.3.0

07 Aug 16:00
Compare
Choose a tag to compare

ActiveFedora 9.3.0 has been released. This is a minor version which adds marshaling of records, type validators, and fixes bugs in associations regarding #select and setting nil.

Changes

2015-08-06: Records should be able to be marshaled and loaded [Justin Coyne]

2015-07-31: RDF association ids setter should handle nil [Justin Coyne]

2015-07-31: Add collection#select using block syntax [Trey Terrell]

2015-07-24: Add type validator objects to associations. [Trey Terrell]

ActiveFedora 9.2.1

23 Jul 17:43
Compare
Choose a tag to compare

ActiveFedora 9.2.1 has been released. This is a point release that fixes bugs in the return value of #delete on associations, some bugs with load_instance_from_solr, and adds enumerable methods to relations.

Changes

2015-07-20: Don't delete objects not part of the association. [Trey Terrell]

2015-07-19: Improve handling of imperfect profile_json when loading instances
from Solr. [Olli Lyytinen]

2015-07-16: ChangeSet shouldn't record other subjects. [Trey Terrell]

2015-07-15: Update unit test style [Mike Giarlo]

2015-07-09: Relation should respond to enumerable methods [Justin Coyne]

ActiveFedora 9.2.0

09 Jul 19:37
Compare
Choose a tag to compare

ActiveFedora 9.2.0 has been released. This release contains work supporting ldp direct and indirect containers and PCDM. Additionally work has gone toward refactoring ActiveFedora::File and ActiveFedora::Base towards using shared code.

Changes

2015-07-08: Add comments to FedoraAttributes [ci skip] [Justin Coyne]

2015-07-01: Remove has_many_versions This no longer does anything meaningful, so
it has been removed to prevent confusion. [Justin Coyne]

2015-06-30: Allow the FixityService to accept an RDF::URI [Justin Coyne]

2015-06-30: Refactor CollectionAssociation#reset [Justin Coyne]

2015-06-30: make CollectionAssociation#find_target private [Justin Coyne]

2015-06-25: Implements delete for direct containers. [Hector Correa]

2015-06-29: The uri() method should return an RDF::URI instead of a string
[Justin Coyne]

2015-06-29: Refactor File#== to avoid an unnecessary API call The new_record?
call used to cause an API call to fedora, which we are now able to avoid.
[Justin Coyne]

2015-06-26: Allow File constructor to take a block. Enables removing several
TODOs about using tap [Justin Coyne]

2015-06-26: Avoid unnecessary solr query If only one property has been defined
for a predicate, there's no reason to run a query to filter the results by
class. This avoids a call to solr that is unnecessary in most situations.
[Justin Coyne]

2015-06-26: For an AF record the primary key is always id [Justin Coyne]

2015-06-26: Use the solr terms query when fetching by id This allows the query
to be smaller and more understandable [Justin Coyne]

2015-06-25: RDF::IndexingService indexes objects & properties [Adam Wead]
true/false depending on whether something was saved or not. [Hector Correa]

2015-06-24: Reorganizing ActiveFedora:File code [Adam Wead]

2015-06-24: Make autosave tests more specific [Adam Wead]

2015-06-24: Use foreign_key in case user has specified one [Adam Wead]

2015-06-24: Refactoring ActiveFedora::File to use ActiveFedora::Persistence
changed WithMetadata to override create_or_update instead of save so that it
gets called when you call save or save! [Carolyn Cole]

2015-06-24: Removing unneeded line [Carolyn Cole]

2015-05-02: Add optional prefix to resource URI [Adam Wead]

2015-06-24: refactoring equals [Carolyn Cole]

2015-06-24: Removing dead define_destroy_hook method [Adam Wead]

2015-06-24: Refactoring .find_target for HasAndBelongsToMany [Adam Wead]

2015-06-18: Implements directly_contains_one association Note: part of this
functionality is blocked by #794 [Matt Zumwalt]

2015-06-24: Return relation for .limit, fixes #352 [Carolyn Cole]

2015-06-23: Refactoring DelegateAttribute [Adam Wead]

2015-06-18: Create a blacklist to disallow mutating relations [Justin Coyne]

2015-06-15: Add documentation to apply_schema. [Trey Terrell]

2015-06-04: Add apply_schema support to AF. [Trey Terrell]

2015-06-11: Remove unnecessary dependency on rdf-vocab [Justin Coyne]

2015-05-18: Direct/Indirect containers should have an include? method [Justin
Coyne]

2015-05-18: A SolrBackedResource should be enumerable [Justin Coyne]

2015-05-13: Refactor Deleting Indirect Proxies [Trey Terrell]

2015-04-29: Update ActiveTriples [Trey Terrell]

2015-05-13: Translation procs should not overwrite one another [Justin Coyne]

2015-05-13: Fix Deletion of Indirect Container Proxies [Trey Terrell]

2015-05-11: Update Travis to support YARD [Trey Terrell]

2015-05-11: Delete proxies. [Trey Terrell]

2015-05-11: Add spec for deleting indirect items. [Trey Terrell]

2015-05-08: Request Inbound Relations [Trey Terrell]

2015-05-07: Added ldp:IndirectContainer [Justin Coyne]

2015-05-06: Add direct containers [Justin Coyne]

ActiveFedora 9.2.0.rc1

30 Jun 18:55
Compare
Choose a tag to compare
Pre-release

ActiveFedora 9.2.0.rc1 has been released today. This release contains work supporting ldp direct and indirect containers and PCDM. Additionally work has gone toward refactoring ActiveFedora::File and ActiveFedora::Base towards using shared code. Please test this release candidate now and raise any issues you find so that we can fix them for the final release scheduled for Tues, July 7th.

-Justin

Changes

2015-06-30: Refactor CollectionAssociation#reset [Justin Coyne]

2015-06-30: make CollectionAssociation#find_target private [Justin Coyne]

2015-06-25: Implements delete for direct containers. [Hector Correa]

2015-06-29: The uri() method should return an RDF::URI instead of a string
[Justin Coyne]

2015-06-29: Refactor File#== to avoid an unnecessary API call The new_record?
call used to cause an API call to fedora, which we are now able to avoid.
[Justin Coyne]

2015-06-26: Allow File constructor to take a block. Enables removing several
TODOs about using tap [Justin Coyne]

2015-06-26: Avoid unnecessary solr query If only one property has been defined
for a predicate, there's no reason to run a query to filter the results by
class. This avoids a call to solr that is unnecessary in most situations.
[Justin Coyne]

2015-06-26: For an AF record the primary key is always id [Justin Coyne]

2015-06-26: Use the solr terms query when fetching by id This allows the query
to be smaller and more understandable [Justin Coyne]

2015-06-25: RDF::IndexingService indexes objects & properties [Adam Wead]
true/false depending on whether something was saved or not. [Hector Correa]

2015-06-24: Reorganizing ActiveFedora:File code [Adam Wead]

2015-06-24: Make autosave tests more specific [Adam Wead]

2015-06-24: Use foreign_key in case user has specified one [Adam Wead]

2015-06-24: Refactoring ActiveFedora::File to use ActiveFedora::Persistence
changed WithMetadata to override create_or_update instead of save so that it
gets called when you call save or save! [Carolyn Cole]

2015-06-24: Removing unneeded line [Carolyn Cole]

2015-05-02: Add optional prefix to resource URI [Adam Wead]

2015-06-24: refactoring equals [Carolyn Cole]

2015-06-24: Removing dead define_destroy_hook method [Adam Wead]

2015-06-24: Refactoring .find_target for HasAndBelongsToMany [Adam Wead]

2015-06-18: Implements directly_contains_one association Note: part of this
functionality is blocked by #794 [Matt Zumwalt]

2015-06-24: Return relation for .limit, fixes #352 [Carolyn Cole]

2015-06-23: Refactoring DelegateAttribute [Adam Wead]

2015-06-18: Create a blacklist to disallow mutating relations [Justin Coyne]

2015-06-15: Add documentation to apply_schema. [Trey Terrell]

2015-06-04: Add apply_schema support to AF. [Trey Terrell]

2015-06-11: Remove unnecessary dependency on rdf-vocab [Justin Coyne]

2015-05-18: Direct/Indirect containers should have an include? method [Justin
Coyne]

2015-05-18: A SolrBackedResource should be enumerable [Justin Coyne]

2015-05-13: Refactor Deleting Indirect Proxies [Trey Terrell]

2015-04-29: Update ActiveTriples [Trey Terrell]

2015-05-13: Translation procs should not overwrite one another [Justin Coyne]

2015-05-13: Fix Deletion of Indirect Container Proxies [Trey Terrell]

2015-05-11: Update Travis to support YARD [Trey Terrell]

2015-05-11: Delete proxies. [Trey Terrell]

2015-05-11: Add spec for deleting indirect items. [Trey Terrell]

2015-05-08: Request Inbound Relations [Trey Terrell]

2015-05-07: Added ldp:IndirectContainer [Justin Coyne]

2015-05-06: Add direct containers [Justin Coyne]

v9.1.2

11 Jun 17:54
Compare
Choose a tag to compare

2015-06-11: Remove unnecessary dependency on rdf-vocab [Justin Coyne]

2015-05-05: Track type as a changed attribute in MetadataNode [Justin Coyne]

2015-05-05: Don't try to save the metadata node if the file is unsaved [Justin
Coyne]

2015-05-05: File#save should return true if there is nothing to save Fixes #784
This parallels how ActiveRecord objects behave if there are no changes, e.g.:
[Justin Coyne]

2015-05-04: CollectionAssociation should generate a solr query lazily When a
CollectionAssociation is loaded before the owing object is saved the solr query
is produced without the id of the owner, so all the objects of the correct type
are returned. Ref #781 [Justin Coyne]

v8.1.0

18 May 20:46
Compare
Choose a tag to compare
  • Patches casting behavior [David Chandek-Stark]
    See https://github.com/projecthydra/active_fedora/wiki/Patching-ActiveFedora-7.x-&-8.x-Casting-Behavior
    for detailed information on the problem.

    The solution offered in this patch preserves the most-specific-class algorithm
    of ActiveFedora::ContentModel.best_model_for and raises a new execption,
    ActiveFedora::ModelNotAsserted in ActiveFedora::Core#adapt_to_cmodel.

    Note that a repository object can still be loaded into a model class not asserted,
    for example, by using .find with cast: false.

    Closes #746 (although not really a backport)

  • Fixed rsolr patch-level dependency introduced by 35189fc.

Version 9.1.0

16 Apr 23:11
Compare
Choose a tag to compare

2015-04-16: Use delegate_to instead of datastream in the options for property
Trying to reduce/elimnate the useage of "datastream" especially in the public
API. [Justin Coyne]

2015-04-08: Fix deleting from a HABTM when the inverse_of is a has_many. Fixes
#763 [Justin Coyne]

2015-04-07: Remove a spec that is a duplicate of
integration/collection_association_spec.rb:92 [Justin Coyne]

2015-04-07: Leverage the code in AssociationRelation to find the inverse. Fixes
#760 [Justin Coyne]

2015-04-10: Make #translate_id_to_uri/uri_to_id reliable. [Trey Terrell]

2015-04-02: Find best model match in case of inheritance [Stuart Kenny]

2015-04-10: Requires 'deprecation' for ActiveFedora::File [Andrew Myers]

2015-04-06: Only set/save the inverse on a HABTM if the inverse is also HABTM
previously we were getting: [Justin Coyne]

2015-04-06: Derive a foreign_key ending with _ids if the inverse is a
collection [Justin Coyne]

2015-04-06: Find inverse relations when class_names have modules [Justin Coyne]

2015-04-06: Raise an error when the inverse relationship can not be found.
Previously a "SystemStackError: Stack too deep" was encountered in this
situation [Justin Coyne]

2015-04-02: Add a mechanism to set rdf_label on the ActiveTriple resource
[Justin Coyne]

2015-04-03: Add CleanConnection [Trey Terrell]

2015-04-02: The indexing hints should be inheritable [Justin Coyne]

2015-04-03: Refactor has_and_belongs_to_many_associations_spec [Justin Coyne]

2015-04-03: Remove unused sample classes [Justin Coyne]

2015-04-02: Sort versions as dates not as strings [Michael J. Giarlo]

2015-03-27: Allow property to delegate to a datastream. Ref #736 [Justin Coyne]

2015-04-01: Prevents an object from being loaded to the incorrect class. For
example, when loading a batch object it should be loaded into a Batch (and not a
File for example.) [Hector Correa]

2015-03-30: Groundskeeping: YARD cleanup [Joe Atzberger]

2015-03-27: Move the indexing logic to the model. Fixes #736 You should now add
indexing hints to has_attributes by passing a block similar to how you do it
with rdf properties. e.g.: [Justin Coyne]

2015-03-27: YARD syntax is @return, not @returns [Joe Atzberger]

2015-03-27: Last touch up on README [Joe Atzberger]

2015-03-27: README touchup [Joe Atzberger]

2015-03-27: Formatting for README [Joe Atzberger]

9.0.1

10 Feb 22:10
Compare
Choose a tag to compare

Fixes a bug that caused the initial request to active fedora to take an extremely long time when the fedora repository had a large number of objects.

Follow the Release notes from v9.0.0 for installation.

ActiveFedora 9.0.0

30 Jan 21:23
Compare
Choose a tag to compare

ActiveFedora 9.0.0

I'm pleased to announce ActiveFedora 9.0.0, the first release of ActiveFedora to work with Fedora Commons 4. There are many changes in this release, but most things that worked in ActiveFedora 8 should continue to work in ActiveFedora 9. Please add to these release notes if you find something missing:

Changes

RDF improvements

You can now add properties right on a subclass of ActiveFedora::Base just as you would have in an RDFDatastream in previous versions of ActiveFedora

Datastreams are now called Files

Fedora 4 doesn't have a concept of datastreams. Everything is just a resource at a URL. We've change Active-Fedora to drop the Datastream terminology and we've replaced it with File

  • add_file_datastream has been renamed to add_file
  • File#prefix now takes one required argument, the file_path.
  • ActiveFedora::Base.datastreams is now ActiveFedora::Base.attached_files
  • ActiveFedora::Base.add_datastream is now ActiveFedora::Base.attach_file
  • instead of has_metadata or has_file_datastream use contains
    E.G. has_metadata 'descMetadata', type: CodexMetadata
    becomes
    contains 'descMetadata', class_name: 'CodexMetadata'
    And has_file_datastream 'pageContent' becomes contains 'pageContent'

pid is now id and dsid is now path

  • ActiveFedora::Base.attach_file (formerly add_datastream) now takes two arguments, the File and the file_path (was dsid)
  • assign_pid, the hook for minting custom identifiers, is now called assign_id

Refactoring

  • load_instance_from_solr has been refactored to return an object backed by a JSON structure. It is read-only
  • Indexing objects. Instead of overriding to_solr in order to add custom indexing, ActiveFedora has introduced indexing objects:
  class MyObject < ActiveFedora::Base
    # inject a custom indexing service
    def indexer
      MyIndexingService 
    end
  end

  class MyIndexingService < ActiveFedora::IndexingService
    def generate_solr_document
      super.tap do |solr_doc|
        solr_doc[Solrizer.solr_name('label')] = object.label
        solr_doc[Solrizer.solr_name('file_format')] = object.file_format
        solr_doc[Solrizer.solr_name('file_format', :facetable)] = object.file_format
        solr_doc['all_text_timv'] = object.full_text.content
        solr_doc = object.index_collection_ids(solr_doc)
      end
    end
end
  • has_model_ssim now indexes the model name, not the URI
  • object_relations and all of SemanticNode is gone

Follow the Ruby Conventions

  • :mimeType parameter to add_file is now to :mime_type
  • File#mimeType is now #mime_type
  • File#dsSize is now #size
  • File#new? is now #new_record?

v8.0.0

14 Jan 17:23
Compare
Choose a tag to compare

RDF module renamed (#616)

ActiveFedora::Rdf has been renamed to ActiveFedora::RDF. Deprecated submodules of ActiveFedora::Rdf have been removed (see below). For the most part, this is a transparent change, since classes like ActiveFedora::RDFDatastream do not use the ActiveFedora::RDF namespace.

Fcrepo3 and ProjectHydra RDF vocabularies added (#616)

Change to RDFDatastream resource class implementation (#500)

ActiveFedora::Rdf::ObjectResource was removed in favor of permitting an RDFDatastream to use any ActiveTriples::Resource subclass as its resource class, provided that it includes ActiveFedora::RDF::Persistence.

If you have overridden #resource_class in your RDF datastream subclass, you should change your resource class from:

class MyDatastreamResource < ActiveFedora::Rdf::Resource
  # stuff
end

to:

class MyDatastreamResource < ActiveTriples::Resource
  include ActiveFedora::RDF::Persistence
  # stuff
end

AND, in your datastream, change:

class MyRDFDatastream < NtriplesRDFDatastream # or, < RdfxmlRDFDatastream
  def resource_class
    MyDatastreamResource
  end
end

to:

class MyRDFDatastream < NtriplesRDFDatastream # or, < RdfxmlRDFDatastream
  resource_class MyDatastreamResource
end

Change NtriplesRDFDatastream.config to NtriplesRDFDatastream.properties

Change to default datastream "prefix" (prepended to solr field names):

  • ActiveFedora::Datastream#prefix returns "#{dsid.underscore}__" by default (was empty string) -- e.g. "desc_metadata__" for dsid "descMetadata". In AF 7.x a deprecation warning prompted overriding of #prefix to maintain the 7.x behavior (no prefix) in version 8. If you chose to override #prefix to implement the version 8 behavior, you should be able to remove the override.

Change to attribute setters

The previous (deprecated) behavior permitted attribute setters to receive arrays or scalar regardless of their definitions as "multiple" or "unique" (multiple: false). The new behavior required the sent value to conform to the attribute definition:

  • The setter for an attribute defined with multiple: true raises ArgumentError when given a scalar value:
has_attributes :title, datastream: "descMetadata", multiple: true

obj.title = "Test" # => ArgumentError
obj.title = ["Test"] # OK
  • The setter for an attribute defined with multiple: false (a.k.a. "unique") raises ArgumentError when given an enumerable value (Array):
has_attributes :description, datastream: "descMetadata", multiple: false

obj.description = ["Testing ActiveFedora 8.0.0"] # => ArgumentError
obj.description = "Testing ActiveFedora 8.0.0." # OK
  • The #attributes= method behaves consistently with the attribute setters -- i.e., raising ArgumentError when setting an attribute value inappropriately as outlined above.

Change to attributes reader

The #attributes reader method behaves consistently with the attribute readers -- i.e., returning scalar values for multiple: false and arrays for multiple: true attributes.

Optional fedora.yml configuration options added as comments to generator template (#618)

# timeout: 60
# open_timeout: nil
# ssl_client_cert: <ssl certificate>
# ssl_client_key:  <ssl key>
# validateChecksum: false

Removed deprecated methods

  • ActiveFedora::SolrService.escape_uri_for_query (use Rsolr.escape)
  • ActiveFedora::SemanticNode.pids_from_uris
  • ActiveFedora::RDF::Indexing#prefix (use #apply_prefix)
  • ActiveFedora::RDF::Indexing.prefix
  • ActiveFedora::SolrDigitalObject#new? (use #new_record?)
  • ActiveFedora::Querying#quote_for_solr (use RSolr.escape)
  • ActiveFedora::Persistence#new? and #new_object? (use #new_record?)

Removed deprecated RDF modules

  • ActiveFedora::Rdf::Resource (use ActiveTriples::Resource)
  • ActiveFedora::Rdf::Term (use ActiveTriples::Term)
  • ActiveFedora::Rdf::List (use ActiveTriples::List)
  • ActiveFedora::Rdf::Configurable (use ActiveTriples::Configurable)
  • ActiveFedora::Rdf::Properties (use ActiveTriples::Properties)
  • ActiveFedora::Rdf::Repositories (use ActiveTriples::Repositories)
  • ActiveFedora::Rdf::NodeConfig (use ActiveTriples::NodeConfig)
  • ActiveFedora::Rdf::NestedAttributes (use ActiveTriples::NestedAttributes)