djatoka 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/djatoka.gemspec +1 -1
- data/lib/djatoka/iiif_request.rb +1 -1
- data/test/test_iiif_request.rb +4 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b10e171c15f72747a80d62a9b1d0d5bac5e2d2a8
|
4
|
+
data.tar.gz: 982a67a18a63f1650315f7e122428b76547226a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb2062b25b58e8f7818d98d27c2027b9acd22ce4df6cc88fa5d3d1c48c2ed5f9b699b47a60b32b8673bf3207c3da30cdd228dd7e8e9b0de045e29c05c72a43e4
|
7
|
+
data.tar.gz: 3b0076b8aa40f912d5faea6d847f6cde656c2afbb44a13324c1b3c216f28ceeda79ae54487096d4253e95f9723384a7f9fb8e4bbdd48e65c53d038b335f76a67
|
data/djatoka.gemspec
CHANGED
data/lib/djatoka/iiif_request.rb
CHANGED
@@ -129,7 +129,7 @@ module Djatoka
|
|
129
129
|
region.scale( ["#{$1}", "0"] ) #w => w,0
|
130
130
|
when /^,(\d+)$/
|
131
131
|
region.scale( ["0", "#{$1}"] ) #h => 0,h
|
132
|
-
when /^pct:(\d
|
132
|
+
when /^pct:(\d*\.?\d*)$/i
|
133
133
|
dj_scale = $1.to_f / 100.0
|
134
134
|
region.scale(dj_scale.to_s)
|
135
135
|
when /^(\d+),(\d+)$/
|
data/test/test_iiif_request.rb
CHANGED
@@ -77,6 +77,9 @@ class TestDjatokaIiifRequest < Test::Unit::TestCase
|
|
77
77
|
|
78
78
|
reg = @req.size('pct:125').djatoka_region
|
79
79
|
assert_equal '1.25', reg.query.scale
|
80
|
+
|
81
|
+
reg = @req.size('pct:6.25').djatoka_region
|
82
|
+
assert_equal '0.0625', reg.query.scale
|
80
83
|
end
|
81
84
|
|
82
85
|
should 'set "w,h" requests to the correct scale value' do
|
@@ -94,7 +97,7 @@ class TestDjatokaIiifRequest < Test::Unit::TestCase
|
|
94
97
|
|
95
98
|
should 'raise an exception if the value cannot be parsed into a Float' do
|
96
99
|
assert_raise Djatoka::IiifInvalidParam do
|
97
|
-
@req.size('pct:0.
|
100
|
+
@req.size('pct:0.7.5').djatoka_region
|
98
101
|
end
|
99
102
|
end
|
100
103
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djatoka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Ronallo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project: djatoka
|
216
|
-
rubygems_version: 2.4.
|
216
|
+
rubygems_version: 2.4.2
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Djatoka image server helpers for Ruby and Rails.
|
@@ -233,3 +233,4 @@ test_files:
|
|
233
233
|
- test/test_region.rb
|
234
234
|
- test/test_resolver.rb
|
235
235
|
- test/test_view_helpers.rb
|
236
|
+
has_rdoc:
|