smartsend-ruby 0.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd44755c68468afb9cd1f69b71dcb6e58d165bae78139372fe7e4bf973a48b0c
4
- data.tar.gz: 13470b8e487cb9987ebb04d736bbea860999ecf1835afa8b04c606ad0c3dc2f6
3
+ metadata.gz: 56f48dacc875c60fec85b99ce459499d94b59ac1c7f70dd3fc9cd2d2187063ba
4
+ data.tar.gz: 435baa32e16f05e2d70edb60398b402be38f386f61ac859c7de61ab5e522fce7
5
5
  SHA512:
6
- metadata.gz: 04170b4f36833aa17340d47066238b12e5203b95a0ade34d801706ee34d0e528b4622df2d312326e4dd565a87f1163585475d60be5465abd887fb56b3972ef7b
7
- data.tar.gz: '08f8ba3a9f05d1bb74dacdb24bb913643e6679ee518613092cee91fd8fc3fed96c6af345a3236dc28fd4be96293f416e0274fa0c9bd4e96ad3e3718a0919219b'
6
+ metadata.gz: 3c4776a022ae3079fae3fd01d6a638f6c3749f7a1cd25d62104707b204a2b9fb49e9172d874025ebae324c15d0ca981f44f7e9b37e62673683f61153f5d1e390
7
+ data.tar.gz: 9b20ea69f03947937fb0deb5434090ba6687893e056559915429cc8ea560e94dbd204f83745c2caf4ecb71f567acda1fd6ef0db4a3142abb426997c9a1080ebf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smartsend-ruby (0.1.1)
4
+ smartsend-ruby (0.3)
5
5
  http (~> 2.2)
6
6
 
7
7
  GEM
@@ -9,7 +9,6 @@ GEM
9
9
  specs:
10
10
  addressable (2.5.2)
11
11
  public_suffix (>= 2.0.2, < 4.0)
12
- coderay (1.1.2)
13
12
  domain_name (0.5.20170404)
14
13
  unf (>= 0.0.5, < 1.0.0)
15
14
  http (2.2.2)
@@ -21,20 +20,15 @@ GEM
21
20
  domain_name (~> 0.5)
22
21
  http-form_data (1.0.3)
23
22
  http_parser.rb (0.6.0)
24
- method_source (0.9.0)
25
- pry (0.11.3)
26
- coderay (~> 1.1.0)
27
- method_source (~> 0.9.0)
28
- public_suffix (3.0.1)
23
+ public_suffix (3.0.2)
29
24
  unf (0.1.4)
30
25
  unf_ext
31
- unf_ext (0.0.7.4)
26
+ unf_ext (0.0.7.5)
32
27
 
33
28
  PLATFORMS
34
29
  ruby
35
30
 
36
31
  DEPENDENCIES
37
- pry
38
32
  smartsend-ruby!
39
33
 
40
34
  BUNDLED WITH
@@ -1,8 +1,10 @@
1
1
  class Smartsend::Account
2
2
  attr_accessor :api_token
3
+ attr_accessor :referer
3
4
 
4
- def initialize(api_token:)
5
+ def initialize(api_token:, referer: nil)
5
6
  @api_token = api_token
7
+ @referer = referer
6
8
  end
7
9
 
8
10
  def valid?
@@ -82,7 +82,9 @@ class Smartsend::Client
82
82
  raise Smartsend::MissingConfigError, 'Missing api_token' if @account.api_token.nil?
83
83
 
84
84
  HTTP.headers({
85
- accept: 'application/json'
85
+ accept: 'application/json',
86
+ user_agent: "Shopify/#{Smartsend::VERSION}",
87
+ referer: @account.referer
86
88
  })
87
89
  end
88
90
 
@@ -1,3 +1,3 @@
1
1
  module Smartsend
2
- VERSION = "0.3"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartsend-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aske Hansen