iiif_url 0.0.3 → 0.0.4

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: 43225514c49ca7ce15f1fbc143fe732cac5387d4
4
- data.tar.gz: 7bb04eb3e9796a25f89dfaad36661c716aa2dc15
3
+ metadata.gz: 3c81c70f9aca9c036e51b8f469c768fe7ee07a43
4
+ data.tar.gz: 048cf777800fed40f0ef8e78152b40ecae7b89c0
5
5
  SHA512:
6
- metadata.gz: e178d54bac884a32646cd6eb4a24f1d81935c13dd1813d8e26e1eaa35d2a1e86f0fedfc2701c44b5eb03ec71f95fe81a6159268ed2b2aad14adfd21701f50e5e
7
- data.tar.gz: 5d5ce9d4070584ff464cfcfe83b282c36973761bfe71e027895a1f7255485dcabae66511b66c420ab31c86256f1a41d82e6032c6c035b0323f416b20a20fa386
6
+ metadata.gz: fb3d08bef126d3203ce9a94431d3cc9f1dbdcd5497dde4d744e1c4840751787784d5a7469d6a5e654a8ade37ff33bc1fb4e2327ff252e443c03b601d79a34ea0
7
+ data.tar.gz: efc6eb6c4dec79f1514aed432841ca3349a9e20b65ea1dd4067fbe054d5641c283916531c4f52a3e0f9df85aff4a928642917f8f4fdf2eb0c2228f8c56289e0c
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in iiif_url.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem 'pry', require: true
8
+ end
data/lib/iiif_url.rb CHANGED
@@ -112,7 +112,11 @@ class IiifUrl
112
112
  size_string = url_parts.pop
113
113
  size = if size_string.include?(',')
114
114
  w, h = size_string.split(',')
115
- w = w.to_i if !w.nil?
115
+ w = if w.empty?
116
+ nil
117
+ else
118
+ w.to_i
119
+ end
116
120
  h = h.to_i if !h.nil?
117
121
  {w: w, h: h}
118
122
  elsif size_string.include?('pct')
@@ -1,3 +1,3 @@
1
1
  class IiifUrl
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iiif_url
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Ronallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-25 00:00:00.000000000 Z
11
+ date: 2016-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.8
122
+ rubygems_version: 2.5.1
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Create and parse IIIF Image API URLs