mercadopago 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ac03eabc246d2feb42e79e390d21dcf3ecca5d89
4
+ data.tar.gz: e33fdd761bf7100df62e782d66d693d3026c6135
5
+ SHA512:
6
+ metadata.gz: eb8dd18062cb47b2cdf37404f3c21814a3ae09f0175558df86fbf5fe6c97c5a8bdce2e287155805958010025b08cf562616556670b916ce99b99dc6eb66c6f68
7
+ data.tar.gz: b4b837900a8f2f2f698ea033de72e614ac96324cb82b2ff08188e1d38eb1349510bc80b8cba4e43bf486cad37d651b8e1ab03e0792ad419a54155a1d619709a7
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  MercadoPago Gem
2
2
  ===============
3
3
 
4
+ Developed and maintained by the team of [Kauplus](http://www.kauplus.com).
5
+
4
6
  This is a Ruby client for all the services offered by [MercadoPago](http://www.mercadopago.com).
5
7
 
6
8
  You should read the MercadoPago API documentation before you use this gem. This gem works with hashes and only deals with requests/responses. That's why you will need an understanding of their services.
@@ -303,6 +305,10 @@ This gem has tests for a few methods. To check if it is working properly, just r
303
305
  Changelog
304
306
  ---------
305
307
 
308
+ 2.0.2
309
+
310
+ Request uses Faraday HTTP client instead of RestClient for better SSL support.
311
+
306
312
  2.0.1
307
313
 
308
314
  Added the refresh_access_token method to the authentication module.
@@ -1,4 +1,4 @@
1
- require 'rest-client'
1
+ require 'faraday'
2
2
  require 'json'
3
3
 
4
4
  module MercadoPago
@@ -44,10 +44,17 @@ module MercadoPago
44
44
  # - headers: the headers to be transmitted over the HTTP request.
45
45
  #
46
46
  def self.make_request(type, path, payload = nil, headers = {})
47
- args = [type, "#{MERCADOPAGO_URL}#{path}", payload, headers].compact
48
- response = RestClient.send *args
47
+ args = [type, MERCADOPAGO_URL, path, payload, headers].compact
49
48
 
50
- JSON.load(response)
49
+ connection = Faraday.new(MERCADOPAGO_URL, ssl: { version: :SSLv3 })
50
+
51
+ response = connection.send(type) do |req|
52
+ req.url path
53
+ req.headers = headers
54
+ req.body = payload
55
+ end
56
+
57
+ JSON.load(response.body)
51
58
  rescue Exception => e
52
59
  JSON.load(e.response)
53
60
  end
@@ -1,3 +1,3 @@
1
1
  module MercadoPago
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
data/mercadopago.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # specify any dependencies here:
22
22
  s.add_dependency 'json', '>= 1.4.6'
23
- s.add_dependency 'rest-client', '1.6.7'
23
+ s.add_dependency 'faraday', '0.9.0'
24
24
  s.add_development_dependency 'pry'
25
25
  s.add_development_dependency 'debugger'
26
26
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadopago
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
5
- prerelease:
4
+ version: 2.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kauplus Social Commerce
@@ -10,70 +9,62 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2014-06-03 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: json
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: 1.4.6
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: 1.4.6
31
28
  - !ruby/object:Gem::Dependency
32
- name: rest-client
29
+ name: faraday
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - '='
37
33
  - !ruby/object:Gem::Version
38
- version: 1.6.7
34
+ version: 0.9.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - '='
45
40
  - !ruby/object:Gem::Version
46
- version: 1.6.7
41
+ version: 0.9.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: pry
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: debugger
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - ">="
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - ">="
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  description: This gem allows developers to use the services available in the MercadoPago
@@ -84,7 +75,7 @@ executables: []
84
75
  extensions: []
85
76
  extra_rdoc_files: []
86
77
  files:
87
- - .gitignore
78
+ - ".gitignore"
88
79
  - Gemfile
89
80
  - README.md
90
81
  - Rakefile
@@ -99,28 +90,26 @@ files:
99
90
  - test/test_mercado_pago.rb
100
91
  homepage: https://github.com/kauplus/mercadopago
101
92
  licenses: []
93
+ metadata: {}
102
94
  post_install_message:
103
95
  rdoc_options: []
104
96
  require_paths:
105
97
  - lib
106
98
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
99
  requirements:
109
- - - ! '>='
100
+ - - ">="
110
101
  - !ruby/object:Gem::Version
111
102
  version: '0'
112
103
  required_rubygems_version: !ruby/object:Gem::Requirement
113
- none: false
114
104
  requirements:
115
- - - ! '>='
105
+ - - ">="
116
106
  - !ruby/object:Gem::Version
117
107
  version: '0'
118
108
  requirements: []
119
109
  rubyforge_project: mercadopago
120
- rubygems_version: 1.8.24
110
+ rubygems_version: 2.2.2
121
111
  signing_key:
122
- specification_version: 3
112
+ specification_version: 4
123
113
  summary: Client for the MercadoPago API
124
114
  test_files:
125
115
  - test/test_mercado_pago.rb
126
- has_rdoc: