Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ActiveFedora::Checksum class to encapsulate file digest info. #919

Merged
merged 1 commit into from Oct 21, 2015

Conversation

dchandekstark
Copy link
Member

Adds #checksum method to ActiveFedora::File.

Adds `#checksum` method to ActiveFedora::File.
@jcoyne
Copy link
Member

jcoyne commented Oct 20, 2015

👍 @awead care to have a look?

@@ -134,6 +134,10 @@ def metadata
@metadata ||= ActiveFedora::WithMetadata::MetadataNode.new(self)
end

def checksum
ActiveFedora::Checksum.new(self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

@checksum ||= ActiveFedora::Checksum.new(self)

and then set @checksum = nil under #refresh.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't think the operation cost warrants the complexity of caching. Or if it does, perhaps it belongs on ActiveFedora::File::Attributes#digest. @jcoyne

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd buy that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, well maybe we merge this and address any caching separately if anybody thinks that's important?

awead added a commit that referenced this pull request Oct 21, 2015
Adds ActiveFedora::Checksum class to encapsulate file digest info.
@awead awead merged commit f85b4ea into samvera:master Oct 21, 2015
@awead awead removed the in progress label Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants