djatoka 0.4.0 → 0.4.1

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: 54f7a843ae143b4d2f5aade72d9b56ee09c2c045
4
- data.tar.gz: 5ee17e4138e0922c4bdfb4358382bc31e56ac70e
3
+ metadata.gz: 718756bcc75c71c536d3f053f877845a439eca5b
4
+ data.tar.gz: f52391cdd94ccbfe04598d2c2bac156726114117
5
5
  SHA512:
6
- metadata.gz: 4e625b0f1180dc75c17412359799130f6e79664f2e8ee2ac7d20dfe924695b4c109e7882402e69b13ee79b95834797a3eec119ad4fce5b5dbfa0b4df8a3c5673
7
- data.tar.gz: a53814884c76dc41b74b74ed260ce9f6b1893c76a9edbe125da03b62813c37c7dd2ffd5a3c82f0b5a4314b9e8accdded89b4c1130607299fe7e165b55110f279
6
+ metadata.gz: 8cd3a74152a741862746270a28d195377709d3128d432ce749d402b4881e5583857b7b59efd51095d05596031a8dd16b714bc98b6e351b4b135cb945b59c658a
7
+ data.tar.gz: 468f3d35dd1782a6f543250971f6477371a475e135ff3204050cd8e1afd73d581610d98bb8a815e04d159f267dfe95093405845d91d2b24114a5392c049d3a44
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{djatoka}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
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}
@@ -133,7 +133,8 @@ class Djatoka::Metadata
133
133
  tiles["height"] = opts.tile_height.to_i
134
134
  end
135
135
  unless tiles.empty?
136
- tiles["scaleFactors"] = levels_as_i
136
+ tiles["scaleFactors"] = scale_factors
137
+
137
138
  info.tiles = [tiles]
138
139
  end
139
140
 
@@ -160,4 +161,9 @@ class Djatoka::Metadata
160
161
  all_levels.keys.map{ |l| l.to_i}.sort.reject{|l| l == 0}
161
162
  end
162
163
 
164
+ def scale_factors
165
+ levels_as_i.map do |i|
166
+ 2**(i - 1)
167
+ end
168
+ end
163
169
  end
@@ -125,7 +125,7 @@ class TestDjatokaMetadata < Test::Unit::TestCase
125
125
  {
126
126
  "width": 512,
127
127
  "height": 512,
128
- "scaleFactors": [1, 2, 3, 4, 5, 6]
128
+ "scaleFactors": [1, 2, 4, 8, 16, 32]
129
129
  }
130
130
  ],
131
131
  "sizes": [
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.4.0
4
+ version: 0.4.1
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-10-06 00:00:00.000000000 Z
12
+ date: 2015-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project: djatoka
229
- rubygems_version: 2.4.8
229
+ rubygems_version: 2.4.5.1
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Djatoka image server helpers for Ruby and Rails.