mixin_bot 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5281229704ca2a0c90428a5f74d6d581bc79e19fe50b842ef1b517524aa206c6
4
- data.tar.gz: 8e3961405502a068167665c596cf3d1b97a13e3fe9d5c0a217213db50317cc3f
3
+ metadata.gz: cf2e7ef08c38a52d5d31ce1be5a0531f13680e31cb5e7f11cd6e1582436d8711
4
+ data.tar.gz: '08cfa89514d3f102cdd064cfb3c3367cf2166292a3abc854481320a2fb610d15'
5
5
  SHA512:
6
- metadata.gz: d87f1bb6e3079edd9a5a0759a61396aaa1c886793362fd759f5f191926b16deb0bbbee497fc9f9b534ea769780a2807264518725ab4747e9c6e864651d5bb574
7
- data.tar.gz: 61af8a4a4dc9b1521dd4e3e47bb228605325abd4f3717e5ac8df928eb2314e00548a1b65c88eecf5a7417992d3318cd6eea0fb596404df83d2dc62123c972f5d
6
+ metadata.gz: a5f7af8574ea545b899bd2081923dd75e0b2ef2288346fb8e8d842b642ef596c626370d9a5140a695c267db4281e4c51239cce2d55f5edb87ed33127c76c379b
7
+ data.tar.gz: b2393b4a392ff025b0e6d58c545018bd4cafb26e9fb130bba8938e42d4850a6f2b5d0244d887f6dae8d8f53fcb000819737ea71d999add7e175637c7e2d591d1
@@ -56,7 +56,7 @@ module MixinBot
56
56
  def authorize_code(**kwargs)
57
57
  path = '/oauth/authorize'
58
58
  data = authorization_data(
59
- kwargs[:user_id],
59
+ kwargs[:user_id],
60
60
  kwargs[:scope] || ['PROFILE:READ']
61
61
  )
62
62
 
@@ -77,7 +77,7 @@ module MixinBot
77
77
  @_scope = scope.join(' ')
78
78
  EM.run do
79
79
  start_blaze_connect do
80
- def on_open(ws, event)
80
+ def on_open(ws, _event)
81
81
  ws.send write_ws_message(
82
82
  action: 'REFRESH_OAUTH_CODE',
83
83
  params: {
@@ -95,7 +95,7 @@ module MixinBot
95
95
  ws.close
96
96
  end
97
97
 
98
- def on_close(ws, event)
98
+ def on_close(_ws, _event)
99
99
  EM.stop_event_loop
100
100
  end
101
101
  end
@@ -52,17 +52,16 @@ module MixinBot
52
52
 
53
53
  desc 'authcode', 'code to authorize other mixin account'
54
54
  option :keystore, type: :string, aliases: '-k', required: true, desc: 'keystore or keystore.json file path'
55
- option :client_id, type: :string, required: true, aliases: '-c', desc: "client_id of bot to authorize"
55
+ option :client_id, type: :string, required: true, aliases: '-c', desc: 'client_id of bot to authorize'
56
56
  option :scope, type: :array, default: ['PROFILE:READ'], aliases: '-s', desc: 'scope to authorize'
57
- option :pin, type: :string, required: true, aliases: '-p', desc: 'pin'
58
57
  def authcode
59
58
  res = {}
60
- CLI::UI::Spinner.spin("POST /oauth/authorize") do |_spinner|
59
+ CLI::UI::Spinner.spin('POST /oauth/authorize') do |_spinner|
61
60
  res =
62
61
  api_instance.authorize_code(
63
62
  user_id: options[:client_id],
64
63
  scope: options[:scope],
65
- pin: options[:pin]
64
+ pin: keystore['pin']
66
65
  )
67
66
  end
68
67
  log res['data']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  end
data/lib/mvm/registry.rb CHANGED
@@ -11,7 +11,7 @@ module MVM
11
11
 
12
12
  def pid
13
13
  hex = @rpc.call(@registry, 'PID').to_s(16)
14
- MixinBot::Utils::UUID.new(hex:hex).unpacked
14
+ MixinBot::Utils::UUID.new(hex: hex).unpacked
15
15
  end
16
16
 
17
17
  def version
@@ -20,7 +20,7 @@ module MVM
20
20
 
21
21
  def asset_from_contract(contract)
22
22
  hex = @rpc.call(@registry, 'assets', contract).to_s(16)
23
- MixinBot::Utils::UUID.new(hex:hex).unpacked
23
+ MixinBot::Utils::UUID.new(hex: hex).unpacked
24
24
  end
25
25
 
26
26
  def users_from_contract(contract)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixin_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee