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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59e0ba03ce37604d72aa86517019131b632c8f0e
4
- data.tar.gz: 52d429c2b801b25bb36b5b6e6af66349de3d785a
3
+ metadata.gz: b10e171c15f72747a80d62a9b1d0d5bac5e2d2a8
4
+ data.tar.gz: 982a67a18a63f1650315f7e122428b76547226a9
5
5
  SHA512:
6
- metadata.gz: 0077434610f5f51e42ab590357cb321c86c666d78767c6da56b2d0e41b8bf27decf56df4afc6ef64da24c4e7066f483bf0883f49a64c56d08ad1f9b27defb6f1
7
- data.tar.gz: feab7d2d08dc2a8870a3054b802d14345a934715268426c9cdfeb80749c6d9ec40e1db833f6c0b79b6352af12c9cba948b7dd8cb028d6ea5a3950ffa042f7d6a
6
+ metadata.gz: eb2062b25b58e8f7818d98d27c2027b9acd22ce4df6cc88fa5d3d1c48c2ed5f9b699b47a60b32b8673bf3207c3da30cdd228dd7e8e9b0de045e29c05c72a43e4
7
+ data.tar.gz: 3b0076b8aa40f912d5faea6d847f6cde656c2afbb44a13324c1b3c216f28ceeda79ae54487096d4253e95f9723384a7f9fb8e4bbdd48e65c53d038b335f76a67
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{djatoka}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
  s.authors = ["Jason Ronallo", "Willy Mene"]
10
10
  s.email = %q{jronallo@gmail.com wmene@stanford.edu}
11
11
  s.homepage = %q{http://github.com/jronallo/djatoka}
@@ -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+)$/i
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+)$/
@@ -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.75').djatoka_region
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.1
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-01-21 00:00:00.000000000 Z
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.5
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: