sift 1.1.7.0 → 1.1.7.2
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 +8 -8
- data/HISTORY +6 -0
- data/lib/sift/client.rb +7 -5
- data/lib/sift/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2IzYmI3MWNkNWUyNTQyY2IyMGI5OGVjYjM2YmRhYjI2N2RjOGRlNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTFhYzU1MGQxYzBiNGQ1Y2ExYzFjZjEzMmM3MzRjZWE1MjUzZGJiNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODk0NjQ2MzU5MTIzMGUzY2ZiMDMyYmM2MDc1N2U5N2ZjMmZkODMxMTg3NjBl
|
10
|
+
Y2Q3ZTc3YmY1OGI0MWE4ZDQxZGNiODkyMjU1Yjg4YmZkMTgwYjg2NmI0MGVk
|
11
|
+
ZDQ0M2M3Zjc3MjliZGE0NzUzNTU4YmI2OGFkNDlhYmRhNmFiYTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGJmZmYxZDgwNjZmMjQ2OTg4ZWVlZjIwZDVjNDFiOWYyYjAzNmViZTYxYWEz
|
14
|
+
ZjQyNjhhZDViNzA4N2M1NzIxNmRjNGRiYjkwNzM1NTE2MDEyZGZiZGNiMzM3
|
15
|
+
Y2ZlMDE0NzhmN2Q5NTg3NzRjZTYzODAyMGNiNGIyYzU4NWU0ZTQ=
|
data/HISTORY
CHANGED
data/lib/sift/client.rb
CHANGED
@@ -21,7 +21,7 @@ module Sift
|
|
21
21
|
# a JSON object that can be decoded into status, message and request
|
22
22
|
# sections.
|
23
23
|
#
|
24
|
-
def initialize(http_response,
|
24
|
+
def initialize(http_response, http_response_code, http_raw_response)
|
25
25
|
@http_status_code = http_response_code
|
26
26
|
@http_raw_response = http_raw_response
|
27
27
|
|
@@ -122,7 +122,9 @@ module Sift
|
|
122
122
|
#
|
123
123
|
# return_score (optional)
|
124
124
|
# Whether the API response should include a score for this user (the score will
|
125
|
-
# be calculated using the submitted event
|
125
|
+
# be calculated using the submitted event. This feature must be
|
126
|
+
# enabled for your account in order to use it. Please contact
|
127
|
+
# support@siftscience.com if you are interested in using this feature.
|
126
128
|
#
|
127
129
|
# == Returns:
|
128
130
|
# In the case of an HTTP error (timeout, broken connection, etc.), this
|
@@ -147,7 +149,7 @@ module Sift
|
|
147
149
|
options.merge!(:timeout => timeout) unless timeout.nil?
|
148
150
|
begin
|
149
151
|
response = self.class.post(path, options)
|
150
|
-
Response.new(response.body, response.
|
152
|
+
Response.new(response.body, response.code, response.response)
|
151
153
|
rescue StandardError => e
|
152
154
|
Sift.warn("Failed to track event: " + e.to_s)
|
153
155
|
Sift.warn(e.backtrace)
|
@@ -177,7 +179,7 @@ module Sift
|
|
177
179
|
options.merge!(:timeout => timeout) unless timeout.nil?
|
178
180
|
|
179
181
|
response = self.class.get("/v#{API_VERSION}/score/#{user_id}/?api_key=#{api_key}", options)
|
180
|
-
Response.new(response.body, response.
|
182
|
+
Response.new(response.body, response.code, response.response)
|
181
183
|
|
182
184
|
end
|
183
185
|
|
@@ -231,7 +233,7 @@ module Sift
|
|
231
233
|
options.merge!(:timeout => timeout) unless timeout.nil?
|
232
234
|
path = Sift.current_users_label_api_path(user_id)
|
233
235
|
response = self.class.delete(path + "?api_key=#{@api_key}", options)
|
234
|
-
Response.new(response.body, response.
|
236
|
+
Response.new(response.body, response.code, response.response)
|
235
237
|
end
|
236
238
|
|
237
239
|
private
|
data/lib/sift/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.7.
|
4
|
+
version: 1.1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Sadaghiani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|