realex 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,3 @@
1
1
  pkg/*
2
+ .rvmrc
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source :rubygems
2
+ gem 'nokogiri'
3
+ gem 'builder'
4
+
5
+ group :development do
6
+ gem 'jeweler'
7
+ end
8
+
9
+ group :test do
10
+ gem 'rspec'
11
+ end
data/Rakefile CHANGED
@@ -25,9 +25,8 @@ begin
25
25
  gemspec.email = "paul@rslw.com"
26
26
  gemspec.homepage = "http://github.com/paulca/realex"
27
27
  gemspec.authors = ["Paul Campbell"]
28
- gemspec.version = "0.2.3"
29
- gemspec.add_dependency 'hpricot', '0.6.164'
30
- gemspec.add_dependency 'rio'
28
+ gemspec.version = "0.3.0"
29
+ gemspec.add_dependency 'nokogiri', '1.4.1'
31
30
  end
32
31
  rescue LoadError
33
32
  puts "Jeweler not available. Install it with: gem install jeweler"
@@ -22,7 +22,7 @@ module RealEx
22
22
  h = Net::HTTP.new('epage.payandshop.com', 443)
23
23
  h.use_ssl = true
24
24
  response = h.request_post(url, xml)
25
- result = Hpricot.XML(response.body)
25
+ result = Nokogiri.XML(response.body)
26
26
  result
27
27
  end
28
28
 
@@ -10,7 +10,7 @@ module RealEx
10
10
  attributes :timestamp, :result, :message, :orderid, :merchantid, :account, :cvnresult, :avspostcoderesponse, :pasref, :timetaken, :authtimetaken, :batchid, :avsaddressresponse, :cardissuer
11
11
 
12
12
  def self.new_from_xml(xml)
13
- parsed_xml = xml.kind_of?(String) ? Hpricot.XML(xml) : xml
13
+ parsed_xml = xml.kind_of?(String) ? Nokogiri.XML(xml) : xml
14
14
  r = new
15
15
  r.timestamp = (parsed_xml).at('response')['timestamp'] if (parsed_xml).at('response')
16
16
  r.result = (parsed_xml).at('result').inner_html if (parsed_xml).at('result')
data/lib/realex.rb CHANGED
@@ -1,6 +1,5 @@
1
- require 'rio'
2
1
  require 'digest/sha1'
3
- require 'hpricot'
2
+ require 'nokogiri'
4
3
  require 'net/https'
5
4
  require 'builder'
6
5
 
data/realex.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{realex}
8
- s.version = "0.2.3"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  ".gitignore",
20
+ "Gemfile",
20
21
  "README.md",
21
22
  "Rakefile",
22
23
  "lib/real_ex/address.rb",
@@ -42,7 +43,7 @@ Gem::Specification.new do |s|
42
43
  s.homepage = %q{http://github.com/paulca/realex}
43
44
  s.rdoc_options = ["--charset=UTF-8"]
44
45
  s.require_paths = ["lib"]
45
- s.rubygems_version = %q{1.3.6}
46
+ s.rubygems_version = %q{1.3.7}
46
47
  s.summary = %q{Ruby interface to http://realexpayments.com}
47
48
  s.test_files = [
48
49
  "spec/address_spec.rb",
@@ -59,16 +60,13 @@ Gem::Specification.new do |s|
59
60
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
60
61
  s.specification_version = 3
61
62
 
62
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
63
- s.add_runtime_dependency(%q<hpricot>, ["= 0.6.164"])
64
- s.add_runtime_dependency(%q<rio>, [">= 0"])
63
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
64
+ s.add_runtime_dependency(%q<nokogiri>, ["= 1.4.1"])
65
65
  else
66
- s.add_dependency(%q<hpricot>, ["= 0.6.164"])
67
- s.add_dependency(%q<rio>, [">= 0"])
66
+ s.add_dependency(%q<nokogiri>, ["= 1.4.1"])
68
67
  end
69
68
  else
70
- s.add_dependency(%q<hpricot>, ["= 0.6.164"])
71
- s.add_dependency(%q<rio>, [">= 0"])
69
+ s.add_dependency(%q<nokogiri>, ["= 1.4.1"])
72
70
  end
73
71
  end
74
72
 
@@ -51,7 +51,7 @@ describe "RealEx::Transaction" do
51
51
  describe "actually going through" do
52
52
 
53
53
  it "should parse the response" do
54
- RealEx::Client.should_receive(:call).and_return(Hpricot.XML('yay'))
54
+ RealEx::Client.should_receive(:call).and_return(Nokogiri.XML('yay'))
55
55
  @transaction.authorize!
56
56
  end
57
57
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: realex
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 2
8
8
  - 3
9
- version: 0.2.3
9
+ - 0
10
+ version: 0.3.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Paul Campbell
@@ -18,31 +19,21 @@ date: 2010-07-03 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: hpricot
22
+ name: nokogiri
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 5
27
30
  segments:
28
- - 0
29
- - 6
30
- - 164
31
- version: 0.6.164
31
+ - 1
32
+ - 4
33
+ - 1
34
+ version: 1.4.1
32
35
  type: :runtime
33
36
  version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rio
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
44
- type: :runtime
45
- version_requirements: *id002
46
37
  description: A Ruby library to make use of the payments API at http://realexpayments.com
47
38
  email: paul@rslw.com
48
39
  executables: []
@@ -53,6 +44,7 @@ extra_rdoc_files:
53
44
  - README.md
54
45
  files:
55
46
  - .gitignore
47
+ - Gemfile
56
48
  - README.md
57
49
  - Rakefile
58
50
  - lib/real_ex/address.rb
@@ -84,23 +76,27 @@ rdoc_options:
84
76
  require_paths:
85
77
  - lib
86
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
87
80
  requirements:
88
81
  - - ">="
89
82
  - !ruby/object:Gem::Version
83
+ hash: 3
90
84
  segments:
91
85
  - 0
92
86
  version: "0"
93
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
94
89
  requirements:
95
90
  - - ">="
96
91
  - !ruby/object:Gem::Version
92
+ hash: 3
97
93
  segments:
98
94
  - 0
99
95
  version: "0"
100
96
  requirements: []
101
97
 
102
98
  rubyforge_project:
103
- rubygems_version: 1.3.6
99
+ rubygems_version: 1.3.7
104
100
  signing_key:
105
101
  specification_version: 3
106
102
  summary: Ruby interface to http://realexpayments.com