djatoka 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -43,6 +43,25 @@ module Djatoka
43
43
  end
44
44
  end
45
45
 
46
+ # FIXME DRY
47
+ def djatoka_top_left_square_image_tag(rft_id, params={})
48
+ resolver, region = setup_djatoka_image_tag(rft_id, params)
49
+ if resolver and region
50
+ image_tag(region.top_left_square.url, params) #+ debug(region)
51
+ else
52
+
53
+ end
54
+ end
55
+
56
+ def djatoka_bottom_right_square_image_tag(rft_id, params={})
57
+ resolver, region = setup_djatoka_image_tag(rft_id, params)
58
+ if resolver and region
59
+ image_tag(region.bottom_right_square.url, params) #+ debug(region)
60
+ else
61
+
62
+ end
63
+ end
64
+
46
65
  # Returns an image tag for an image exactly 75x75
47
66
  # djatoka_smallbox_image_tag('info:lanl-repo/ds/5aa182c2-c092-4596-af6e-e95d2e263de3')
48
67
  def djatoka_smallbox_image_tag(rft_id, params={})
@@ -30,7 +30,7 @@ context 'A Djatoka Resolver' do
30
30
  assert_equal '0,0,3372,3372', @region.top_left_square.query.region
31
31
  end
32
32
  should 'create a query for a right justified version of the image' do
33
- assert_equal '0,1750,3372,3372', @region.bottom_right_square.query.region
33
+ assert_equal '0,1748,3372,3372', @region.bottom_right_square.query.region
34
34
  end
35
35
  should 'return a uri for a square version of the image' do
36
36
  assert_equal '0,874,3372,3372', @region.square_uri.query_values['svc.region']
@@ -80,8 +80,6 @@ context 'A Djatoka Resolver' do
80
80
  end
81
81
  end
82
82
 
83
-
84
-
85
83
  end
86
84
 
87
85
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: djatoka
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Ronallo
@@ -167,13 +167,13 @@ files:
167
167
  - lib/djatoka/region.rb
168
168
  - lib/djatoka/resolver.rb
169
169
  - lib/djatoka/view_helpers.rb
170
- - test/test_common.rb
171
- - test/test_region.rb
172
- - test/helper.rb
173
170
  - test/test_metadata.rb
171
+ - test/test_djatoka.rb
174
172
  - test/test_resolver.rb
175
173
  - test/test_view_helpers.rb
176
- - test/test_djatoka.rb
174
+ - test/test_region.rb
175
+ - test/helper.rb
176
+ - test/test_common.rb
177
177
  has_rdoc: true
178
178
  homepage: http://github.com/jronallo/djatoka
179
179
  licenses: []
@@ -209,10 +209,10 @@ signing_key:
209
209
  specification_version: 3
210
210
  summary: Djatoka image server helpers for Ruby and Rails.
211
211
  test_files:
212
- - test/test_common.rb
213
- - test/test_region.rb
214
- - test/helper.rb
215
212
  - test/test_metadata.rb
213
+ - test/test_djatoka.rb
216
214
  - test/test_resolver.rb
217
215
  - test/test_view_helpers.rb
218
- - test/test_djatoka.rb
216
+ - test/test_region.rb
217
+ - test/helper.rb
218
+ - test/test_common.rb