pagseguro-transparente 0.0.7 → 0.0.8

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: 70b0e2daf26a776a73e02683c724ec9e8b2e5c83
4
- data.tar.gz: 845aeec8e3519f8f985fb92f149b0ea2e9a1f380
3
+ metadata.gz: 56cb345492cfbf7bfbafbd61141e320bd82bcd41
4
+ data.tar.gz: 19608f25ce36096fd263b28c10321e48ecc3fb1d
5
5
  SHA512:
6
- metadata.gz: 58b7590c729e9bbd9d32d3682fd61e4fd4dab679555037f7db7463f1c67262236e328fb2328aa57c391d217d4ae840f68794aa2450ebeaa8aa854e80d7811891
7
- data.tar.gz: f0d908ea08fc7742451300fa1619dfc2c3b23312d4a7a4271027489b4d65db646d28fadc69d70203ccba4f8c6d78b647c202d993fd2d0db0b2afe86161ccc0d7
6
+ metadata.gz: 8ca4121375804083da78beb896ac4d7012ad4a3b49447a838bd47e94bdd2ebb538ec3a81799c29f57c8d0e875872446c888262c8296f496e034f8d2c1ee5c83d
7
+ data.tar.gz: b48bd7d4f4fc9df146fbfdb2e45a453f6bdccfbfb072093bfb7955fd321aa70d800436c9282c6f9ef8446f4eeea2a5583482871fd7cf8a1429c68d40e5a57f63
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pagseguro-transparente (0.0.6)
5
- activemodel (~> 4.1)
4
+ pagseguro-transparente (0.0.7)
5
+ activemodel
6
6
  httparty (~> 0.13)
7
7
  i18n (~> 0.6)
8
8
  json (~> 1.8)
@@ -21,7 +21,6 @@ GEM
21
21
  thread_safe (~> 0.1)
22
22
  tzinfo (~> 1.1)
23
23
  addressable (2.3.6)
24
- atomic (1.1.16)
25
24
  builder (3.2.2)
26
25
  coveralls (0.7.0)
27
26
  multi_json (~> 1.3)
@@ -67,8 +66,7 @@ GEM
67
66
  term-ansicolor (1.3.0)
68
67
  tins (~> 1.0)
69
68
  thor (0.19.1)
70
- thread_safe (0.2.0)
71
- atomic (>= 1.1.7, < 2)
69
+ thread_safe (0.3.3)
72
70
  tins (1.3.0)
73
71
  tzinfo (1.1.0)
74
72
  thread_safe (~> 0.1)
data/lib/pagseguro.rb CHANGED
@@ -25,7 +25,6 @@ require "pagseguro/holder"
25
25
  require "pagseguro/address"
26
26
  require "pagseguro/shipping"
27
27
  require "pagseguro/installment"
28
- require "pagseguro/exceptions"
29
28
 
30
29
  I18n.enforce_available_locales = false
31
30
  I18n.load_path += ['locale/pt-BR.yml']
@@ -9,8 +9,6 @@ module PagSeguro
9
9
  end
10
10
 
11
11
  def to_params
12
- raise InvalidTransaction, payment.errors.messages unless payment.valid?
13
-
14
12
  params[:email] = PagSeguro.email
15
13
  params[:token] = PagSeguro.token
16
14
 
@@ -46,7 +44,6 @@ module PagSeguro
46
44
 
47
45
  def serialize_shipping(shipping)
48
46
  return unless shipping
49
- raise InvalidShipping, shipping.errors.messages unless shipping.valid?
50
47
 
51
48
  params[:shippingType] = shipping.type_id
52
49
  params[:shippingCost] = to_amount(shipping.cost)
@@ -56,7 +53,6 @@ module PagSeguro
56
53
 
57
54
  def serialize_item(item, index)
58
55
  return unless item
59
- raise InvalidItem, item.errors.messages unless item.valid?
60
56
 
61
57
  params["itemId#{index}".to_sym] = item.id
62
58
  params["itemDescription#{index}".to_sym] = item.description
@@ -66,7 +62,6 @@ module PagSeguro
66
62
 
67
63
  def serialize_sender(sender)
68
64
  return unless sender
69
- raise InvalidSender, sender.errors.messages unless sender.valid?
70
65
 
71
66
  params[:senderName] = sender.name
72
67
  params[:senderCPF] = sender.document.value
@@ -78,7 +73,6 @@ module PagSeguro
78
73
 
79
74
  def serialize_phone(phone)
80
75
  return unless phone
81
- raise InvalidPhone, phone.errors.messages unless phone.valid?
82
76
 
83
77
  params[:senderAreaCode] = phone.area_code
84
78
  params[:senderPhone] = phone.number
@@ -86,14 +80,12 @@ module PagSeguro
86
80
 
87
81
  def serialize_bank(bank)
88
82
  return unless bank
89
- raise InvalidBank, bank.errors.messages unless bank.valid?
90
83
 
91
84
  params[:bankName] = bank.name
92
85
  end
93
86
 
94
87
  def serialize_credit_card(credit_card)
95
88
  return unless credit_card
96
- raise InvalidCreditCard, credit_card.errors.messages unless credit_card.valid?
97
89
 
98
90
  params[:creditCardToken] = credit_card.token
99
91
 
@@ -105,7 +97,6 @@ module PagSeguro
105
97
 
106
98
  def serialize_installment(installment)
107
99
  return unless installment
108
- raise InvalidInstallment, installment.errors.messages unless installment.valid?
109
100
 
110
101
  params[:installmentQuantity] = installment.quantity
111
102
  params[:installmentValue] = to_amount(installment.value)
@@ -113,7 +104,6 @@ module PagSeguro
113
104
 
114
105
  def serialize_holder(holder)
115
106
  return unless holder
116
- raise InvalidHolder, holder.errors.messages unless holder.valid?
117
107
 
118
108
  params[:creditCardHolderName] = holder.name
119
109
  params[:creditCardHolderCPF] = holder.document.value
@@ -124,7 +114,6 @@ module PagSeguro
124
114
 
125
115
  def serialize_address_shipping(address)
126
116
  return unless address
127
- raise InvalidAddress, address.errors.messages unless address.valid?
128
117
 
129
118
  params[:shippingAddressCountry] = address.country
130
119
  params[:shippingAddressState] = address.state
@@ -138,7 +127,6 @@ module PagSeguro
138
127
 
139
128
  def serialize_address(address)
140
129
  return unless address
141
- raise InvalidAddress, address.errors.messages unless address.valid?
142
130
 
143
131
  params[:billingAddressCountry] = address.country
144
132
  params[:billingAddressState] = address.state
@@ -1,3 +1,3 @@
1
1
  module PagSeguro
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "activemodel", '~> 4.1'
20
+ spec.add_dependency "activemodel"
21
21
  spec.add_dependency "httparty", '~> 0.13'
22
22
  spec.add_dependency "nokogiri", '~> 1.6'
23
23
  spec.add_dependency "json", '~> 1.8'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagseguro-transparente
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirdes Henrique
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-19 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +199,6 @@ files:
199
199
  - lib/pagseguro/bank.rb
200
200
  - lib/pagseguro/credit_card.rb
201
201
  - lib/pagseguro/document.rb
202
- - lib/pagseguro/exceptions.rb
203
202
  - lib/pagseguro/holder.rb
204
203
  - lib/pagseguro/installment.rb
205
204
  - lib/pagseguro/item.rb
@@ -1,22 +0,0 @@
1
- module PagSeguro
2
-
3
- class InvalidTransaction < StandardError; end
4
-
5
- class InvalidShipping < StandardError; end
6
-
7
- class InvalidItem < StandardError; end
8
-
9
- class InvalidSender < StandardError; end
10
-
11
- class InvalidPhone < StandardError; end
12
-
13
- class InvalidBank < StandardError; end
14
-
15
- class InvalidCreditCard < StandardError; end
16
-
17
- class InvalidInstallment < StandardError; end
18
-
19
- class InvalidHolder < StandardError; end
20
-
21
- class InvalidAddress < StandardError; end
22
- end