thumbnail 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/thumbnail/response.rb +11 -11
- data/lib/thumbnail/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +54 -47
data/lib/thumbnail/response.rb
CHANGED
@@ -22,13 +22,13 @@ module Thumbnail
|
|
22
22
|
def self.build(xml)
|
23
23
|
doc = Hpricot.XML(xml)
|
24
24
|
results = []
|
25
|
-
(doc/'//aws:
|
25
|
+
(doc/'//aws:ThumbnailResponse'/'aws:Response').each do |res|
|
26
26
|
result = {}
|
27
|
-
result[:request_id] = cleanup(res.at('aws:
|
28
|
-
t = (res/'aws:
|
29
|
-
result[:thumbnail] = {:url => cleanup(t.at('aws:
|
30
|
-
:exists => (t.at('aws:
|
31
|
-
:request_url => cleanup(t.at('aws:
|
27
|
+
result[:request_id] = cleanup(res.at('aws:OperationRequest').inner_text)
|
28
|
+
t = (res/'aws:ThumbnailResult').first
|
29
|
+
result[:thumbnail] = {:url => cleanup(t.at('aws:Thumbnail').inner_text).gsub(/\&/, '&'),
|
30
|
+
:exists => (t.at('aws:Thumbnail').attributes["Exists"] == "true"),
|
31
|
+
:request_url => cleanup(t.at('aws:RequestUrl').inner_text)}
|
32
32
|
results << result
|
33
33
|
end
|
34
34
|
|
@@ -65,12 +65,12 @@ module Thumbnail
|
|
65
65
|
@hpricot = opts[:hpricot]
|
66
66
|
@xml = opts[:xml]
|
67
67
|
@parsed = {}
|
68
|
-
@parsed[:request_id] = (@hpricot/"
|
68
|
+
@parsed[:request_id] = (@hpricot/"RequestId").inner_text
|
69
69
|
@parsed[:errors] = []
|
70
|
-
(@hpricot/"
|
70
|
+
(@hpricot/"Errors").each do |e|
|
71
71
|
error = {}
|
72
|
-
error[:code] = (e/"
|
73
|
-
error[:message] = (e/"
|
72
|
+
error[:code] = (e/"Code").inner_text
|
73
|
+
error[:message] = (e/"Message").inner_text
|
74
74
|
@parsed[:errors] << error
|
75
75
|
end
|
76
76
|
end
|
@@ -86,4 +86,4 @@ module Thumbnail
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
end
|
89
|
+
end
|
data/lib/thumbnail/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
<img src="logo.png" id="logo">
|
33
33
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/thumbnail"; return false'>
|
34
34
|
<p>Get Version</p>
|
35
|
-
<a href="http://rubyforge.org/projects/thumbnail" class="numbers">0.2.
|
35
|
+
<a href="http://rubyforge.org/projects/thumbnail" class="numbers">0.2.2</a>
|
36
36
|
</div>
|
37
37
|
|
38
38
|
|
metadata
CHANGED
@@ -1,33 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.2
|
3
|
-
specification_version: 1
|
4
2
|
name: thumbnail
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-06-18 00:00:00 -07:00
|
8
|
-
summary: Wrapper for the Amazon Web Services Alexa Thumbnail Service REST API, which provides website thumbnail images on demand for a small fee ($0.20/1000)
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: greg@mfdz.com
|
12
|
-
homepage: http://thumbnail.rubyforge.org
|
13
|
-
rubyforge_project: thumbnail
|
14
|
-
description: Wrapper for the Amazon Web Services Alexa Thumbnail Service REST API, which provides website thumbnail images on demand for a small fee ($0.20/1000)
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.2.2
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Greg Borenstein
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-05-24 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hpricot
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0.5"
|
23
|
+
version:
|
24
|
+
description: Wrapper for the Amazon Web Services Alexa Thumbnail Service REST API, which provides website thumbnail images on demand for a small fee ($0.20/1000)
|
25
|
+
email: greg@mfdz.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- client_spec.txt
|
32
|
+
- response_spec.txt
|
33
|
+
- History.txt
|
34
|
+
- License.txt
|
35
|
+
- Manifest.txt
|
36
|
+
- README.txt
|
31
37
|
files:
|
32
38
|
- client_spec.txt
|
33
39
|
- response_spec.txt
|
@@ -56,31 +62,32 @@ files:
|
|
56
62
|
- website/logo.png
|
57
63
|
- website/small_crap.jpg
|
58
64
|
- website/soon.jpg
|
59
|
-
|
60
|
-
|
65
|
+
has_rdoc: true
|
66
|
+
homepage: http://thumbnail.rubyforge.org
|
67
|
+
post_install_message:
|
61
68
|
rdoc_options:
|
62
69
|
- --main
|
63
70
|
- README.txt
|
64
|
-
|
65
|
-
-
|
66
|
-
|
67
|
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: "0"
|
78
|
+
version:
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: "0"
|
84
|
+
version:
|
75
85
|
requirements: []
|
76
86
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: "0.5"
|
86
|
-
version:
|
87
|
+
rubyforge_project: thumbnail
|
88
|
+
rubygems_version: 1.1.0
|
89
|
+
signing_key:
|
90
|
+
specification_version: 2
|
91
|
+
summary: Wrapper for the Amazon Web Services Alexa Thumbnail Service REST API, which provides website thumbnail images on demand for a small fee ($0.20/1000)
|
92
|
+
test_files: []
|
93
|
+
|