cryptomus 0.1.0 → 0.1.1

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: f60a4f81086d5b7e88b0fe308a09f62180cd353f373b48942ac13fd0bb474139
4
- data.tar.gz: d965a52db2e10cbdce4f4ec5c6b54fd2f9f8e6a2d466847962adbc6bf2cbf013
3
+ metadata.gz: e49802cff57624bbb245f1ea8b7cf8bc2d7a1e177683cd9e68cdc3bddd3f8f7a
4
+ data.tar.gz: 43a88732580c696d8c7eb5cf15c4dcbddf23a9abf88ea615fad7a8c1c451275b
5
5
  SHA512:
6
- metadata.gz: 97b863cb937d0c5da1c1592692df174809dcf513b8d1e1d2c24d9dc68242572974552cb067e5f7b36b56cef103f4bf9ca1c21761587e9ab1ca3d826996b33ec8
7
- data.tar.gz: e971b602839afee23d5cafc9c5bd8deb32f7999d47f07492f70a4df9c52ea167953a86d3e04158ecd43b9ea8cf3b2fd29e45403a0b0e33174046fa8ba364bf71
6
+ metadata.gz: d40cfe81a18225790b22fb0d208a0f34142ab87e807b9dd48b1fe134b14ba49a6af68181cc9d2dcaa09a7b26a3da787e6f2d60236e7b9c3853b3d18d6f937285
7
+ data.tar.gz: 63f67b6b483951efb0a87d21640f098ee051a62776a7420c5bd119e0e3bdd3e28d2ed7ef4cd9a03daeb75a6b290ec34807a01335d0b9cd4e36da795511af66cf
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Cryptomus
2
2
 
3
+ ![Tests](https://github.com/senid231/cryptomus-ruby-sdk/workflows/Tests/badge.svg)
4
+ [![Gem Version](https://badge.fury.io/rb/cryptomus.svg)](https://badge.fury.io/rb/cryptomus)
5
+
3
6
  Ruby SDK for Cryptomus Crypto Payment Gateway.
4
7
  See the [documentation](https://doc.cryptomus.com)
5
8
 
@@ -6,6 +6,7 @@ module Cryptomus
6
6
  :merchant_id,
7
7
  :user_agent,
8
8
  :connection_config,
9
+ :handle_response,
9
10
  :on_error,
10
11
  :logger
11
12
 
@@ -11,13 +11,14 @@ module Cryptomus
11
11
  # @!method response_body [Hash,nil]
12
12
  attr_reader :response, :status, :response_body
13
13
 
14
- # @param msg [String]
15
14
  # @param response [Faraday::Response,nil]
16
- def initialize(msg, response = nil)
15
+ # @param msg [String,nil]
16
+ def initialize(response, msg = nil)
17
17
  @response = response
18
18
  @status = response&.status
19
19
  @response_body = response&.body
20
- super(msg)
20
+ msg ||= "Response #{status}, #{response_body}" if response
21
+ super(msg || self.class.name)
21
22
  end
22
23
  end
23
24
  end
@@ -11,7 +11,7 @@ module Cryptomus
11
11
  # @param raw_body [String]
12
12
  # @return [String]
13
13
  def generate(raw_body)
14
- raw_body_encoded = Base64.encode64(raw_body || '')
14
+ raw_body_encoded = Base64.strict_encode64(raw_body || '')
15
15
  Digest::MD5.hexdigest("#{raw_body_encoded}#{Cryptomus.config.api_key}")
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptomus
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptomus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-15 00:00:00.000000000 Z
11
+ date: 2023-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday