pagseguro 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,6 +4,13 @@ gem "rails", "3.0.1"
4
4
  gem "fakeweb"
5
5
  gem "rspec-rails", "2.0.1"
6
6
  gem "faker"
7
- gem "ruby-debug19", :require => false
8
7
  gem "nokogiri"
9
8
  gem "sqlite3-ruby"
9
+
10
+ platforms :mri_19 do
11
+ gem "ruby-debug19", :require => "ruby-debug"
12
+ end
13
+
14
+ platforms :mri_18 do
15
+ gem "ruby-debug"
16
+ end
data/Gemfile.lock CHANGED
@@ -39,6 +39,7 @@ GEM
39
39
  faker (0.3.1)
40
40
  fakeweb (1.3.0)
41
41
  i18n (0.4.1)
42
+ linecache (0.43)
42
43
  linecache19 (0.5.11)
43
44
  ruby_core_source (>= 0.1.4)
44
45
  mail (2.2.7)
@@ -79,6 +80,11 @@ GEM
79
80
  rspec-expectations (= 2.0.0)
80
81
  rspec-rails (2.0.1)
81
82
  rspec (~> 2.0.0)
83
+ ruby-debug (0.10.3)
84
+ columnize (>= 0.1)
85
+ ruby-debug-base (~> 0.10.3.0)
86
+ ruby-debug-base (0.10.3)
87
+ linecache (>= 0.3)
82
88
  ruby-debug-base19 (0.11.24)
83
89
  columnize (>= 0.3.1)
84
90
  linecache19 (>= 0.5.11)
@@ -104,5 +110,6 @@ DEPENDENCIES
104
110
  nokogiri
105
111
  rails (= 3.0.1)
106
112
  rspec-rails (= 2.0.1)
113
+ ruby-debug
107
114
  ruby-debug19
108
115
  sqlite3-ruby
@@ -89,9 +89,18 @@ module PagSeguro
89
89
  # Set note
90
90
  order["Anotacao"] = ENV["NOTE"].to_s
91
91
 
92
+ # Retrieve index
93
+ index = proc do |hash, value|
94
+ if hash.respond_to?(:key)
95
+ hash.key(value)
96
+ else
97
+ hash.index(value)
98
+ end
99
+ end
100
+
92
101
  # Set payment method and status
93
- order["TipoPagamento"] = PagSeguro::Notification::PAYMENT_METHOD.key(payment_method)
94
- order["StatusTransacao"] = PagSeguro::Notification::STATUS.key(status)
102
+ order["TipoPagamento"] = index[PagSeguro::Notification::PAYMENT_METHOD, payment_method]
103
+ order["StatusTransacao"] = index[PagSeguro::Notification::STATUS, status]
95
104
 
96
105
  # Finally, ping the configured return URL
97
106
  uri = URI.parse File.join(PagSeguro.config["base"], PagSeguro.config["return_to"])
@@ -2,7 +2,7 @@ module PagSeguro
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
data/pagseguro.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pagseguro}
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 = ["Nando Vieira"]
@@ -53,3 +53,47 @@ Completed 302 Found in 2ms
53
53
  Parameters: {"ref_transacao"=>"I1001"}
54
54
  Redirected to http://test.host/invoices/confirmation
55
55
  Completed 302 Found in 1ms
56
+ Processing by PagSeguro::DeveloperController#create as HTML
57
+ Redirected to http://test.host/invoices/confirmation
58
+ Completed 302 Found in 2ms
59
+ Processing by PagSeguro::DeveloperController#create as HTML
60
+ Parameters: {"email_cobranca"=>"john@doe.com", "ref_transacao"=>"I1001"}
61
+ Redirected to http://test.host/invoices/confirmation
62
+ Completed 302 Found in 2ms
63
+ Processing by PagSeguro::DeveloperController#create as HTML
64
+ Parameters: {"ref_transacao"=>"I1001"}
65
+ Redirected to http://test.host/invoices/confirmation
66
+ Completed 302 Found in 1ms
67
+ Processing by PagSeguro::DeveloperController#create as HTML
68
+ Redirected to http://test.host/invoices/confirmation
69
+ Completed 302 Found in 2ms
70
+ Processing by PagSeguro::DeveloperController#create as HTML
71
+ Parameters: {"email_cobranca"=>"john@doe.com", "ref_transacao"=>"I1001"}
72
+ Redirected to http://test.host/invoices/confirmation
73
+ Completed 302 Found in 1ms
74
+ Processing by PagSeguro::DeveloperController#create as HTML
75
+ Parameters: {"ref_transacao"=>"I1001"}
76
+ Redirected to http://test.host/invoices/confirmation
77
+ Completed 302 Found in 2ms
78
+ Processing by PagSeguro::DeveloperController#create as HTML
79
+ Redirected to http://test.host/invoices/confirmation
80
+ Completed 302 Found in 2ms
81
+ Processing by PagSeguro::DeveloperController#create as HTML
82
+ Parameters: {"ref_transacao"=>"I1001", "email_cobranca"=>"john@doe.com"}
83
+ Redirected to http://test.host/invoices/confirmation
84
+ Completed 302 Found in 2ms
85
+ Processing by PagSeguro::DeveloperController#create as HTML
86
+ Parameters: {"ref_transacao"=>"I1001"}
87
+ Redirected to http://test.host/invoices/confirmation
88
+ Completed 302 Found in 1ms
89
+ Processing by PagSeguro::DeveloperController#create as HTML
90
+ Redirected to http://test.host/invoices/confirmation
91
+ Completed 302 Found in 2ms
92
+ Processing by PagSeguro::DeveloperController#create as HTML
93
+ Parameters: {"ref_transacao"=>"I1001", "email_cobranca"=>"john@doe.com"}
94
+ Redirected to http://test.host/invoices/confirmation
95
+ Completed 302 Found in 2ms
96
+ Processing by PagSeguro::DeveloperController#create as HTML
97
+ Parameters: {"ref_transacao"=>"I1001"}
98
+ Redirected to http://test.host/invoices/confirmation
99
+ Completed 302 Found in 2ms
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagseguro
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 31
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 1
9
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Nando Vieira
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 15
28
30
  segments:
29
31
  - 2
30
32
  - 0
@@ -95,6 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
97
  requirements:
96
98
  - - ">="
97
99
  - !ruby/object:Gem::Version
100
+ hash: 3
98
101
  segments:
99
102
  - 0
100
103
  version: "0"
@@ -103,6 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
106
  requirements:
104
107
  - - ">="
105
108
  - !ruby/object:Gem::Version
109
+ hash: 3
106
110
  segments:
107
111
  - 0
108
112
  version: "0"