Skip to content

Commit

Permalink
Merge pull request #372 from pulibrary/multiple_descriptions
Browse files Browse the repository at this point in the history
Support multiple descriptions.
  • Loading branch information
jrgriffiniii committed Jun 18, 2018
2 parents 177e916 + 63aa15e commit 8838c2f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,6 @@ Naming/FileName:
RSpec/AnyInstance:
Exclude:
- 'spec/support/stub_iiif_response.rb'
RSpec/MultipleExpectations:
Exclude:
- 'spec/models/iiif_resource_spec.rb'
7 changes: 7 additions & 0 deletions app/values/manifest_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def metadata_hash
end
end

# Do not import manifest's description/etc if there's JSON-LD to pull metadata
# from.
def manifest_fields
return [] if jsonld_metadata
super
end

private

def range_labels(h)
Expand Down
6 changes: 3 additions & 3 deletions spec/cassettes/all_collections.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions spec/models/iiif_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
expect(solr_doc["readonly_range-label_tesim"]).to eq ["Chapter 1", "Chapter 2"]
expect(Spotlight::CustomField.last.field_type).to eq 'vocab'
expect(solr_doc["readonly_created_ssim"]).to eq ["1976-01-01T00:00:00Z"]
expect(solr_doc["readonly_description_ssim"]).to eq ["First", "Second"]
end
it 'indexes collections' do
exhibit = Spotlight::Exhibit.create title: 'Exhibit A'
Expand Down

0 comments on commit 8838c2f

Please sign in to comment.