bs2_api 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: 9153997d692126d6fbbc902507f8a62f95feb214c2b6c815507ebbb82981e9aa
4
- data.tar.gz: 413f69f983087e627979be0e5223688c03452e78aacc2becd913ac1c135ff169
3
+ metadata.gz: b2b8b144d4d8f5045e87461029c823e9b5f5a7c3d5a9191f1e39a542ac5d7400
4
+ data.tar.gz: c9bcf3bb230b56e8a0ac0d0e2d4373ec37a49869bc1918597b36dd57d1ff5bab
5
5
  SHA512:
6
- metadata.gz: b667b6c8cf9d321077a6055442bf5fc5632f3a61fcc6cfaf092d42472901450ab3ce079422744a8375591946d54100412ba4002d56b3ef18fff48d74125f5f50
7
- data.tar.gz: 84092195a3e63e5d99419bf92631361a7abcbbc94f39332d5769990ea331a2569a1bb822a8187f19cc50774101aad26a9077ae1cb4c9f552d02e19753628130b
6
+ metadata.gz: d4a1c8e8823be43d5c6f8a69b4817552e58e3e1a82d81780ed3a181ecae7449d6da2f0235bda18d36b2632dc7e58d06346624690efc9ed6f1b46ef526167572f
7
+ data.tar.gz: 242287b0695c77833428867361fb1a469eb912ffa0b387c8443f8fbba3db23a2bdd4aa1dbc6e9e172084166fb087ff8fbe9ff19a0cdc6260a12449963ecc7e86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bs2_api (0.3.0)
4
+ bs2_api (0.3.2)
5
5
  activesupport
6
6
  builder
7
7
  bundler
data/lib/bs2_api.rb CHANGED
@@ -2,13 +2,12 @@
2
2
  require "httparty"
3
3
  require "active_support/core_ext/hash/indifferent_access"
4
4
  require "active_support/core_ext/hash/except"
5
+ require "active_support/core_ext/object/to_query"
6
+ require "active_support/core_ext/object/blank"
5
7
 
6
8
  require 'bs2_api/version'
7
9
  require 'bs2_api/configuration'
8
10
 
9
- require 'bs2_api/initializers/object'
10
- require 'bs2_api/initializers/hash'
11
-
12
11
  require 'bs2_api/errors/base'
13
12
  require 'bs2_api/errors/invalid_pix_key'
14
13
  require 'bs2_api/errors/invalid_bank'
@@ -40,7 +40,7 @@ module Bs2Api
40
40
  {
41
41
  grant_type: "client_credentials",
42
42
  scope: "pix.write%20pix.read"
43
- }.queryfy
43
+ }.to_query
44
44
  end
45
45
 
46
46
  def auth_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bs2Api
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bs2_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Pastro
@@ -214,8 +214,6 @@ files:
214
214
  - lib/bs2_api/errors/missing_configuration.rb
215
215
  - lib/bs2_api/errors/server_error.rb
216
216
  - lib/bs2_api/errors/unauthorized.rb
217
- - lib/bs2_api/initializers/hash.rb
218
- - lib/bs2_api/initializers/object.rb
219
217
  - lib/bs2_api/payment/base.rb
220
218
  - lib/bs2_api/payment/confirmation.rb
221
219
  - lib/bs2_api/payment/key.rb
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Hash
4
- def queryfy
5
- keys.map do |key|
6
- "#{key}=#{self[key]}"
7
- end.join("&")
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Object
4
- def blank?
5
- respond_to?(:empty?) ? !!empty? : !self
6
- end
7
-
8
- def present?
9
- !blank?
10
- end
11
- end