geoblacklight 6.0.0.pre.alpha.5 → 6.0.0.pre.alpha.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8694955d2e5e0482fdb3da16e55b5fe2b7aaa49d4d2d7bb9f1125cfdabc5ab25
4
- data.tar.gz: 21165fb729027815df18f5c038d63600b603bbec571e00c9298af245af793612
3
+ metadata.gz: 61ecf2c6234b04ec7373158fed8c716500eaca2cbb482884a01d9a9249eb56aa
4
+ data.tar.gz: a1e78966179cb3bb969489bd9d8a03c2a0b0132cae20e7391d3cfe63fcdc07d9
5
5
  SHA512:
6
- metadata.gz: 247f475b99b5ac95cf7f4578034b54112a82fedcc82ddb92916a7876e8e5daae7144d46b4c7a13c2d1b03588446e91dfb33ffed5a3da0fd25ef688f9d2d8b53b
7
- data.tar.gz: 6ad85ca5ef899d7b706854ea3255f01f87e7adfa694bbf42edc0ed56838c0819c79698727c022adebdd9d68f094e6bbf5562e4a7eb4dab32af476f3800c20553
6
+ metadata.gz: 484b6090ec0e6a9bfc172f2a4016ff759e49eaaafe17eef71bfa43a904afeded28772fef76927c695ed4455da0266454683c7e6b3bab5f57fefdc98609bb52f4
7
+ data.tar.gz: e0f6c7f9555f442790dce2d959c4fd2c46ac3df04a0f0511b092b2ec00c2a4d78e16c363274af02880b3e24cee1147a3882d46490382e2899567d3b3e0380ad4
@@ -19,6 +19,10 @@ module Geoblacklight
19
19
  (direct_download_links + iiif_download_links).compact
20
20
  end
21
21
 
22
+ def child_component
23
+ Geoblacklight::Document::DownloadLinkComponent
24
+ end
25
+
22
26
  # Direct download links to files
23
27
  def direct_download_links
24
28
  direct_downloads = Array(document.direct_download&.dig(:download))
@@ -27,12 +31,12 @@ module Geoblacklight
27
31
  # Use label and url for multiple downloads; use format to label otherwise
28
32
  direct_downloads.map do |entry|
29
33
  if entry.is_a?(Hash)
30
- Geoblacklight::Document::DownloadLinkComponent.new(
34
+ child_component.new(
31
35
  title: entry["label"],
32
36
  url: entry["url"]
33
37
  )
34
38
  else
35
- Geoblacklight::Document::DownloadLinkComponent.new(
39
+ child_component.new(
36
40
  url: entry,
37
41
  data_file_type: document.file_format
38
42
  )
@@ -43,11 +47,11 @@ module Geoblacklight
43
47
  # Links to IIIF image and manifest downloads
44
48
  def iiif_download_links
45
49
  [
46
- document.iiif_download.present? && Geoblacklight::Document::DownloadLinkComponent.new(
50
+ document.iiif_download.present? && child_component.new(
47
51
  title: t("geoblacklight.download.iiif_image_link"),
48
52
  url: document.iiif_download[:iiif].sub(/\/info\.json$/, "/full/full/0/default.jpg")
49
53
  ),
50
- document.references.iiif_manifest.present? && Geoblacklight::Document::DownloadLinkComponent.new(
54
+ document.references.iiif_manifest.present? && child_component.new(
51
55
  title: t("geoblacklight.download.iiif_manifest_link"),
52
56
  url: document.references.iiif_manifest.endpoint,
53
57
  file_type: "JSON"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geoblacklight
4
- VERSION = "6.0.0-alpha.5"
4
+ VERSION = "6.0.0-alpha.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.pre.alpha.5
4
+ version: 6.0.0.pre.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves