better-mundipagg 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d600948fbf6aea445bdc97e6c778121c6a801f67
4
- data.tar.gz: 919e6719c2ee7a5afb70dce46f673f63449c45f2
3
+ metadata.gz: ba13bebb3ce4d3ce8c35075014ae706f4a749573
4
+ data.tar.gz: 7e150574131173f10d80272af10275c66767767c
5
5
  SHA512:
6
- metadata.gz: d90d23b1bb909f8df283fb9bb5c243cc287b202c6f66d23c43be7104f3d71fbc82ce6cf2194e02b509253a94c7a3352994b7438be2aabbad3e7d7d2c8d79c566
7
- data.tar.gz: 14189e71b5256f141fdfcb19fca2d7109354a220c4d10d4268cb6fa71037c5277d986111f3280d3894ceaeba8f9c74324c0d2bbf6b9b5a1573a2a63efcdce583
6
+ metadata.gz: 3f836d052ec8f2ed3f5908b13d926b1c7d181383adba2c8b5665a60771540e02fa930b3de0e6b5bb1698b7aab8af64b35589ebdbc1d777940de8c94b6d68a7c4
7
+ data.tar.gz: c793c6bf8b9fb24d00cb4ea92b95c409642a3428dfdfa1a7c5f65d249720dfb019fe154d956325b94727280c7c53aae6553e5ab5a46654e62882a71e5a776797
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- better-mundipagg (0.1.3)
4
+ better-mundipagg (0.1.4)
5
5
  activemerchant
6
6
  activemodel
7
7
  savon
@@ -9,22 +9,22 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemerchant (1.47.0)
12
+ activemerchant (1.48.0)
13
13
  activesupport (>= 3.2.14, < 5.0.0)
14
14
  builder (>= 2.1.2, < 4.0.0)
15
15
  i18n (>= 0.6.9)
16
16
  nokogiri (~> 1.4)
17
- activemodel (4.2.0)
18
- activesupport (= 4.2.0)
17
+ activemodel (4.2.1)
18
+ activesupport (= 4.2.1)
19
19
  builder (~> 3.1)
20
- activesupport (4.2.0)
20
+ activesupport (4.2.1)
21
21
  i18n (~> 0.7)
22
22
  json (~> 1.7, >= 1.7.7)
23
23
  minitest (~> 5.1)
24
24
  thread_safe (~> 0.3, >= 0.3.4)
25
25
  tzinfo (~> 1.1)
26
- addressable (2.3.6)
27
- akami (1.2.2)
26
+ addressable (2.3.8)
27
+ akami (1.3.0)
28
28
  gyoku (>= 0.4.0)
29
29
  nokogiri
30
30
  builder (3.2.2)
@@ -32,20 +32,20 @@ GEM
32
32
  safe_yaml (~> 1.0.0)
33
33
  diff-lcs (1.2.5)
34
34
  docile (1.1.5)
35
- gyoku (1.2.2)
35
+ gyoku (1.3.1)
36
36
  builder (>= 2.1.2)
37
- httpi (2.3.0)
37
+ httpi (2.4.0)
38
38
  rack
39
39
  i18n (0.7.0)
40
40
  json (1.8.2)
41
41
  macaddr (1.7.1)
42
42
  systemu (~> 2.6.2)
43
43
  mini_portile (0.6.2)
44
- minitest (5.5.1)
45
- multi_json (1.10.1)
44
+ minitest (5.6.0)
45
+ multi_json (1.11.0)
46
46
  nokogiri (1.6.6.2)
47
47
  mini_portile (~> 0.6.0)
48
- nori (2.4.0)
48
+ nori (2.5.0)
49
49
  rack (1.6.0)
50
50
  rspec (3.1.0)
51
51
  rspec-core (~> 3.1.0)
@@ -60,7 +60,7 @@ GEM
60
60
  rspec-support (~> 3.1.0)
61
61
  rspec-support (3.1.2)
62
62
  safe_yaml (1.0.4)
63
- savon (2.10.0)
63
+ savon (2.11.0)
64
64
  akami (~> 1.2)
65
65
  builder (>= 2.1.2)
66
66
  gyoku (~> 1.2)
@@ -69,22 +69,22 @@ GEM
69
69
  nori (~> 2.4)
70
70
  uuid (~> 2.3.7)
71
71
  wasabi (~> 3.4)
72
- simplecov (0.9.1)
72
+ simplecov (0.9.2)
73
73
  docile (~> 1.1.0)
74
74
  multi_json (~> 1.0)
75
- simplecov-html (~> 0.8.0)
76
- simplecov-html (0.8.0)
77
- systemu (2.6.4)
78
- thread_safe (0.3.4)
75
+ simplecov-html (~> 0.9.0)
76
+ simplecov-html (0.9.0)
77
+ systemu (2.6.5)
78
+ thread_safe (0.3.5)
79
79
  tzinfo (1.2.2)
80
80
  thread_safe (~> 0.1)
81
81
  uuid (2.3.7)
82
82
  macaddr (~> 1.0)
83
83
  vcr (2.9.3)
84
- wasabi (3.4.0)
84
+ wasabi (3.5.0)
85
85
  httpi (~> 2.0)
86
86
  nokogiri (>= 1.4.2)
87
- webmock (1.20.4)
87
+ webmock (1.21.0)
88
88
  addressable (>= 2.3.6)
89
89
  crack (>= 0.3.2)
90
90
 
@@ -5,8 +5,11 @@ module Mundipagg
5
5
  def brand_name
6
6
  return "" if !brand.present?
7
7
 
8
- if brand == "master"
8
+ case brand
9
+ when "master"
9
10
  "Mastercard"
11
+ when "american_express"
12
+ "Amex"
10
13
  else
11
14
  brand.capitalize
12
15
  end
@@ -1,3 +1,3 @@
1
1
  module Mundipagg
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -6,19 +6,16 @@ RSpec.describe Mundipagg::CreditCard do
6
6
  let(:credit_card) { described_class.new brand: brand }
7
7
  subject { credit_card.brand_name }
8
8
 
9
- context "when brand is master" do
10
- let(:brand) { "master" }
11
- it { is_expected.to eq "Mastercard" }
12
- end
13
-
14
- context "when brand is visa" do
15
- let(:brand) { "visa" }
16
- it { is_expected.to eq "Visa" }
17
- end
18
-
19
- context "when brand is nil" do
20
- let(:brand) { nil }
21
- it { is_expected.to eq "" }
9
+ [
10
+ ["master", "Mastercard"],
11
+ ["american_express", "Amex"],
12
+ ["visa", "Visa"],
13
+ [nil, ""]
14
+ ].each do |(input, output)|
15
+ context "when brand is #{input}" do
16
+ let(:brand) { input }
17
+ it { is_expected.to eq output }
18
+ end
22
19
  end
23
20
  end
24
21
 
@@ -92,8 +89,12 @@ RSpec.describe Mundipagg::CreditCard::Response do
92
89
  {
93
90
  create_order_response: {
94
91
  create_order_result: {
95
- acquirer_message: "Rede|Out of Money",
96
- acquirer_return_code: "E666"
92
+ credit_card_transaction_result_collection: {
93
+ credit_card_transaction_result: {
94
+ acquirer_message: "Rede|Out of Money",
95
+ acquirer_return_code: "E666"
96
+ }
97
+ }
97
98
  }
98
99
  }
99
100
  }
@@ -103,8 +104,12 @@ RSpec.describe Mundipagg::CreditCard::Response do
103
104
  describe "#payload" do
104
105
  it do
105
106
  expect(response.payload).to eq({
106
- acquirer_message: "Rede|Out of Money",
107
- acquirer_return_code: "E666"
107
+ credit_card_transaction_result_collection: {
108
+ credit_card_transaction_result: {
109
+ acquirer_message: "Rede|Out of Money",
110
+ acquirer_return_code: "E666"
111
+ }
112
+ }
108
113
  })
109
114
  end
110
115
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better-mundipagg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Azisaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.2.2
170
+ rubygems_version: 2.4.6
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Mundipagg Integration