vizjerai-google-checkout 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -27,6 +27,10 @@ begin
27
27
  s.description = "An experimental library for sending payment requests to Google Checkout."
28
28
  s.authors = ["Peter Elmore", "Geoffrey Grosenbach", "Matt Lins", "Steel Fu", "Andrew Assarattanakul"]
29
29
  s.files = FileList["[A-Z]*", "{lib,spec,support,examples}/**/*"]
30
+ s.add_dependency(%q<activesupport>, [">= 2.3.0"])
31
+ s.add_dependency(%q<money>, [">= 2.3.0"])
32
+ s.add_dependency(%q<nokogiri>, [">=0"])
33
+ s.add_dependency(%q<rspec>, ["~> 1.3.0"])
30
34
  end
31
35
  rescue LoadError
32
36
  puts "Jeweler not available. Install it with: sudo gem install jeweler"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.2.0
@@ -1,5 +1,5 @@
1
1
 
2
- class Hpricot::Elements
2
+ class Nokogiri::XML::NodeSet
3
3
 
4
4
  ##
5
5
  # Assume a Google standard money node with a currency attribute.
@@ -4,7 +4,7 @@ module GoogleCheckout
4
4
  attr_accessor :doc
5
5
 
6
6
  def self.parse(raw_xml)
7
- doc = Hpricot.XML(raw_xml)
7
+ doc = Nokogiri::XML(raw_xml)
8
8
  return new(doc)
9
9
  end
10
10
 
@@ -13,7 +13,7 @@ module GoogleCheckout
13
13
  end
14
14
 
15
15
  def address_id
16
- @doc.at('anonymous-address').attributes['id']
16
+ (@doc/"anonymous-address").attr('id').value
17
17
  end
18
18
 
19
19
  def method_missing(method_name, *args)
@@ -27,4 +27,4 @@ module GoogleCheckout
27
27
  end
28
28
 
29
29
  end
30
- end
30
+ end
@@ -13,13 +13,13 @@ module GoogleCheckout
13
13
  # do_something_with_new_order
14
14
  # end
15
15
  #
16
- # TODO Document field access and Hpricot object access.
16
+ # TODO Document field access and Nokogiri object access.
17
17
  #
18
18
  # For the details, see http://code.google.com/apis/checkout/developer/index.html
19
19
 
20
20
  class Notification
21
21
 
22
- # The Hpricot XML document received from Google.
22
+ # The Nokogiri XML document received from Google.
23
23
  attr_accessor :doc
24
24
 
25
25
  ##
@@ -29,7 +29,7 @@ module GoogleCheckout
29
29
  # the XML received.
30
30
 
31
31
  def self.parse(raw_xml)
32
- doc = Hpricot.XML(raw_xml)
32
+ doc = Nokogiri::XML(raw_xml)
33
33
 
34
34
  # Convert +request-received+ to +request_received+,
35
35
  # then to a +RequestReceived+ object of the proper class
@@ -119,13 +119,13 @@ module GoogleCheckout
119
119
  # notification.google_order_number
120
120
  # => Returns value of '<google-order-number>'
121
121
  #
122
- # Because of how Hpricot#at works, it will even dig into subtags
122
+ # Because of how Nokogiri#at works, it will even dig into subtags
123
123
  # and return the value of the first matching tag. For example,
124
124
  # there is an +email+ field in +buyer-shipping-address+ and also
125
125
  # in +buyer-billing-address+, but only the first will be returned.
126
126
  #
127
127
  # If you want to get at a value explicitly, use +notification.doc+
128
- # and search the Hpricot document manually.
128
+ # and search the Nokogiri document manually.
129
129
 
130
130
  def method_missing(method_name, *args)
131
131
  element_name = method_name.to_s.gsub(/_/, '-')
@@ -13,7 +13,7 @@ require 'active_support'
13
13
  require 'openssl'
14
14
  require 'base64'
15
15
  require 'builder/xmlmarkup'
16
- require 'hpricot'
16
+ require 'nokogiri'
17
17
  require 'money'
18
18
  require 'net/https'
19
19
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vizjerai-google-checkout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 4
10
- version: 0.1.4
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter Elmore
@@ -21,8 +21,69 @@ cert_chain: []
21
21
 
22
22
  date: 2011-02-11 00:00:00 -06:00
23
23
  default_executable:
24
- dependencies: []
25
-
24
+ dependencies:
25
+ - !ruby/object:Gem::Dependency
26
+ name: activesupport
27
+ prerelease: false
28
+ requirement: &id001 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ hash: 3
34
+ segments:
35
+ - 2
36
+ - 3
37
+ - 0
38
+ version: 2.3.0
39
+ type: :runtime
40
+ version_requirements: *id001
41
+ - !ruby/object:Gem::Dependency
42
+ name: money
43
+ prerelease: false
44
+ requirement: &id002 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ hash: 3
50
+ segments:
51
+ - 2
52
+ - 3
53
+ - 0
54
+ version: 2.3.0
55
+ type: :runtime
56
+ version_requirements: *id002
57
+ - !ruby/object:Gem::Dependency
58
+ name: nokogiri
59
+ prerelease: false
60
+ requirement: &id003 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ type: :runtime
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ hash: 27
80
+ segments:
81
+ - 1
82
+ - 3
83
+ - 0
84
+ version: 1.3.0
85
+ type: :runtime
86
+ version_requirements: *id004
26
87
  description: An experimental library for sending payment requests to Google Checkout.
27
88
  email: assarata@gmail.com
28
89
  executables: []