imogen 0.5.0 → 0.5.1

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: b1d474982ff7cb978506e3b5970c0514ef031a051dcd89100b73ad9d5e95a37e
4
- data.tar.gz: bcb17191e3464ac5e3cce8071f0d3cadbe6985a9c17ea5bbffc1abd21f9cf5a6
3
+ metadata.gz: '09c425bd9ab585fa2587f09034d1fde353bf0ba992681d5ebe0631faff1b6f6d'
4
+ data.tar.gz: 828b3d38469483aa9224c2fb2268eb9dfd2bec04e42a40c577f252b01f288d6f
5
5
  SHA512:
6
- metadata.gz: bbd6c58beb6c449cc0a1947fa51f4f933e5dcac95b22369d0e3640f09d07190c3f925063ea428b044ab31e839fb45d6ca5c2c09a25478a8db1498fa9c176e57c
7
- data.tar.gz: 94436933d34ff613b725d15e7686a87bf0c14b80a7b95800350df596075e356656b2bada4af3b35e79ccc704f54b247350db064eb98bc4d105a75484f30d43ec
6
+ metadata.gz: 0eff43035b35e4ecb31cb341ef8152df76b1840c43fd042fc984b6786f2bc0c9b66e64d5801f65eba0da2dd903bc28fe7506cb027f0fb27701323a6e590ff42c
7
+ data.tar.gz: e649f55749ff213fad130d66a8429340d6268d83e10a26d49d3bdfbdf08fc7c9f1894b8e9cf5422408caf1657b48c6cab12dbdc3a68b0e65ce2168277c1190cd
@@ -43,7 +43,8 @@ module Imogen
43
43
  raster_opts[:rotation].to_s,
44
44
  "#{raster_opts[:quality]}.#{Imogen::Iiif::FORMATS[raster_opts[:format]]}"
45
45
  )
46
- yield(img, dest_path, raster_opts['format'], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
46
+
47
+ yield(img, dest_path, raster_opts[:format], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
47
48
  end
48
49
 
49
50
 
@@ -114,7 +115,7 @@ module Imogen
114
115
  raster_opts[:rotation].to_s,
115
116
  "#{raster_opts[:quality]}.#{Imogen::Iiif::FORMATS[raster_opts[:format]]}"
116
117
  )
117
- yield(img, dest_path, raster_opts['format'], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
118
+ yield(img, dest_path, raster_opts[:format], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
118
119
 
119
120
  row += 1
120
121
  y += tile_height
@@ -70,7 +70,7 @@ describe Imogen::Iiif::Tiles, type: :unit do
70
70
  64 => tile64
71
71
  }.each do |tile_size, expected_tiles|
72
72
  actual = []
73
- described_class.for(@test_image, '', :jpeg, tile_size) do |img, dest_path, format, opts|
73
+ described_class.for(@test_image, '', :jpg, tile_size) do |img, dest_path, format, opts|
74
74
  actual << dest_path
75
75
  end
76
76
  expect(actual).to eql(expected_tiles)
@@ -82,6 +82,17 @@ describe Imogen::Iiif::Tiles, type: :unit do
82
82
  actual = []
83
83
  described_class.for(@test_image, '', :png, 256) do |img, dest_path, format, opts|
84
84
  actual << dest_path
85
+ expect(format).to eq(:png)
86
+ end
87
+ expect(actual).to eql(expected)
88
+ end
89
+ it 'should produce jpg when requested' do
90
+ expected = tile256
91
+ expected.uniq!
92
+ actual = []
93
+ described_class.for(@test_image, '', :jpg, 256) do |img, dest_path, format, opts|
94
+ actual << dest_path
95
+ expect(format).to eq(:jpg)
85
96
  end
86
97
  expect(actual).to eql(expected)
87
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imogen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Armintor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-05-08 00:00:00.000000000 Z
12
+ date: 2026-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-vips