payone_connect 0.1.1 → 0.1.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -24,7 +24,7 @@ class PayoneConnect
24
24
  return nil if http_response.body.blank?
25
25
  response = {}
26
26
  http_response.body.split("\n").each do |param|
27
- key,value = param.split("=")
27
+ key,value = param.scan(/([^=]+)=(.+)/).first
28
28
  response[key.to_sym] = value
29
29
  end
30
30
  response
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{payone_connect}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Patrick Huesler"]
12
- s.date = %q{2009-10-04}
12
+ s.date = %q{2010-02-18}
13
13
  s.description = %q{Connects to the payone gateway and passes the parameters}
14
14
  s.email = %q{patrick.huesler@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -55,3 +55,4 @@ Gem::Specification.new do |s|
55
55
  s.add_dependency(%q<fakeweb>, [">= 0"])
56
56
  end
57
57
  end
58
+
@@ -45,10 +45,11 @@ describe PayoneConnect do
45
45
  end
46
46
  end
47
47
 
48
- describe "successfull request" do
48
+ describe "successful request" do
49
49
  before(:each) do
50
50
  FakeWeb.register_uri(:post, "https://testapi.pay1.de/post-gateway/", :body => "status=APPROVED\ntxid=18059493\nuserid=4923401")
51
51
  end
52
+
52
53
  it "should return the status" do
53
54
  @finance_gate_connection.request[:status].should == "APPROVED"
54
55
  end
@@ -62,6 +63,13 @@ describe PayoneConnect do
62
63
  end
63
64
  end
64
65
 
66
+ describe "response is redirect" do
67
+ it "should parse the redirect url correctly" do
68
+ FakeWeb.register_uri(:post, "https://testapi.pay1.de/post-gateway/", :body => "status=REDIRECT\ntxid=18059493\nuserid=4923401\nredirecturl=https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=ABC&useraction=commit")
69
+ @finance_gate_connection.request[:redirecturl].should == "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=ABC&useraction=commit"
70
+ end
71
+ end
72
+
65
73
  describe "authorization parameter assignment" do
66
74
  %w(aid reference currency amount clearingtype).each do |parameter|
67
75
  it "should set the #{parameter} parameter" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payone_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Huesler
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-04 00:00:00 +02:00
12
+ date: 2010-02-18 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency