simplificator-rwebthumb 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rwebthumb/base.rb +4 -4
- metadata +3 -3
data/lib/rwebthumb/base.rb
CHANGED
|
@@ -35,18 +35,18 @@ module Simplificator
|
|
|
35
35
|
case response
|
|
36
36
|
when Net::HTTPOK :
|
|
37
37
|
case response.content_type.downcase
|
|
38
|
-
when 'text/xml'
|
|
39
|
-
when 'image/jpg', 'image/jpeg', 'image/png'
|
|
38
|
+
when 'text/xml' then REXML::Document.new(response.body)
|
|
39
|
+
when 'image/jpg', 'image/jpeg', 'image/png', 'archive/zip'
|
|
40
40
|
raise WebthumbException.new("No data returned though content type is #{response.content_type}") if response.body.length == 0
|
|
41
|
-
response.body
|
|
42
41
|
else
|
|
43
|
-
raise WebthumbException.new("
|
|
42
|
+
raise WebthumbException.new("Unsupported content type #{response.content_type}")
|
|
44
43
|
end
|
|
45
44
|
else
|
|
46
45
|
raise CommunicationException('Response code was not HTTP OK')
|
|
47
46
|
end
|
|
48
47
|
end
|
|
49
48
|
|
|
49
|
+
|
|
50
50
|
# builds the root node for webthumb requtes
|
|
51
51
|
def build_root_node()
|
|
52
52
|
root = REXML::Element.new('webthumb')
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 0.2.
|
|
8
|
+
- 10
|
|
9
|
+
version: 0.2.10
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Simplificator GmbH
|
|
@@ -18,7 +18,7 @@ date: 2008-09-03 00:00:00 +02:00
|
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies: []
|
|
20
20
|
|
|
21
|
-
description: rwebthumb provides a ruby interface for the webthumb.bluga.net
|
|
21
|
+
description: "rwebthumb provides a ruby interface for the webthumb.bluga.net. "
|
|
22
22
|
email: info@simplificator.com
|
|
23
23
|
executables: []
|
|
24
24
|
|