Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Use Hyrax description property and add abstract property #1139

Merged
merged 1 commit into from
Mar 25, 2017

Conversation

eliotjordan
Copy link
Member

  • Hyrax description property is now used instead of locally defined property.
  • Adds abstract property.
  • Removes description field from SR and MVW work forms.

Closes #1132

@coveralls
Copy link

coveralls commented Mar 24, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 8b2e850 on 1132-description into 6e1ff3f on master.

@@ -280,7 +280,7 @@ def build_file_set(id)
expect(result['@id']).to eq "http://plum.com/concern/scanned_resources/1/manifest"
end
it "has a description" do
expect(result.description).to eq [record.description]
expect(result.description).to eq [record.description.first]
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be expect(result.description).to eq record.description right?

Copy link
Member Author

@eliotjordan eliotjordan Mar 24, 2017

Choose a reason for hiding this comment

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

They aren't equivalent. result.description is and Array. record.description is an RDF something something class. The test fails unless you cast that into an Array.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to use Array() instead.

@@ -67,7 +67,7 @@ def metadata_hash
hsh[entry["label"].to_sym] = Array(entry["value"]).join(", ")
end
result[:Title] = Array(scanned_resource.title).join(", ") if scanned_resource.title
result[:Description] = Array(scanned_resource.description).join(", ") if scanned_resource.description
result[:Description] = scanned_resource.description.join(", ") if scanned_resource.description
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this change is necessary. Array([1,2,3]) leaves the array unchanged, while ensuring the description field returns an array.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair point. I'll revert the change.

@coveralls
Copy link

coveralls commented Mar 24, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 4eed3ba on 1132-description into 6e1ff3f on master.

@tpendragon
Copy link
Contributor

I'm 👍, but I'll leave it to @tampakis.

@tampakis tampakis merged commit 9ffb2e1 into master Mar 25, 2017
@tampakis tampakis deleted the 1132-description branch March 25, 2017 19:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants