parallel588-klaviyo 0.14.0 → 0.14.1

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: 180ccc855074b9f9b620f6012690434df51448ff
4
- data.tar.gz: a1a1f599103bb198b839d9c597f2c311758b111a
3
+ metadata.gz: fd713893e13f58338e0f9df2ce566100a3e84259
4
+ data.tar.gz: 9a995f974fe74f0d2d739ffc02b65b1b62967dcd
5
5
  SHA512:
6
- metadata.gz: 4319183edca312fa17843952ab850fb14e442219640bc2f7134cda2abc67bbb2fc05c3777de3b9583c0ddd3255c995a1bdd5df8c3f3ce23a6fed7d94275fe70f
7
- data.tar.gz: 22678a0253700b040ed3b62f361f3b3e852b8746283fe22fde8becda02e92de0c9d13c9aee20a3d961aed71819911cb0906f2d45913cd18b0bddbf3cdb28c958
6
+ metadata.gz: 5c1c6715230ff4946a7f7f61098185bdcc5b3b280efc065ee0c4673e794fc4db4036ae2b3170493d6f762a783e48fe3aaaa2a153ee4d43c91add00e401e4f1e9
7
+ data.tar.gz: e433a34bb5a90b7dbb8068ee5bf6dea16b176c8c56745f8bfa1e4540bd403aedd942d1a10a0c519bc0a751eb416d1caf6b07108212d2f5714fab5887398344e2
@@ -7,18 +7,13 @@ module Klaviyo
7
7
  extend ClientDSL
8
8
 
9
9
  attr_reader :api_key, :conn, :token
10
- def initialize(api_key, token)
10
+ def initialize(api_key, token, req_options = {})
11
11
  @api_key = api_key
12
12
  @token = token
13
-
14
13
  raise Errors::AuthenticationError, 'No API key provided.' unless @api_key
15
14
  raise Errors::AuthenticationError, 'No Token provided.' unless @token
16
15
 
17
-
18
- @conn = Faraday.new(
19
- url: API_ENDPOINT,
20
- ssl: { ca_path: Klaviyo::DEFAULT_CA_BUNDLE_PATH }
21
- ) do |f|
16
+ @conn = Faraday.new(default_req_options.merge(req_options)) do |f|
22
17
  f.headers['Accept'] = 'application/json'
23
18
  f.request :url_encoded
24
19
  f.response :logger
@@ -79,6 +74,13 @@ module Klaviyo
79
74
 
80
75
  private
81
76
 
77
+ def default_req_options
78
+ {
79
+ url: API_ENDPOINT,
80
+ ssl: { ca_path: Klaviyo::DEFAULT_CA_BUNDLE_PATH }
81
+ }
82
+ end
83
+
82
84
  def constantize(class_name)
83
85
  Object.module_eval(
84
86
  class_name.to_s.gsub(/\/(.?)/) {
@@ -1,3 +1,3 @@
1
1
  module Klaviyo
2
- VERSION = "0.14.0"
2
+ VERSION = "0.14.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel588-klaviyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Pechnikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-01 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus