iiif_print 3.0.12 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +11 -1
- data/app/models/concerns/iiif_print/solr_document_decorator.rb +10 -1
- data/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb +9 -1
- data/app/transactions/hyrax/transactions/iiif_print_container_decorator.rb +10 -0
- data/lib/iiif_print/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4050e3e2e6c79d5d93bc63e2801f75bb13a7a1985dc2729ead3c0a15c4855075
|
|
4
|
+
data.tar.gz: b0d627fa5b6d190d0fbdae66e2db116e77eb74bf3473630c008a61dd794ed600
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9f52bc069331756409eae5f67b878b2801c46d14e44fa36804faed750cfb2c07c5159015e5e236c084b0dcf8e0d2412d2d907905c43a07feba068c475761160
|
|
7
|
+
data.tar.gz: 7f58c71b8f933df6cec597f766494091a3c33fcd4734a14118ee7213d80262d52ebd3196b452267136913dfcba3a614fbc81dfbf7399edacb44687a6defa7876
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -121,7 +121,17 @@ We created IiifPrint with an assumption of ActiveFedora. However, as Hyrax now
|
|
|
121
121
|
|
|
122
122
|
### IIIF URL configuration
|
|
123
123
|
|
|
124
|
-
If you set EXTERNAL_IIIF_URL in your environment,
|
|
124
|
+
If you set `EXTERNAL_IIIF_URL` in your environment, IiifPrint will use that URL as the root for your IIIF URLs. It will also switch from using the file set ID to using the file's checksum hex digest as the identifier. In Wings/Fedora mode the digest is stored as a `urn:sha1:HEX` string; in Valkyrie mode it is stored as a plain hex string — IiifPrint handles both automatically.
|
|
125
|
+
|
|
126
|
+
This enables using serverless_iiif or Cantaloupe (referred to as the service) by pointing the service to the same S3 bucket that the repository writes uploaded files to. By setting it up that way you do not need the service to connect to Fedora or Hyrax at all — both natively support connecting to an S3 bucket to retrieve file content.
|
|
127
|
+
|
|
128
|
+
If your S3 bucket organises files under a folder prefix (e.g. a `staging/` or `production/` subfolder), set `IIIF_S3_FOLDER_PREFIX` to that prefix. IiifPrint will prepend it to the digest identifier and percent-encode the separator so the combined value is a single IIIF path segment:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
EXTERNAL_IIIF_URL=https://iiif.example.org
|
|
132
|
+
IIIF_S3_FOLDER_PREFIX=staging
|
|
133
|
+
# → identifier used: staging%2F<hex-digest>
|
|
134
|
+
```
|
|
125
135
|
|
|
126
136
|
### Model level configurations
|
|
127
137
|
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module IiifPrint
|
|
4
4
|
module SolrDocumentDecorator
|
|
5
|
+
def digest_hex
|
|
6
|
+
raw = digest
|
|
7
|
+
return nil if raw.blank?
|
|
8
|
+
# Wings/Fedora stores "urn:sha1:HEX" or "urn:md5:HEX"; Valkyrie stores a plain hex string.
|
|
9
|
+
raw[/\Aurn:[^:]+:([\w]+)\z/, 1] || raw
|
|
10
|
+
end
|
|
11
|
+
|
|
5
12
|
def digest_sha1
|
|
6
|
-
|
|
13
|
+
Deprecation.warn(self, "#digest_sha1 is deprecated; use #digest_hex instead. " \
|
|
14
|
+
"#digest_sha1 will be removed in the next major version.")
|
|
15
|
+
digest_hex
|
|
7
16
|
end
|
|
8
17
|
|
|
9
18
|
def method_missing(method_name, *args, &block)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
1
3
|
# mixin to provide URL for IIIF Content Search service
|
|
2
4
|
module IiifPrint
|
|
3
5
|
module IiifManifestPresenter
|
|
@@ -82,7 +84,13 @@ module IiifPrint
|
|
|
82
84
|
end
|
|
83
85
|
|
|
84
86
|
def external_latest_file_id
|
|
85
|
-
|
|
87
|
+
hex = digest_hex
|
|
88
|
+
return nil if hex.blank?
|
|
89
|
+
|
|
90
|
+
prefix = ENV['IIIF_S3_FOLDER_PREFIX'].presence
|
|
91
|
+
return hex unless prefix
|
|
92
|
+
|
|
93
|
+
CGI.escape("#{prefix}/#{hex}")
|
|
86
94
|
end
|
|
87
95
|
|
|
88
96
|
def iiif_image_url_builder(url_builder:)
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
begin
|
|
4
|
+
require 'dry/container'
|
|
5
|
+
rescue LoadError
|
|
6
|
+
nil
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
# dry-transaction >= 0.15 dropped dry-container, so Dry::Container::Mixin is unavailable in those
|
|
10
|
+
# environments. Guard the entire decorator so iiif_print still boots in Hyrax 2.x / newer dry-rb.
|
|
11
|
+
return unless defined?(Dry::Container)
|
|
12
|
+
|
|
3
13
|
module Hyrax
|
|
4
14
|
module Transactions
|
|
5
15
|
##
|
data/lib/iiif_print/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iiif_print
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean Upton
|
|
@@ -14,7 +14,7 @@ authors:
|
|
|
14
14
|
autorequire:
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
|
-
date: 2026-
|
|
17
|
+
date: 2026-06-16 00:00:00.000000000 Z
|
|
18
18
|
dependencies:
|
|
19
19
|
- !ruby/object:Gem::Dependency
|
|
20
20
|
name: blacklight_iiif_search
|
|
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
511
511
|
- !ruby/object:Gem::Version
|
|
512
512
|
version: '0'
|
|
513
513
|
requirements: []
|
|
514
|
-
rubygems_version: 3.
|
|
514
|
+
rubygems_version: 3.3.20
|
|
515
515
|
signing_key:
|
|
516
516
|
specification_version: 4
|
|
517
517
|
summary: IiifPrint is a gem (Rails "engine") for Hyrax-based digital repository applications
|