mixin_bot 0.7.8 → 0.7.9

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: 9d053efb8425d1b2d144834961e60bae9abac2dbd877c0dea1a2aa8bb9bc4541
4
- data.tar.gz: e830b155aa0b4bfd509732f7126cfc676b41bfc5425fb5646178ceabbed64c86
3
+ metadata.gz: c89684bcccabf1621b82773b9d017e8ec47faac2402ddc6b7238d591c9099705
4
+ data.tar.gz: 05d1e90439562b61ba03b3874945168fa4f838f5d48b57fbacb1738cf648a9ff
5
5
  SHA512:
6
- metadata.gz: 901ea75a36eeda0343230b00f9e478f6c2fbe8dd03d9209f78fe7da65e3b09d4a266ca8a08d979c490153e51d761ed2cf47824b485c25d8d7a4e7485efeb0aab
7
- data.tar.gz: 44a8d64a5aead528b0949ee6ac33acdd6f7d16f56aaec4ee45f7ef964b8646f5e4baabcada13968bc48468cb3de03babfb1fb47ef19566fe519b6fae10cd4a4f
6
+ metadata.gz: f689d32c959651bbf71426f1c68942bc1ad0d17147885f42cfa5606e5a1ffecbf02416e57f8c8aa13cac214e2124bc207f6c51adb91e3962adc474d2e251e029
7
+ data.tar.gz: 3d99fd38161f4c1d326b7a32d63400270df4a3c7128070ed7d8abe8bb6f9947c31522963fb967ca4ae30b86d0a38882f911da79e639d7184ded9e36ce31df5a5
@@ -18,7 +18,7 @@ module MixinBot
18
18
 
19
19
  $ mixinbot api /payments -k ~/.mixinbot/keystore.json -m POST -d '{"asset_id":"965e5c6e-434c-3fa9-b780-c50f43cd955c", "amount":"1", "trace_id": "37f16abb-0640-4d01-9423-a06121732d35", "memo":"test", "opponent_multisig":{"receivers":["0508a116-1239-4e28-b150-85a8e3e6b400", "7ed9292d-7c95-4333-aa48-a8c640064186", "a67c6e87-1c9e-4a1c-b81c-47a9f4f1bff1"], "threshold":2}}'
20
20
  LONGDESC
21
- option :keystore, type: :string, aliases: '-k', required: true, default: '~/.mixinbot/keystore.json', desc: 'Specify keystore.json file path'
21
+ option :keystore, type: :string, aliases: '-k', required: true, desc: 'keystore or keystore.json file path'
22
22
  option :method, type: :string, aliases: '-m', default: 'GET', desc: 'HTTP method, GET or POST'
23
23
  option :params, type: :hash, aliases: '-p', desc: 'HTTP GET params'
24
24
  option :data, type: :string, aliases: '-d', default: '{}', desc: 'HTTP POST data'
@@ -3,7 +3,7 @@
3
3
  module MixinBot
4
4
  class CLI < Thor
5
5
  desc 'encrypt PIN', 'encrypt PIN using private key'
6
- option :keystore, type: :string, aliases: '-k', required: true, default: '~/.mixinbot/keystore.json', desc: 'Specify keystore.json file path'
6
+ option :keystore, type: :string, aliases: '-k', required: true, desc: 'keystore or keystore.json file path'
7
7
  option :iterator, type: :string, aliases: '-i', desc: 'Iterator'
8
8
  def encrypt(pin)
9
9
  log api_instance.encrypt_pin options[:pin].to_s, iterator: options[:iterator]
data/lib/mixin_bot/cli.rb CHANGED
@@ -24,7 +24,7 @@ module MixinBot
24
24
  return if options[:keystore].blank?
25
25
 
26
26
  keystore =
27
- if File.exist? options[:keystore].to_s
27
+ if File.file? options[:keystore]
28
28
  File.read options[:keystore]
29
29
  else
30
30
  options[:keystore]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.7.8'
4
+ VERSION = '0.7.9'
5
5
  end
data/lib/mixin_bot.rb CHANGED
@@ -30,12 +30,13 @@ module MixinBot
30
30
  @api ||= MixinBot::API.new
31
31
  end
32
32
 
33
- class HttpError < StandardError; end
34
- class RequestError < StandardError; end
35
- class ResponseError < StandardError; end
36
- class UnauthorizedError < StandardError; end
37
- class ForbiddenError < StandardError; end
38
- class InsufficientBalanceError < StandardError; end
39
- class InsufficientPoolError < StandardError; end
40
- class PinError < StandardError; end
33
+ class Error < StandardError; end
34
+ class HttpError < Error; end
35
+ class RequestError < Error; end
36
+ class ResponseError < Error; end
37
+ class UnauthorizedError < Error; end
38
+ class ForbiddenError < Error; end
39
+ class InsufficientBalanceError < Error; end
40
+ class InsufficientPoolError < Error; end
41
+ class PinError < Error; end
41
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixin_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-20 00:00:00.000000000 Z
11
+ date: 2022-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport