cryptomus 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/cryptomus/configuration.rb +1 -0
- data/lib/cryptomus/errors.rb +4 -3
- data/lib/cryptomus/signature.rb +1 -1
- data/lib/cryptomus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e49802cff57624bbb245f1ea8b7cf8bc2d7a1e177683cd9e68cdc3bddd3f8f7a
|
4
|
+
data.tar.gz: 43a88732580c696d8c7eb5cf15c4dcbddf23a9abf88ea615fad7a8c1c451275b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/cryptomus/errors.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
20
|
+
msg ||= "Response #{status}, #{response_body}" if response
|
21
|
+
super(msg || self.class.name)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
data/lib/cryptomus/signature.rb
CHANGED
@@ -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.
|
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
|
data/lib/cryptomus/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|