button 2.2.0 → 2.3.0

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
  SHA1:
3
- metadata.gz: e480304741478a2d317831ace7b121e1432430ec
4
- data.tar.gz: 86b680b7cd66e1409ff691b2f045cc6a4a62419d
3
+ metadata.gz: 61d27733d5ecb2d4779f291f82fbb0906468b6af
4
+ data.tar.gz: 770aa00ad2c627ac5cbbfe9feb15376096e52375
5
5
  SHA512:
6
- metadata.gz: bf29031a04f3dccafa98dcaa330f1f63a2075824f4754dc94ab585e645f4b65bb25fec33761de3a1e693c783ecfd7cc0b6ef6e2b57b854d5d320b0ee930cf22a
7
- data.tar.gz: 1c1b920efe6e4bdc23adb08030825ff1b2c21c7e911647419b9dc468258192afb38520cf5f258ebebe97a3a1ce819ab9eca0321653d0ec1645a08aea9c6858c7
6
+ metadata.gz: 2709f2d4a60695476ec904937dfbd86e27f8c02a055a01761eb4efa4fbf976514f812f94c305a0c38c148522c0a98096235d7969b974768dc90b15df218d1e64
7
+ data.tar.gz: 502473e5e71c8c8c45c4d7db6c5ad011303dabcd0017c4adf345f1ae48525e88ef562a029a8daeadf77e7dc86334a34eedac705072b9fc769889a7881acc74fc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ Current Version
2
+ -
3
+
4
+ 2.3.0 June 22, 2017
5
+ - Add api_version to Client config
6
+
1
7
  2.2.0 March 29, 2017
2
8
  - Add GET support for `Customers` resource
3
9
 
data/lib/button/client.rb CHANGED
@@ -39,7 +39,8 @@ module Button
39
39
  secure: secure,
40
40
  timeout: config.fetch(:timeout, nil),
41
41
  hostname: config.fetch(:hostname, 'api.usebutton.com'),
42
- port: config.fetch(:port, secure ? 443 : 80)
42
+ port: config.fetch(:port, secure ? 443 : 80),
43
+ api_version: config.fetch(:api_version, nil)
43
44
  }
44
45
  end
45
46
 
@@ -76,6 +76,10 @@ module Button
76
76
  request.basic_auth(@api_key, '')
77
77
  request['User-Agent'] = USER_AGENT
78
78
 
79
+ unless @config[:api_version].nil?
80
+ request['X-Button-API-Version'] = @config[:api_version]
81
+ end
82
+
79
83
  if !body.nil? && body.respond_to?(:to_json)
80
84
  request['Content-Type'] = 'application/json'
81
85
  request.body = body.to_json
@@ -1,3 +1,3 @@
1
1
  module Button
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '2.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: button
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Button
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-30 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Button is a contextual acquisition channel and closed-loop attribution
14
14
  and affiliation system for mobile commerce.