klaviyo 1.1.0 → 1.2.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
2
  SHA256:
3
- metadata.gz: ed68e4edade34eeb6db1de9bfe4d644b5b22f30a7e81080eb57fd7609ea05222
4
- data.tar.gz: d5152cfa55ca8e4068494037a108bc4a18b9053984ccc32dea09a0510f61a73c
3
+ metadata.gz: 4761ff7c9edac6dd8dec7efd826f0b9a903022ced70b8938d9db3adfdc9f16ac
4
+ data.tar.gz: f9bca9ccb221bf7a30387a60e4fde3f6adba9e814702266fc0b869c5c470046b
5
5
  SHA512:
6
- metadata.gz: 25e22b0c53b0a0d8b7ec4f5c7f2441d093628c098e100a8426b2c7edb48a4f1e4113dede538c8a1883cc49c0a73fc22bc4422c612d6d1ccb635a7ff266c7071b
7
- data.tar.gz: 9be13c509823d4d8c503de3b90c80c516163d0fcbd61d606da5dcc6d2db4818f202a82d924482dcf9a95bc9039bce231a75b6830129f7e694f4ee2d1876a4e87
6
+ metadata.gz: 0da39baf09b301c7df78833d2a9d62bc8f72b2512c06b4c67ca247a863f72d4563512915037ad80aff05168cb41d3830dbec56b3e2bda3605d7a8f1b7826baf4
7
+ data.tar.gz: d555098395599b4e1b9c725f815229949e0c208c00d0b387fcc00ac3071763d5aef830e3cf5316f71e7f84900e950bad27757370ab5a0b810f07a05e519541e0
data/klaviyo.gemspec CHANGED
@@ -2,8 +2,8 @@ files = ['klaviyo.gemspec', '{lib}/**/*'].map {|f| Dir[f]}.flatten
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'klaviyo'
5
- s.version = '1.1.0'
6
- s.date = '2014-09-06'
5
+ s.version = '1.2.0'
6
+ s.date = '2020-09-28'
7
7
  s.summary = 'You heard us, a Ruby wrapper for the Klaviyo API'
8
8
  s.description = 'Ruby wrapper for the Klaviyo API'
9
9
  s.authors = ['Klaviyo Team']
@@ -6,7 +6,10 @@ module Klaviyo
6
6
  class KlaviyoError < StandardError; end
7
7
 
8
8
  class Client
9
- def initialize(api_key, url = 'http://a.klaviyo.com/')
9
+ VERSION = '1.2.0'
10
+ KL_USER_AGENT = "Ruby_Klaviyo/#{VERSION}"
11
+
12
+ def initialize(api_key, url = 'https://a.klaviyo.com/')
10
13
  @api_key = api_key
11
14
  @url = url
12
15
  end
@@ -68,7 +71,7 @@ module Klaviyo
68
71
 
69
72
  def request(path, params)
70
73
  url = "#{@url}#{path}?#{params}"
71
- open(url).read == '1'
74
+ open(url, 'User-Agent' => KL_USER_AGENT).read == '1'
72
75
  end
73
76
  end
74
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klaviyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaviyo Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-06 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json