zold-ruby-sdk 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rultor.yml +3 -3
- data/.simplecov +1 -1
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/lib/zold/wts.rb +7 -3
- data/test/test__helper.rb +1 -1
- data/test/zold/test_wts.rb +7 -2
- data/zold-ruby-sdk.gemspec +2 -2
- 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: 6667b7c529904386f316079f09fcb1316cf04143f36932587cf81d03ec0f8adc
|
4
|
+
data.tar.gz: c8c6ed193819d44850ec1094079e976508f90675d326409320fe93f0e4a11d9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a6c5e55a979436e07d368e0f79c38ef0e86c7d1d1a41e9fffbf0fad553cc0ea4d21141bb6717bc3230d32eb06b7f08188ecbb72821770f343a30f3cfe6e797
|
7
|
+
data.tar.gz: a24f8905de9794ca09d15c0ab5e4f1f1010da392b3222cab8f37f2f485d58e973ab7839fa55a767695f1feb7affd4d068be41de8317aa670409a3f78e8fce64c
|
data/.rultor.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
+
docker:
|
2
|
+
image: yegor256/rultor-image:1.3
|
1
3
|
assets:
|
2
4
|
rubygems.yml: zerocracy/home#assets/rubygems.yml
|
3
5
|
install: |-
|
4
|
-
|
5
|
-
export GEM_PATH=$GEM_HOME:$GEM_PATH
|
6
|
-
bundle install
|
6
|
+
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
7
7
|
release:
|
8
8
|
script: |-
|
9
9
|
bundle exec rake
|
data/.simplecov
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/lib/zold/wts.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -31,7 +31,7 @@ require 'zold/txn'
|
|
31
31
|
# WTS gateway.
|
32
32
|
#
|
33
33
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
34
|
-
# Copyright:: Copyright (c) 2018-
|
34
|
+
# Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
|
35
35
|
# License:: MIT
|
36
36
|
class Zold::WTS
|
37
37
|
# Fake implementation.
|
@@ -52,6 +52,10 @@ class Zold::WTS
|
|
52
52
|
'job-id'
|
53
53
|
end
|
54
54
|
|
55
|
+
def usd_rate
|
56
|
+
5_000
|
57
|
+
end
|
58
|
+
|
55
59
|
def find(_query)
|
56
60
|
[]
|
57
61
|
end
|
@@ -220,7 +224,7 @@ class Zold::WTS
|
|
220
224
|
error = (http.headers || {})['X-Zold-Error']
|
221
225
|
raise error unless error.nil?
|
222
226
|
unless http.code == 200 || http.code == 302
|
223
|
-
@log.debug(http.body)
|
227
|
+
@log.debug("HTTP response body: #{http.body}")
|
224
228
|
raise "Unexpected response code #{http.code}"
|
225
229
|
end
|
226
230
|
http
|
data/test/test__helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/test/zold/test_wts.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -27,7 +27,7 @@ require_relative '../../lib/zold/wts'
|
|
27
27
|
|
28
28
|
# WTS test.
|
29
29
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
-
# Copyright:: Copyright (c) 2018-
|
30
|
+
# Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
|
31
31
|
# License:: MIT
|
32
32
|
class TestWTS < Minitest::Test
|
33
33
|
KEY = '0000000000000000-b416493aefae4ca487c4739050aaec15'
|
@@ -54,6 +54,11 @@ class TestWTS < Minitest::Test
|
|
54
54
|
assert(!wts.id.nil?)
|
55
55
|
end
|
56
56
|
|
57
|
+
def test_retrieves_fake_usd_rate
|
58
|
+
wts = Zold::WTS::Fake.new
|
59
|
+
assert(!wts.usd_rate.nil?)
|
60
|
+
end
|
61
|
+
|
57
62
|
def test_retrieves_balance
|
58
63
|
WebMock.allow_net_connect!
|
59
64
|
wts = Zold::WTS.new(KEY, log: Loog::VERBOSE)
|
data/zold-ruby-sdk.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.rubygems_version = '2.2'
|
30
30
|
s.required_ruby_version = '>=2.5'
|
31
31
|
s.name = 'zold-ruby-sdk'
|
32
|
-
s.version = '0.2.
|
32
|
+
s.version = '0.2.3'
|
33
33
|
s.license = 'MIT'
|
34
34
|
s.summary = 'Zold score'
|
35
35
|
s.description = 'Ruby SDK for Zold online wallets management system (WTS)'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold-ruby-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: loog
|