djatoka 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/djatoka_url +1 -1
- data/lib/djatoka/common.rb +3 -2
- metadata +78 -33
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/bin/djatoka_url
CHANGED
data/lib/djatoka/common.rb
CHANGED
@@ -50,7 +50,7 @@ module Djatoka::Common
|
|
50
50
|
# try to compensate for any difference between the dwtLevels and djatoka levels
|
51
51
|
# so that we get a decent image returned.
|
52
52
|
def pick_best_level(metadata)
|
53
|
-
best_level = '
|
53
|
+
best_level = '10'
|
54
54
|
metadata_levels = metadata.all_levels
|
55
55
|
metadata_levels.keys.sort.reverse.each do |k|
|
56
56
|
if metadata_levels[k].height.to_i > query.scale.to_i and
|
@@ -89,7 +89,8 @@ module Djatoka::Common
|
|
89
89
|
# dwtLevels and the djatoka levels. So far the only case seen is where
|
90
90
|
# the dwtLevels are greater than the djatoka levels.
|
91
91
|
if metadata.dwt_levels.to_i > metadata.levels.to_i
|
92
|
-
|
92
|
+
difference = metadata.dwt_levels.to_i - metadata.levels.to_i
|
93
|
+
good_query_level = query.level.to_i + difference
|
93
94
|
# dwtLevels in the cases seen so far almost always match the djatoka levels.
|
94
95
|
elsif metadata.dwt_levels.to_i == metadata.levels.to_i
|
95
96
|
good_query_level = query.level.to_i
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djatoka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Jason Ronallo
|
@@ -9,69 +15,95 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-30 00:00:00 -04:00
|
13
19
|
default_executable: djatoka_url
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: shoulda
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: ruby-debug
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
33
46
|
version: "0"
|
34
|
-
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
35
49
|
- !ruby/object:Gem::Dependency
|
36
50
|
name: addressable
|
37
|
-
|
38
|
-
|
39
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
40
54
|
requirements:
|
41
55
|
- - "="
|
42
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 15
|
58
|
+
segments:
|
59
|
+
- 2
|
60
|
+
- 1
|
61
|
+
- 2
|
43
62
|
version: 2.1.2
|
44
|
-
|
63
|
+
type: :runtime
|
64
|
+
version_requirements: *id003
|
45
65
|
- !ruby/object:Gem::Dependency
|
46
66
|
name: json
|
47
|
-
|
48
|
-
|
49
|
-
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
50
70
|
requirements:
|
51
71
|
- - ">="
|
52
72
|
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
53
76
|
version: "0"
|
54
|
-
|
77
|
+
type: :runtime
|
78
|
+
version_requirements: *id004
|
55
79
|
- !ruby/object:Gem::Dependency
|
56
80
|
name: trollop
|
57
|
-
|
58
|
-
|
59
|
-
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
60
84
|
requirements:
|
61
85
|
- - ">="
|
62
86
|
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
63
90
|
version: "0"
|
64
|
-
|
91
|
+
type: :runtime
|
92
|
+
version_requirements: *id005
|
65
93
|
- !ruby/object:Gem::Dependency
|
66
94
|
name: hashie
|
67
|
-
|
68
|
-
|
69
|
-
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
70
98
|
requirements:
|
71
99
|
- - ">="
|
72
100
|
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
73
104
|
version: "0"
|
74
|
-
|
105
|
+
type: :runtime
|
106
|
+
version_requirements: *id006
|
75
107
|
description: The djatoka library provides some simple methods for creation of the OpenURLs needed to communicate with the Djatoka image server.
|
76
108
|
email: jronallo@gmail.com
|
77
109
|
executables:
|
@@ -107,6 +139,13 @@ files:
|
|
107
139
|
- lib/djatoka/region.rb
|
108
140
|
- lib/djatoka/resolver.rb
|
109
141
|
- lib/djatoka/view_helpers.rb
|
142
|
+
- test/test_common.rb
|
143
|
+
- test/test_region.rb
|
144
|
+
- test/helper.rb
|
145
|
+
- test/test_metadata.rb
|
146
|
+
- test/test_resolver.rb
|
147
|
+
- test/test_view_helpers.rb
|
148
|
+
- test/test_djatoka.rb
|
110
149
|
has_rdoc: true
|
111
150
|
homepage: http://github.com/jronallo/djatoka
|
112
151
|
licenses: []
|
@@ -117,29 +156,35 @@ rdoc_options:
|
|
117
156
|
require_paths:
|
118
157
|
- lib
|
119
158
|
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
none: false
|
120
160
|
requirements:
|
121
161
|
- - ">="
|
122
162
|
- !ruby/object:Gem::Version
|
163
|
+
hash: 3
|
164
|
+
segments:
|
165
|
+
- 0
|
123
166
|
version: "0"
|
124
|
-
version:
|
125
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
126
169
|
requirements:
|
127
170
|
- - ">="
|
128
171
|
- !ruby/object:Gem::Version
|
172
|
+
hash: 3
|
173
|
+
segments:
|
174
|
+
- 0
|
129
175
|
version: "0"
|
130
|
-
version:
|
131
176
|
requirements: []
|
132
177
|
|
133
178
|
rubyforge_project:
|
134
|
-
rubygems_version: 1.3.
|
179
|
+
rubygems_version: 1.3.7
|
135
180
|
signing_key:
|
136
181
|
specification_version: 3
|
137
182
|
summary: Djatoka image server helpers for Ruby and Rails.
|
138
183
|
test_files:
|
184
|
+
- test/test_common.rb
|
185
|
+
- test/test_region.rb
|
186
|
+
- test/helper.rb
|
139
187
|
- test/test_metadata.rb
|
140
|
-
- test/test_djatoka.rb
|
141
188
|
- test/test_resolver.rb
|
142
189
|
- test/test_view_helpers.rb
|
143
|
-
- test/
|
144
|
-
- test/helper.rb
|
145
|
-
- test/test_common.rb
|
190
|
+
- test/test_djatoka.rb
|