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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/button/client.rb +2 -1
- data/lib/button/resources/resource.rb +4 -0
- data/lib/button/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61d27733d5ecb2d4779f291f82fbb0906468b6af
|
4
|
+
data.tar.gz: 770aa00ad2c627ac5cbbfe9feb15376096e52375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2709f2d4a60695476ec904937dfbd86e27f8c02a055a01761eb4efa4fbf976514f812f94c305a0c38c148522c0a98096235d7969b974768dc90b15df218d1e64
|
7
|
+
data.tar.gz: 502473e5e71c8c8c45c4d7db6c5ad011303dabcd0017c4adf345f1ae48525e88ef562a029a8daeadf77e7dc86334a34eedac705072b9fc769889a7881acc74fc
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/button/version.rb
CHANGED
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.
|
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-
|
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.
|