mixin_bot 0.3.3 → 0.3.4

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: 73454c7aa2b41a3bcb812c89c807c22b8129e093a93d5df3233042fa1fadf261
4
- data.tar.gz: 497f75d8c466cd19c1fc1bda4cafb7f63e721f35dfccc1e63dbe153492e32d58
3
+ metadata.gz: 0d2d1a5483fbd7210ab5f4e9a08697c0ed2d6d1f90975192b9727d36bc4ad71f
4
+ data.tar.gz: 3d412e3b95814a3ac245d9ab46b0fa1dcfd4571b05903f363e5841b1108bb958
5
5
  SHA512:
6
- metadata.gz: cb44269fa17fba004e07bc45e2874bbcb2df562103d9f02f298a443007ee9ad693a4f50588b48f94d7e6b4927fd9ad744a3c3b8e2e61a4104a88b548392f9f40
7
- data.tar.gz: f0759f23d6c2bb368026083eae14727aaca66a7608bd6b3fe39ca0d3adc1b8e3e17c979642352d56a0c2377b396f492c3a9377f6e54249e3ca3e59c2d33369cd
6
+ metadata.gz: c7503cd89d0f30a0517b6ce1022a6aaabf6d66737f16d38b7b1011fa342fab22e5cd3bd658516bf4e3faf784a06235ead91dd654a16f3b21d2df3f864bc00514
7
+ data.tar.gz: b5a3ec55cd38d404c8e6a458668927e3047c932ed8e7723b92fe8a701790ac61f2f81a3eef30e6e2ad457222290435e32856637b1aee8e9a4e141107834364a9
@@ -25,9 +25,14 @@ module MixinBot
25
25
  @client_id = options[:client_id] || MixinBot.client_id
26
26
  @client_secret = options[:client_secret] || MixinBot.client_secret
27
27
  @session_id = options[:session_id] || MixinBot.session_id
28
- @pin_token = Base64.urlsafe_decode64 options[:pin_token] || MixinBot.pin_token
29
28
  @client = Client.new(MixinBot.api_host || 'api.mixin.one')
30
29
  @blaze_host = MixinBot.blaze_host || 'blaze.mixin.one'
30
+ @pin_token =
31
+ begin
32
+ Base64.urlsafe_decode64 options[:pin_token] || MixinBot.pin_token
33
+ rescue StandardError
34
+ ''
35
+ end
31
36
  _private_key = options[:private_key] || MixinBot.private_key
32
37
  @private_key =
33
38
  if /^-----BEGIN RSA PRIVATE KEY-----/.match? _private_key
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-23 00:00:00.000000000 Z
11
+ date: 2020-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print