zold-ruby-sdk 0.2.2 → 0.2.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: 45e90631aa346adba591e28b264b8b3e9b2fde0ea3172c139ff222d30adc9a20
4
- data.tar.gz: ae457ccd2d0b2bc1d968a08b1cde2641cb1356c5e9526e94dc7804e92a3f2677
3
+ metadata.gz: 6667b7c529904386f316079f09fcb1316cf04143f36932587cf81d03ec0f8adc
4
+ data.tar.gz: c8c6ed193819d44850ec1094079e976508f90675d326409320fe93f0e4a11d9a
5
5
  SHA512:
6
- metadata.gz: de70c44c19c753a200b7cc0715696669b87ca1a8493cfb4d96a49b7fa7f25e0f18652f9aabfa4c43399e5432a3eb6c7f71baa8b270da968641ab3158f2a2f7b3
7
- data.tar.gz: '008af64c6d0b3c45e0b137bf1344fe438378ae86980a6e0d73d77ad8478c100a74821d2dd6d92c84a20ae3fdf25900735c81759587f4a4cf21700785d8742704'
6
+ metadata.gz: 47a6c5e55a979436e07d368e0f79c38ef0e86c7d1d1a41e9fffbf0fad553cc0ea4d21141bb6717bc3230d32eb06b7f08188ecbb72821770f343a30f3cfe6e797
7
+ data.tar.gz: a24f8905de9794ca09d15c0ab5e4f1f1010da392b3222cab8f37f2f485d58e973ab7839fa55a767695f1feb7affd4d068be41de8317aa670409a3f78e8fce64c
@@ -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
- export GEM_HOME=~/.ruby
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-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2018-2019 Yegor Bugayenko
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/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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.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.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: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2020-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: loog