line_liff 0.1.1 → 0.1.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: d4eb3b7dd85a189663f82c5975b6a2aa3cdfa54475d1dc09931d4670e11f3585
4
- data.tar.gz: 97994deeacb66d349f3ad3655e4d326ff08926e8d215721cc18f7d07965bd940
3
+ metadata.gz: e78261aed25412d733c11a08a6397897e1302665fa113b1424ed6abdb29dc56d
4
+ data.tar.gz: 3d3657f375cdc8e80dd260ab6a86e9da8e6981b77f83186ad84682584ee0b8fd
5
5
  SHA512:
6
- metadata.gz: f10c8bfdde78c1ddee969ca1b41ce6ee165ecd26f9ce73eb72a85dfbb4123503c404e34990eaa97d1c52e2d46daecc2b7a02f990150d68324cf7b3ebbc11cc3a
7
- data.tar.gz: 4cbcf2339fff4a6acf3ff2d96d5f789fb8afb3681d465f2bd8098fe7ce2c442304a620e77eb3095fdf330ff1758b2b99c60663c693f3c0696e90cae7d91952fd
6
+ metadata.gz: 4ef17c166000b7278337089ce5bc1c2b3bb8f381e28d5a77d6b96468769b2d35c7efae9bc51dad24380524b06140e53a47b815215b25f7b88691c8120956f45b
7
+ data.tar.gz: 052fe4665a9af0af0e788aee1062c62e21599eceebbfc231c5af66a801aa5d7bb4a5f02096d22c06431eb8b0e24e46ec8acff359848f10560b088fe49bc8e0ba
@@ -1,3 +1,3 @@
1
1
  module LineLiff
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/line_liff.rb CHANGED
@@ -31,17 +31,20 @@ unless Line::Bot::Client.method_defined? :put
31
31
  module Bot
32
32
  class Client
33
33
  def put(endpoint_path, payload = nil)
34
+ if self.class.method_defined? :credentials?
34
35
  raise Line::Bot::API::InvalidCredentialsError, 'Invalidates credentials' unless credentials?
35
-
36
- request = Line::Bot::Request.new do |config|
37
- config.httpclient = httpclient
38
- config.endpoint = endpoint
39
- config.endpoint_path = endpoint_path
40
- config.credentials = credentials
41
- config.payload = payload if payload
42
- end
43
-
44
- request.put
36
+ else
37
+ channel_token_required
38
+ end
39
+ request = Line::Bot::Request.new do |config|
40
+ config.httpclient = httpclient
41
+ config.endpoint = endpoint
42
+ config.endpoint_path = endpoint_path
43
+ config.credentials = credentials
44
+ config.payload = payload if payload
45
+ end
46
+
47
+ request.put
45
48
  end
46
49
  end
47
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line_liff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mosle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-25 00:00:00.000000000 Z
11
+ date: 2019-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler