line-bot-api 1.2.5 → 1.3.0

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
- SHA1:
3
- metadata.gz: f9683003bef8dc96ef359dcaade4d1ad8f2f6e14
4
- data.tar.gz: 4481ce9e03ca896601419e88db21af9e769aea4b
2
+ SHA256:
3
+ metadata.gz: 6e0107481c67d6f6f360101945ea31fa81311d557abb6553141a14a06144f747
4
+ data.tar.gz: 39c27282633be8b12ba7c7e3b8b4888246042b5a4c3506b9ab0c4a03ebfea683
5
5
  SHA512:
6
- metadata.gz: 51e9826e5b7eda8ce43fcb3a35d14ae7f96ed3e508913b90ff63fce62c40d000b144a148c46044cae7a29bfd3a311332d94e3adfe4f930e9d5d747163466ac1d
7
- data.tar.gz: dcb1313e438eebc55284fef0ad5b62a8e1df401758280745775498d5ac9c4e6e3c1e1ee04b83faf8890b2a5fe7abf1ba17c6e5642c0abc3a7f2a3353b9ba9ef3
6
+ metadata.gz: 16e420b314676e467056e598f2aff9073ddd20e1f1498d260d2ba661e7e1f24394b13bb18cf2da8543633b316e51920e76577b5dc16bc3c90ca914d09f3e2d39
7
+ data.tar.gz: c357c754cd5d06c7c1af231360030bd955305bc830cb9ce2694f21e99f963dc3eb051bc926329f7004a92d95557639f1eba434f89b82bffe6bf40a336841f1ba
@@ -15,7 +15,7 @@
15
15
  module Line
16
16
  module Bot
17
17
  module API
18
- VERSION = "1.2.5"
18
+ VERSION = "1.3.0"
19
19
  end
20
20
  end
21
21
  end
@@ -27,6 +27,9 @@ module Line
27
27
  # @return [Object]
28
28
  attr_accessor :httpclient
29
29
 
30
+ # @return [Hash]
31
+ attr_accessor :http_options
32
+
30
33
  # Initialize a new Bot Client.
31
34
  #
32
35
  # @param options [Hash]
@@ -40,7 +43,7 @@ module Line
40
43
  end
41
44
 
42
45
  def httpclient
43
- @httpclient ||= Line::Bot::HTTPClient.new
46
+ @httpclient ||= Line::Bot::HTTPClient.new(http_options)
44
47
  end
45
48
 
46
49
  def endpoint
@@ -20,6 +20,18 @@ require 'uri'
20
20
  module Line
21
21
  module Bot
22
22
  class HTTPClient
23
+ # @return [Hash]
24
+ attr_accessor :http_options
25
+
26
+ # Initialize a new HTTPClient
27
+ #
28
+ # @param http_options [Hash]
29
+ #
30
+ # @return [Line::Bot::HTTPClient]
31
+ def initialize(http_options = {})
32
+ @http_options = http_options
33
+ end
34
+
23
35
  # @return [Net::HTTP]
24
36
  def http(uri)
25
37
  http = Net::HTTP.new(uri.host, uri.port)
@@ -27,6 +39,12 @@ module Line
27
39
  http.use_ssl = true
28
40
  end
29
41
 
42
+ if http_options
43
+ http_options.each do |key, value|
44
+ http.send("#{key}=", value)
45
+ end
46
+ end
47
+
30
48
  http
31
49
  end
32
50
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line-bot-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LINE Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-02 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.6.13
132
+ rubygems_version: 2.7.6
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: SDK of the LINE Messaging API