mixin_bot 0.3.6 → 0.3.7

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: bec70596fc9cd40814bcdfd8693573173472db142523131f44c28057f7eae2dd
4
- data.tar.gz: 52ddbfa9ab68e4340b39c8299383dadf82e14b4ce8dee3c1fd785b5843ac6672
3
+ metadata.gz: ed2fac4118078dffd141f4147ffd7dfea3bc529180cea2a6136622ceafe1b70b
4
+ data.tar.gz: cd147227f703ecb292819e137cf6c625563bb339fc7da996a2adbc1db0cc466a
5
5
  SHA512:
6
- metadata.gz: bdf202a7fad3fd4e6101288a0fd821b45f9945047ef03e01177dd72942f7c94af225be54e12ff6a7f1fc092d9939e0defcd8e5d6eba2c7b8b683d510ef486ab5
7
- data.tar.gz: 2058403228454b3b1f4764a7a4ea4756e463648650ee9bfabd12073fe88465eb3d7b478a3583cd4e73f829ef60605e8952aff56a706922b19beb00554d2cfbd6
6
+ metadata.gz: 982f3caa95756397116ea9c3a559f574dc1881be80325d02961c2f8f62943273726714d54f5bf019d4d599be31f8200637822b5f0229a0857253e62add6f69ce
7
+ data.tar.gz: 2f433ee6e767e1c8a3176f55c8806687dbae560cc4376ca9f2b110644fe444976a209e81f9dab475a1ed28068ac351ca17706e3581cea82784636767a50888d0
@@ -6,7 +6,7 @@ module MixinBot
6
6
  def add_favorite_app(app_id, access_token: nil)
7
7
  path = format('/apps/%<id>s/favorite', id: app_id)
8
8
 
9
- access_token ||= access_token('POST', path, {})
9
+ access_token ||= access_token('POST', path)
10
10
  authorization = format('Bearer %<access_token>s', access_token: access_token)
11
11
  client.post(path, headers: { 'Authorization': authorization })
12
12
  end
@@ -14,7 +14,7 @@ module MixinBot
14
14
  def remove_favorite_app(app_id, access_token: nil)
15
15
  path = format('/apps/%<id>s/unfavorite', id: app_id)
16
16
 
17
- access_token ||= access_token('POST', path, '')
17
+ access_token ||= access_token('POST', path)
18
18
  authorization = format('Bearer %<access_token>s', access_token: access_token)
19
19
  client.post(path, headers: { 'Authorization': authorization })
20
20
  end
@@ -4,7 +4,7 @@ module MixinBot
4
4
  class API
5
5
  module Auth
6
6
  def access_token(method, uri, body = '', exp_in: 600, scp: 'FULL')
7
- sig = Digest::SHA256.hexdigest(method + uri + body)
7
+ sig = Digest::SHA256.hexdigest(method + uri + body.to_s)
8
8
  iat = Time.now.utc.to_i
9
9
  exp = (Time.now.utc + exp_in).to_i
10
10
  jti = SecureRandom.uuid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.3.6'
4
+ VERSION = '0.3.7'
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.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print