mercadopago-rb 0.1.3 → 0.1.4

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: e3be46c7f126d0a85a16d5a480bf7c86ccb79a80
4
- data.tar.gz: 74aa34b6cf2753d28be330e89be5c891a07d12ec
3
+ metadata.gz: cb1c926fb3b972bb11d1c87e796b742799bba07a
4
+ data.tar.gz: 97e4a21317063bcecf29f9afde82645fa6ceaf11
5
5
  SHA512:
6
- metadata.gz: d2bbe10d7eb4d2c6b7609e773a59e9844589dc487cfa8a722869c41341fb8495dbb529c2fc1fef1ad045a863b88240a0f0bb6f6c4b96376ef7791e74938eb6bd
7
- data.tar.gz: 2da5e01dab420f213dde72c3e4073ee2a5f8b78d7dd7e2ae3a714502182a46bfa8a1dd71342996e221b3907511173eec9fcbfe4d1ca9c7cec798e38f6082eb2b
6
+ metadata.gz: 38dfc7c56ae276dece4f951ef98ea7cd18f296f44d191a3d0477c0d529e01b3ae7ac1525845ae583dda212b987062dccb9204c90f3e86cd9b53c0bfa5ef456e8
7
+ data.tar.gz: b2b68d91c7740b2cc7781acd0634cd990ef9dae4b31e88a637ee7c3013a7870e3e929d2038745c2d1c31457e2dc4b517bd12dd0a019d3a69d1d662edbeb86270
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.3
4
+ version: 0.1.4
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-25 00:00:00.000000000 Z
11
+ date: 2016-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,38 +58,7 @@ email:
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
- files:
62
- - ".gitignore"
63
- - ".travis.yml"
64
- - CODE_OF_CONDUCT.md
65
- - Gemfile
66
- - Gemfile.lock
67
- - README.md
68
- - Rakefile
69
- - bin/console
70
- - bin/setup
71
- - lib/mercadopago.rb
72
- - lib/mercadopago/client.rb
73
- - lib/mercadopago/config.rb
74
- - lib/mercadopago/config/env.rb
75
- - lib/mercadopago/config/locales/es.yml
76
- - lib/mercadopago/endpoint.rb
77
- - lib/mercadopago/endpoint/base.rb
78
- - lib/mercadopago/endpoint/payment.rb
79
- - lib/mercadopago/endpoint/payment_methods.rb
80
- - lib/mercadopago/errors.rb
81
- - lib/mercadopago/errors/bad_request.rb
82
- - lib/mercadopago/errors/credential_not_found.rb
83
- - lib/mercadopago/errors/endpoint.rb
84
- - lib/mercadopago/errors/no_environment.rb
85
- - lib/mercadopago/rest_client.rb
86
- - lib/mercadopago/version.rb
87
- - mercadopago.gemspec
88
- - spec/config/config_spec.rb
89
- - spec/mercadopago_spec.rb
90
- - spec/payment_methods_spec.rb
91
- - spec/payment_spec.rb
92
- - spec/spec_helper.rb
61
+ files: []
93
62
  homepage: https://github.com/fedebonisconti/mercadopago
94
63
  licenses:
95
64
  - MIT
@@ -98,6 +67,7 @@ post_install_message:
98
67
  rdoc_options: []
99
68
  require_paths:
100
69
  - lib
70
+ - lib/mercadopago.rb
101
71
  required_ruby_version: !ruby/object:Gem::Requirement
102
72
  requirements:
103
73
  - - ">="
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- *.swp
2
- .Gemfile
3
- .ruby-version
4
- debug.log
5
- pkg
6
- /.bundle
7
- /dist
8
- /doc/rdoc
9
- /*/doc
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.1.10
5
- - 2.2.5
6
- - 2.3.1
data/CODE_OF_CONDUCT.md DELETED
@@ -1,49 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
18
- * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at fedebonisconti26@gmail.com. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/Gemfile.lock DELETED
@@ -1,35 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mercadopago-rb (0.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.2.5)
10
- rake (10.5.0)
11
- rspec (3.4.0)
12
- rspec-core (~> 3.4.0)
13
- rspec-expectations (~> 3.4.0)
14
- rspec-mocks (~> 3.4.0)
15
- rspec-core (3.4.4)
16
- rspec-support (~> 3.4.0)
17
- rspec-expectations (3.4.0)
18
- diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.4.0)
20
- rspec-mocks (3.4.1)
21
- diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.4.0)
23
- rspec-support (3.4.1)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- bundler (~> 1.11)
30
- mercadopago-rb!
31
- rake (~> 10.0)
32
- rspec (~> 3.0)
33
-
34
- BUNDLED WITH
35
- 1.11.2
data/README.md DELETED
@@ -1,30 +0,0 @@
1
- [![Build Status](https://travis-ci.org/fedebonisconti/mercadopago.svg?branch=master)](https://travis-ci.org/fedebonisconti/mercadopago)
2
-
3
- # Mercadopago
4
-
5
- Mercadopago-rb is an object-oriented adapter that facilitates the usage of Mercadopago's API.
6
-
7
- ## Installation
8
-
9
- You can add it to your Gemfile with:
10
-
11
- ```ruby
12
- gem 'mercadopago-rb'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install mercadopago-rb
22
-
23
- ## Usage
24
-
25
- Checkout the [wiki](https://github.com/fedebonisconti/mercadopago/wiki).
26
-
27
-
28
- ## Contributing
29
-
30
- Bug reports and pull requests are welcome on GitHub at https://github.com/fedebonisconti/mercadopago. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "mercadopago"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,37 +0,0 @@
1
- require "forwardable"
2
- require "mercadopago/rest_client"
3
- require "mercadopago/endpoint"
4
-
5
- module Mercadopago
6
- class Client
7
- attr_accessor :rest_client
8
-
9
- extend Forwardable
10
-
11
- def_delegators :@rest_client, :sandbox_mode,
12
- :access_token, :public_key
13
-
14
-
15
- def initialize(opts = {})
16
- @rest_client = RestClient.new(opts)
17
- end
18
-
19
- # This method provides interaction with payment's API endpoint
20
- def payment(method, data = {})
21
- call_endpoint(Endpoint::Payment, method, data)
22
- end
23
-
24
- # This method provides interaction with payment methods's API endpoint
25
- def payment_methods(method, data = {})
26
- call_endpoint(Endpoint::PaymentMethods, method, data)
27
- end
28
-
29
-
30
- private
31
- def call_endpoint(klazz, method, data)
32
- op = klazz.new(rest_client, data)
33
- op.public_send(method) if op.respond_to?(method) ||
34
- raise(Errors::Endpoint.new('Invalid endpoint method'))
35
- end
36
- end
37
- end
@@ -1,33 +0,0 @@
1
- module Mercadopago
2
- module Config
3
- module Env
4
- extend self
5
-
6
- def environment
7
- return Rails.env if defined?(Rails) && Rails.respond_to?(:env)
8
- return Sinatra::Base.environment.to_s if defined?(Sinatra)
9
- ENV['MERCADOPAGO_ENV'] || ENV['ENVIRONMENT'] ||
10
- raise(Errors::NoEnvironment.new)
11
- end
12
-
13
- def development?
14
- (defined?(Rails) && Rails.env.development?) ||
15
- ENV['ENVIRONMENT'] == "development" ||
16
- ENV['MERCADOPAGO_ENV'] == "development"
17
- end
18
-
19
- def test?
20
- (defined?(Rails) && Rails.env.test?) ||
21
- ENV['ENVIRONMENT'] == "test" ||
22
- ENV['MERCADOPAGO_ENV'] == "test"
23
- end
24
-
25
- def production?
26
- (defined?(Rails) && Rails.env.production?) ||
27
- ENV['ENVIRONMENT'] == "production" ||
28
- ENV['MERCADOPAGO_ENV'] == "production"
29
- end
30
-
31
- end
32
- end
33
- end
File without changes
@@ -1,42 +0,0 @@
1
- require 'mercadopago/config/env'
2
-
3
- module Mercadopago
4
- module Config
5
- extend self
6
- attr_accessor :access_token, :public_key, :sandbox_mode
7
- attr_reader :secrets
8
-
9
- def access_token
10
- @access_token ||= secrets('access_token') ||
11
- ENV['MERCADOPAGO_ACCESS_TOKEN'] ||
12
- raise(Errors::CredentialNotFound.new('Access Token not found'))
13
- end
14
-
15
- def public_key
16
- @public_key ||= secrets('public_key') ||
17
- ENV['MERCADOPAGO_PUBLIC_KEY'] ||
18
- raise(Errors::CredentialNotFound.new('Public Key not found'))
19
- end
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
- def reset!
30
- @access_token = (@public_key = (@sandbox_mode = nil))
31
- end
32
-
33
- private
34
- def secrets(key = nil)
35
- if defined?(::Rails)
36
- @secrets ||= ::Rails.application.secrets.mercadopago
37
- (key && @secrets[key]) || @secrets
38
- end
39
- end
40
-
41
- end
42
- end
@@ -1,23 +0,0 @@
1
- module Mercadopago
2
- module Endpoint
3
- class Base
4
- attr_reader :data, :rest_client
5
-
6
- def initialize(rest_client, data)
7
- @rest_client = rest_client
8
- @data = data
9
- end
10
-
11
- def to_s
12
- self.class.to_s.split("::").last.downcase
13
- end
14
-
15
- protected
16
- def member_endpoint
17
- id = data[:id] || raise(StandardError.new('Unknown ID'))
18
- "#{self.class::ENDPOINT}/#{id}"
19
- end
20
-
21
- end
22
- end
23
- end
@@ -1,29 +0,0 @@
1
- module Mercadopago
2
- module Endpoint
3
- class Payment < Base
4
- ENDPOINT = "/payments".freeze
5
-
6
- def get
7
- endpoint = data[:id] ? member_endpoint : ENDPOINT
8
- rest_client.get(endpoint)
9
- end
10
-
11
- def create
12
- rest_client.post(ENDPOINT, data)
13
- end
14
-
15
- def refund
16
- rest_client.put(member_endpoint + "/refunds")
17
- end
18
-
19
- def cancel
20
- rest_client.put(member_endpoint, {status: "cancelled"})
21
- end
22
-
23
- def search
24
- rest_client.get(ENDPOINT + "/search", data[:filters])
25
- end
26
-
27
- end
28
- end
29
- end
@@ -1,12 +0,0 @@
1
- module Mercadopago
2
- module Endpoint
3
- class PaymentMethods < Base
4
- ENDPOINT = "/payment_methods".freeze
5
-
6
- def get
7
- rest_client.get(ENDPOINT)
8
- end
9
-
10
- end
11
- end
12
- end
@@ -1,3 +0,0 @@
1
- require 'mercadopago/endpoint/base'
2
- require 'mercadopago/endpoint/payment_methods'
3
- require 'mercadopago/endpoint/payment'
@@ -1,6 +0,0 @@
1
- module Mercadopago
2
- module Errors
3
- class BadRequest < StandardError
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module Mercadopago
2
- module Errors
3
- class CredentialNotFound < StandardError
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module Mercadopago
2
- module Errors
3
- class Endpoint < StandardError
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module Mercadopago
2
- module Errors
3
- class NoEnvironment < StandardError
4
- end
5
- end
6
- end
@@ -1,4 +0,0 @@
1
- require "mercadopago/errors/no_environment"
2
- require "mercadopago/errors/credential_not_found"
3
- require "mercadopago/errors/endpoint"
4
- require "mercadopago/errors/bad_request"
@@ -1,84 +0,0 @@
1
- require 'uri'
2
- require 'net/https'
3
- require 'json'
4
- require 'mercadopago/config'
5
-
6
- module Mercadopago
7
- class RestClient
8
- attr_accessor :http, :api_base_uri
9
- attr_reader :sandbox_mode, :access_token, :public_key,
10
- :client_secret, :query
11
-
12
- MIME_JSON = 'application/json'.freeze
13
- MIME_FORM = 'application/x-www-form-urlencoded'.freeze
14
- API_BASE_URL = 'https://api.mercadopago.com'.freeze
15
- MERCADO_PAGO_VERSION = '0.3.4'.freeze
16
- API_VERSION = '/v1'.freeze
17
- GET = "GET".freeze
18
- POST = "POST".freeze
19
- PUT = "PUT".freeze
20
- DELETE = "DELETE".freeze
21
-
22
- def initialize(opts = {})
23
- @access_token = opts[:access_token] || Config.access_token
24
- @public_key = opts[:public_key] || Config.public_key
25
- @sandbox_mode = opts[:sandbox_mode] || Config.sandbox_mode || true
26
- @http = set_http
27
- end
28
-
29
- def generate_uri(uri, params = {})
30
- params['access_token'] = access_token
31
- @query ||= (uri.include?("?") ? "&" : "?") +
32
- URI.encode_www_form(params)
33
- API_VERSION + uri + @query
34
- end
35
-
36
- def get(uri, params = {}, content_type = MIME_JSON)
37
- request(GET, uri, params, content_type)
38
- end
39
-
40
- def post(uri, data, params = {}, content_type = MIME_JSON)
41
- request(POST, uri, params, content_type, data)
42
- end
43
-
44
- def put(uri, data = nil, params = {}, content_type = MIME_JSON)
45
- request(PUT, uri, params, content_type, data)
46
- end
47
-
48
- def delete(uri, params = {}, content_type = MIME_JSON)
49
- request(DELETE, uri, params, content_type)
50
- end
51
-
52
- def api_base_uri
53
- @api_base_uri ||= URI.parse(API_BASE_URL)
54
- end
55
-
56
- def request(method, uri, params, content_type, data = {})
57
- api_result = http.send_request(method, generate_uri(uri, params), data.to_json, headers(content_type))
58
- {
59
- status: api_result.code,
60
- response: JSON.parse(api_result.body)
61
- }
62
- end
63
-
64
- private
65
- def headers(content_type)
66
- {
67
- 'User-Agent' => "MercadoPago Ruby SDK v" + MERCADO_PAGO_VERSION,
68
- 'Content-type' => content_type,
69
- 'Accept' => MIME_JSON
70
- }
71
- end
72
-
73
- def set_http
74
- http = Net::HTTP.new(api_base_uri.host, api_base_uri.port)
75
- if api_base_uri.scheme == "https"
76
- http.use_ssl = true
77
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
78
- # TODO: review this option
79
- # @http.ssl_version = OpenSSL::SSL::OP_NO_SSLv3
80
- end
81
- http
82
- end
83
- end
84
- end
@@ -1,3 +0,0 @@
1
- module Mercadopago
2
- VERSION = "0.1.3"
3
- end
data/lib/mercadopago.rb DELETED
@@ -1,24 +0,0 @@
1
- require "mercadopago/version"
2
- require "mercadopago/client"
3
- require "mercadopago/errors"
4
- require "mercadopago/endpoint"
5
- require "mercadopago/config"
6
-
7
-
8
- # Add es load path by default
9
- if defined?(I18n)
10
- I18n.load_path << File.join(File.dirname(__FILE__),
11
- "config", "locales", "es.yml")
12
- end
13
-
14
- module Mercadopago
15
- extend self
16
-
17
- def configure
18
- yield Config
19
- end
20
-
21
- def client(opts = {})
22
- Client.new(opts)
23
- end
24
- end
data/mercadopago.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'mercadopago/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "mercadopago-rb"
8
- spec.version = Mercadopago::VERSION
9
- spec.authors = ["Federico Bonisconti"]
10
- spec.email = ["fedebonisconti26@gmail.com"]
11
- spec.licenses = ["MIT"]
12
- spec.summary = "Object-oriented wrapper for mercadopago's API."
13
- spec.description = "Object-oriented wrapper for mercadopago's API."
14
- spec.homepage = "https://github.com/fedebonisconti/mercadopago"
15
-
16
- spec.require_paths = ["lib"]
17
- spec.required_ruby_version = '>= 2.1.0'
18
- spec.files = `git ls-files`.split("\n")
19
-
20
- spec.add_development_dependency "bundler", "~> 1.11"
21
- spec.add_development_dependency "rake", "~> 10.0"
22
- spec.add_development_dependency "rspec", "~> 3.0"
23
- end
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Mercadopago::Config, specific_specs: true do
4
- subject(:config){ Mercadopago::Config }
5
-
6
- describe 'access_token' do
7
- context 'when is not set' do
8
- before { Mercadopago::Config.reset! }
9
- it { expect{ config.access_token }.to raise_error(Mercadopago::Errors::CredentialNotFound) }
10
- end
11
-
12
- context 'configure via config block' do
13
- let(:access_token){ 'foo_bar_access_token' }
14
-
15
- before do
16
- Mercadopago.configure{|c| c.access_token = access_token }
17
- end
18
-
19
- it { expect(config.access_token).to be(access_token) }
20
- end
21
-
22
- end
23
-
24
- describe 'public_key' do
25
-
26
- context 'when is not set' do
27
- before { Mercadopago::Config.reset! }
28
- it{ expect{ config.public_key }.to raise_error(Mercadopago::Errors::CredentialNotFound) }
29
- end
30
-
31
- context 'configure via config block' do
32
- let(:public_key){ 'foo_bar_public_key' }
33
-
34
- before do
35
- Mercadopago.configure{|c| c.public_key = public_key }
36
- end
37
-
38
- it{ expect(config.public_key).to be(public_key) }
39
- end
40
- end
41
-
42
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Mercadopago do
4
- it 'has a version number' do
5
- expect(Mercadopago::VERSION).not_to be nil
6
- end
7
-
8
-
9
- end
@@ -1,20 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Mercadopago::Client" do
4
-
5
- let(:client) { Mercadopago.client }
6
- let(:api_endpoint) { :some_invalid_endpoint }
7
- before(:each) do
8
- Mercadopago.configure do |config|
9
- config.access_token = 'foo_bar_access_token'
10
- config.public_key = 'foo_bar_public_key'
11
- end
12
- end
13
-
14
- describe 'payment_methods' do
15
- context 'when API endpoint is invalid' do
16
- it { expect{ client.payment_methods(:api_endpoint)}.to raise_error(Mercadopago::Errors::Endpoint)}
17
- end
18
- end
19
-
20
- end
data/spec/payment_spec.rb DELETED
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Mercadopago::Client" do
4
- let(:client) { Mercadopago.client }
5
- let(:api_endpoint) { :some_invalid_endpoint }
6
- before(:each) do
7
- Mercadopago.configure do |config|
8
- config.access_token = 'foo_bar_access_token'
9
- config.public_key = 'foo_bar_public_key'
10
- end
11
- end
12
-
13
- describe 'payment' do
14
- context 'when API endpoint is invalid' do
15
- it { expect{ client.payment(:api_endpoint)}.to raise_error(Mercadopago::Errors::Endpoint)}
16
- end
17
-
18
- end
19
- end
data/spec/spec_helper.rb DELETED
@@ -1,2 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
- require 'mercadopago'