thumbnail 0.2.1 → 0.2.2

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.
@@ -22,13 +22,13 @@ module Thumbnail
22
22
  def self.build(xml)
23
23
  doc = Hpricot.XML(xml)
24
24
  results = []
25
- (doc/'//aws:thumbnailresponse'/'aws:response').each do |res|
25
+ (doc/'//aws:ThumbnailResponse'/'aws:Response').each do |res|
26
26
  result = {}
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)}
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/"requestid").inner_text
68
+ @parsed[:request_id] = (@hpricot/"RequestId").inner_text
69
69
  @parsed[:errors] = []
70
- (@hpricot/"errors").each do |e|
70
+ (@hpricot/"Errors").each do |e|
71
71
  error = {}
72
- error[:code] = (e/"code").inner_text
73
- error[:message] = (e/"message").inner_text
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
@@ -2,7 +2,7 @@ module Thumbnail #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -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.1</a>
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.1
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
- test_files: []
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
- extra_rdoc_files:
65
- - client_spec.txt
66
- - response_spec.txt
67
- - History.txt
68
- - License.txt
69
- - Manifest.txt
70
- - README.txt
71
- executables: []
72
-
73
- extensions: []
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
- dependencies:
78
- - !ruby/object:Gem::Dependency
79
- name: hpricot
80
- version_requirement:
81
- version_requirements: !ruby/object:Gem::Version::Requirement
82
- requirements:
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
+