iiif_manifest 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21edd1255e73222b1c238869e8c2d47fb0d33bc22fd0e490e0b64e034de1a147
4
- data.tar.gz: f969ee0b9bc4c9f1e2933d0cce4aeaec8cbcd532520cfa1b03e88a07f0f55d9e
3
+ metadata.gz: f04edfce006264b8b8cb8d2a8682c091dbd5d5d09677548fd19c3e905eae08bc
4
+ data.tar.gz: 8a50d0a1316e868cda2cea0b3533d768e77044293a8b1a6f3f9f5fcb3436c1d4
5
5
  SHA512:
6
- metadata.gz: 9dba593b91faf18b8ba717e668cad98c1ca3384a97b989fa380e15ba20cced1c4e7d9d01d8698860d2a45fdaf3d7808cf93ba767853cac8af7acc2fbc8aef417
7
- data.tar.gz: 1e9738fc181e851f23ab5bf37f797c9aa40c561a6201e9c6d56590a84d7b088641eef3d884fa59107a6e9f47d5570b22151a87f04c4747bc9b59558b249bc50f
6
+ metadata.gz: 6164c0ecc842baf3b324e42d160be61bfd8705636fddc0743c9a819c70290d607d379eec12ad22523ebe5dbc0639fcd471d9ef3b3c9143acd699acea0e60f282
7
+ data.tar.gz: 9d174422877c7806646013f6df2e37e5395d8c56ce461785e971df6a7905354b870c31533498d5039f1b3ed711154f8f5e3c079ca7900b1d5f6396158d9aa492
data/README.md CHANGED
@@ -124,6 +124,7 @@ In Presentation 3.0, additionally it **_may_** implement;
124
124
  - `#sequence_rendering` to contain an array of hashes for file downloads to be offered at each leaf node. This follows a similar format as `#sequence_rendering` at sequences level
125
125
  - `#see_also` to contain an array of hashes for related resources to be offered at each leaf node. Items must contain "id" and "type" properties. Items should contain "label", "format", and "profile" properties.
126
126
  - `#part_of` to contain an array of hashes for parent resources to be offered at each leaf node. Items must contain "id" and "type" properties. Items should contain "label".
127
+ - `#homepage` to contain an array of hashes for homepage resources to be offered at each leaf node. Items must contain "id", "type", and "label" properties. Items should contain a "format" property and may contain a "language" property.
127
128
  - `#placeholder_content` to contain an instance of `IIIFManifest::V3::DisplayContent` for [`placeholderCanvas`](https://iiif.io/api/presentation/3.0/#placeholdercanvas) at each leaf node
128
129
 
129
130
  ```ruby
@@ -158,6 +159,10 @@ In Presentation 3.0, additionally it **_may_** implement;
158
159
  [{"id" => "http://test.host/display_image/id/parent.json", "type" => "manifest"}]
159
160
  end
160
161
 
162
+ def homepage
163
+ [{"id" => "http://test.host/display_image/id/homepage", "type" => "Text", "label" => "Item Homepage"}]
164
+ end
165
+
161
166
  def placeholder_content
162
167
  IIIFManifest::V3::DisplayContent.new(id,
163
168
  width: 100,
@@ -207,6 +212,7 @@ The presentation 3.0 support has been contained to the `V3` namespace. Version 2
207
212
  - `#display_image` is no longer required but will still work if provided
208
213
  - `#sequence_rendering` is supported at leaf node level, to present an array of file downloads available at each leaf node
209
214
  - `#part_of` is supported at leaf node level, to present an array of parent resources available at each leaf node.
215
+ - `#homepage` is supported at leaf node level, to present an array of homepage resources available at each leaf node.
210
216
  - `#placeholder_content` which returns an instance of `IIIFManifest::V3::DisplayContent` presents a [`placeholderCanvas`](https://iiif.io/api/presentation/3.0/#placeholdercanvas) at leaf node level
211
217
  - DisplayContent may provide `#auth_service` which should return a hash containing a IIIF Authentication service definition (<https://iiif.io/api/auth/1.0/>) that will be included on the content resource.
212
218
 
@@ -107,6 +107,7 @@ module IIIFManifest
107
107
  canvas.metadata = metadata_from_record(record) if metadata_from_record(record).present?
108
108
  canvas.summary = ManifestBuilder.language_map(record.description) if record.respond_to?(:description) &&
109
109
  record.description.present?
110
+ canvas.homepage = populate(:homepage) if populate(:homepage).present?
110
111
  end
111
112
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
112
113
 
@@ -178,6 +178,10 @@ module IIIFManifest
178
178
  return unless summary.present?
179
179
  inner_hash['summary'] = summary
180
180
  end
181
+
182
+ def homepage=(homepage)
183
+ inner_hash['homepage'] = homepage
184
+ end
181
185
  end
182
186
 
183
187
  class Range < IIIFService
@@ -1,3 +1,3 @@
1
1
  module IIIFManifest
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iiif_manifest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  - Trey Pendragon
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-02-14 00:00:00.000000000 Z
12
+ date: 2024-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -180,7 +180,7 @@ homepage: https://github.com/samvera/iiif_manifest
180
180
  licenses: []
181
181
  metadata:
182
182
  rubygems_mfa_required: 'true'
183
- post_install_message:
183
+ post_install_message:
184
184
  rdoc_options: []
185
185
  require_paths:
186
186
  - lib
@@ -195,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.5.6
199
- signing_key:
198
+ rubygems_version: 3.4.1
199
+ signing_key:
200
200
  specification_version: 4
201
201
  summary: Generate IIIF presentation manifests for Hydra::Works
202
202
  test_files: []