ribbon-intercom 0.3.2 → 0.3.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b60c5e11fb7b0324e34f573f6a8687871444aea4
|
4
|
+
data.tar.gz: e975927ed6d46f6d661069e6580dc7eeb747122c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2586c431137eb677a130b492325183fd0c423527c07a21f1811e329abc2fa06bcd0ee4526f131897e50712aa675a412de9182ddd90518518e183b82b406d8037
|
7
|
+
data.tar.gz: a9032fc31b47ac6ffc2313c82ea5ef1adcbecc3e6a45da27a941c17489de9b7eef2df73f8f855317f3c45e117c16d512035a904334c5b47f2db7f7717137b18e
|
@@ -10,8 +10,8 @@ module Ribbon::Intercom
|
|
10
10
|
def initialize(url, token, secret)
|
11
11
|
@url = url.is_a?(String) ? URI(url) : url
|
12
12
|
|
13
|
-
@_client = Net::HTTP.new(url.hostname, url.port)
|
14
|
-
@_client.use_ssl = url.is_a?(URI::HTTPS)
|
13
|
+
@_client = Net::HTTP.new(@url.hostname, @url.port)
|
14
|
+
@_client.use_ssl = @url.is_a?(URI::HTTPS)
|
15
15
|
@_client.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
16
16
|
@_client.cert_store = OpenSSL::X509::Store.new.tap { |s| s.set_default_paths }
|
17
17
|
|
@@ -6,13 +6,17 @@ module Ribbon::Intercom
|
|
6
6
|
attr_reader :connection
|
7
7
|
|
8
8
|
def connect(*args)
|
9
|
-
@
|
9
|
+
@_connection_args = args.dup
|
10
10
|
end
|
11
11
|
|
12
12
|
def connected?
|
13
13
|
!!connection
|
14
14
|
end
|
15
15
|
|
16
|
+
def connection
|
17
|
+
@__connection ||= Connection.new(*@_connection_args)
|
18
|
+
end
|
19
|
+
|
16
20
|
def call!(method_name, encoded_args)
|
17
21
|
response = connection.put(
|
18
22
|
headers: headers.merge("X-Intercom-Method" => method_name),
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ribbon-intercom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Honer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|