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: bb0a4e5f4a54ddd2de6c1019b3ac73fd399d659b
4
- data.tar.gz: 406a96f2009f39430caba54651c146d12f17d520
3
+ metadata.gz: b60c5e11fb7b0324e34f573f6a8687871444aea4
4
+ data.tar.gz: e975927ed6d46f6d661069e6580dc7eeb747122c
5
5
  SHA512:
6
- metadata.gz: cab3a462cad2ff912c36dd2d9be6f6ecc3082cf0def8ed4d2bc134fabddcbab79aefc2db54c0a7541a3df5a645490c9d8bb04276610df7fdbbda9d5e004083e0
7
- data.tar.gz: 59179ead3f6433103affe8fb9204872483092d3ddae0d7725ce3e791bb906bad7583fc94e64c0916fb637571199b8ae82dded27e79854b9f5b2d58c8f524c9f6
6
+ metadata.gz: 2586c431137eb677a130b492325183fd0c423527c07a21f1811e329abc2fa06bcd0ee4526f131897e50712aa675a412de9182ddd90518518e183b82b406d8037
7
+ data.tar.gz: a9032fc31b47ac6ffc2313c82ea5ef1adcbecc3e6a45da27a941c17489de9b7eef2df73f8f855317f3c45e117c16d512035a904334c5b47f2db7f7717137b18e
@@ -25,7 +25,7 @@ module Ribbon::Intercom
25
25
 
26
26
  def dup
27
27
  super.tap { |adapter|
28
- adapter.headers = @headers.dup
28
+ adapter.headers = @headers.dup if @headers
29
29
  }
30
30
  end
31
31
 
@@ -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
- @connection = Connection.new(*args)
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),
@@ -1,5 +1,5 @@
1
1
  module Ribbon
2
2
  module Intercom
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
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.2
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-11 00:00:00.000000000 Z
12
+ date: 2015-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack