buckaruby 2.2.0 → 2.2.2

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: 27c6e6a45e808a1c647fe705134f58b9991ec6fb7aec29571a93db151f528b57
4
- data.tar.gz: e1c84fe69faee13ce46cc499f3df561e000a496c38602aa376249c66ab55e306
3
+ metadata.gz: 874d86470ee1f00b184d5b20fdfdf98e3ca2df0854e05083dfb5baa8a866b4e1
4
+ data.tar.gz: c7f2ecd592305b46e3dc149bd1c304e932789e196b6e1e7ca1bb238861ae1050
5
5
  SHA512:
6
- metadata.gz: e26473547b8c14f9d10b71e4f5effe7f69aa004427134dfa4b3d63954eceedea1a1873f83c1e03a3c8550d6bbc3247de373b188a27fe2563f17d5e1c67b8caec
7
- data.tar.gz: d406d0e9a54ed6285faa45f64f17e84c7f89e6e18016c7551ceb5603c58c1acc0bacdc7c14219baf6813cac683a2169ee8a7dd0e2f7b4b5112cf4a9c2ef51bdd
6
+ metadata.gz: 828876b41020dac7d207e1c1d68d8741b3c6009d11dd6344a93224db71ffda0d7e89635a91364fff9f8b8c7674203f800efa05eda659f9634eca285138b4fc83
7
+ data.tar.gz: 87e753cb50b611e1b8fa789a94004f4778b34859785d79ff1e2e6e3071562dfb2a601413a77c5439386b8a1956a38e4e7c9de8b30cb32f387c3f2a2bba093e22
@@ -41,7 +41,9 @@ module Buckaruby
41
41
  http.open_timeout = @config.open_timeout
42
42
  http.read_timeout = @config.read_timeout
43
43
 
44
- raw_response = http.post(uri.request_uri, URI.encode_www_form(params))
44
+ request = Net::HTTP::Post.new(uri)
45
+ request.set_form_data(params)
46
+ raw_response = http.request(request)
45
47
 
46
48
  unless raw_response.is_a?(Net::HTTPSuccess)
47
49
  raise InvalidResponseException, raw_response
@@ -2,8 +2,8 @@
2
2
 
3
3
  require_relative 'support/case_insensitive_hash'
4
4
 
5
- require 'cgi'
6
5
  require 'date'
6
+ require 'uri'
7
7
 
8
8
  module Buckaruby
9
9
  # Base class for any response.
@@ -63,13 +63,10 @@ module Buckaruby
63
63
 
64
64
  def parse_response(body)
65
65
  if body.is_a?(Hash)
66
- response = body
66
+ body
67
67
  else
68
- response = CGI.parse(body)
69
- response.each { |key, value| response[key] = value.first }
68
+ URI.decode_www_form(body).to_h
70
69
  end
71
-
72
- response
73
70
  end
74
71
 
75
72
  def parse_time(time)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buckaruby
4
- VERSION = '2.2.0'
4
+ VERSION = '2.2.2'
5
5
  end
data/lib/buckaruby.rb CHANGED
@@ -34,13 +34,13 @@ module Buckaruby
34
34
  end
35
35
  end
36
36
 
37
- @config = Config.new
38
-
39
37
  class << self
40
- attr_reader :config
38
+ def config
39
+ @config ||= Config.new
40
+ end
41
41
 
42
42
  def configure
43
- yield(@config)
43
+ yield(config)
44
44
  end
45
45
 
46
46
  def reset!
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buckaruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaa
8
+ - iRaiser
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2025-11-14 00:00:00.000000000 Z
12
+ date: 2026-02-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -97,12 +98,11 @@ dependencies:
97
98
  description: The Buckaruby gem provides a Ruby library for communicating with the
98
99
  Buckaroo Payment Engine 3.0.
99
100
  email:
100
- - developers@kentaa.nl
101
+ - tech-arnhem@iraiser.eu
101
102
  executables: []
102
103
  extensions: []
103
104
  extra_rdoc_files: []
104
105
  files:
105
- - CHANGELOG.md
106
106
  - LICENSE.txt
107
107
  - README.md
108
108
  - lib/buckaruby.rb
data/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- # Buckaruby changelog
2
-
3
- We use [GitHub releases](https://github.com/KentaaNL/buckaruby/releases) for the CHANGELOG since version 2.0 of this gem.
4
-
5
- Check the 1.x branch for previous changes: https://github.com/KentaaNL/buckaruby/blob/1.x/CHANGELOG.md