mercadopago-rb 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2afbf6c2d0e14b92baffabb9a40e9bc1a469bc1
4
- data.tar.gz: c13ab7ec97dd9bd9fc71a65e57b046cae95be1ec
3
+ metadata.gz: 8548490d8d225a618f65bda7bd8e9dfd651bead1
4
+ data.tar.gz: c50298287d02294b84bbad3434f3623f266f2b9f
5
5
  SHA512:
6
- metadata.gz: 79325d8bea4f96d2f1e525e082944243695245a4bc91663aa98d640597b25ba316df7674fb604c6fa8f35417efbb0034977f3f07f890fb0136af5e1ef2633903
7
- data.tar.gz: e9720f661158d1f5a19846619cba6381a1ffb989728caef58ea1b64489e13275470c6774f0bd4413c85abca7109116375408efe01cc617c4127284a34d05f334
6
+ metadata.gz: 0b5ec17109934e9cb184bba01c298edbeedc1cfb21223fd22b9ed13b0f486fd5edbd28c259e8c0a49cd8000837212aa077df5715be89e2f2e0be1fd2af514ed3
7
+ data.tar.gz: 8fff268f191d919bcc7d36995f119862aadfb25295fa04cc4ae67d0ca906c3f331972f7ca2b3686530143cee788ab87ec2252d072e0a24810408b9a2e4c85acf
data/.gitignore CHANGED
@@ -8,3 +8,4 @@ pkg
8
8
  /doc/rdoc
9
9
  /*/doc
10
10
  /vendor
11
+ mercadopago-rb-*.gem
@@ -3,7 +3,7 @@ require 'mercadopago/config/env'
3
3
  module Mercadopago
4
4
  module Config
5
5
  extend self
6
- attr_accessor :access_token, :public_key, :sandbox_mode
6
+ attr_accessor :access_token, :public_key
7
7
  attr_reader :secrets
8
8
 
9
9
  def access_token
@@ -18,16 +18,8 @@ module Mercadopago
18
18
  raise(Errors::CredentialNotFound.new('Public Key not found'))
19
19
  end
20
20
 
21
- def sandbox_mode
22
- if @sandbox_mode.nil?
23
- @sandbox_mode = secrets('sandbox_mode') ||
24
- ENV['MERCADOPAGO_LIVE_MODE'] || true
25
- end
26
- @sandbox_mode
27
- end
28
-
29
21
  def reset!
30
- @access_token = (@public_key = (@sandbox_mode = nil))
22
+ @access_token = (@public_key = nil)
31
23
  end
32
24
 
33
25
  private
@@ -8,11 +8,11 @@ module Mercadopago
8
8
  end
9
9
 
10
10
  def [](attr)
11
- to_h[attr]
11
+ hash[attr]
12
12
  end
13
13
 
14
14
  def to_h
15
- @hash ||= {status: status, response: response}
15
+ hash
16
16
  end
17
17
 
18
18
  def method_missing(name, *args, &block)
@@ -26,5 +26,9 @@ module Mercadopago
26
26
  def respond_to?(name, include_private = false)
27
27
  response.has_key?(name.to_sym) || response.has_key?(name.to_s) || super
28
28
  end
29
+
30
+ def hash
31
+ @hash ||= {status: status, response: response}
32
+ end
29
33
  end
30
34
  end
@@ -7,8 +7,7 @@ require 'mercadopago/response'
7
7
  module Mercadopago
8
8
  class RestClient
9
9
  attr_accessor :http, :api_base_uri
10
- attr_reader :sandbox_mode, :access_token, :public_key,
11
- :client_secret, :query
10
+ attr_reader :access_token, :public_key, :client_secret, :query
12
11
 
13
12
  MIME_JSON = 'application/json'.freeze
14
13
  MIME_FORM = 'application/x-www-form-urlencoded'.freeze
@@ -23,7 +22,6 @@ module Mercadopago
23
22
  def initialize(opts = {})
24
23
  @access_token = opts[:access_token] || Config.access_token
25
24
  @public_key = opts[:public_key] || Config.public_key
26
- @sandbox_mode = opts[:sandbox_mode] || Config.sandbox_mode || true
27
25
  @http = set_http
28
26
  end
29
27
 
@@ -1,3 +1,3 @@
1
1
  module Mercadopago
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadopago-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Bonisconti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler