sift 1.1.4 → 1.1.5
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 +15 -0
- data/LICENSE +19 -0
- data/README.rdoc +1 -1
- data/lib/sift/client.rb +5 -3
- data/lib/sift/version.rb +1 -1
- metadata +6 -19
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
OWIwOGNhOTBlNjNlZmZlOThiNTg2ODMwNjAzYjc2ZDJlZTUxMTc2Yw==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
OWI1ZTAyZmFmNTUxYWRmM2NiZjYyZGQ0YjVmOWUzMTNiMDU5MzU0Nw==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
ZDE2ZjMxY2Q2MWY5MzgzYTE0MjVhZjY3OWFhMTQxZWUwMTE0NDY5ZjI3Njlm
|
|
10
|
+
Yzk1MjA4NmRhNWZmNWVkNDJhOWM1NDVhYWM2NzVlMWY3YTRhZWY0MDYwNjRj
|
|
11
|
+
N2Y3NzJlODgxZjc3ODNjZmU0Yzk3NmQxODQ3YmY3ZTQ2MWNkZjU=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
Yzc4YmFhYzJjMWVjYTcyZmM2NGEzYzQ2NjUyMTY5YWEzZTY3NTU0YjZhYTNh
|
|
14
|
+
Y2UwZDU4MWNiYzRiNTk5NzExMDdiOTU0NDAwYjk5NmQ1MmZkZDg4MGFhN2U4
|
|
15
|
+
OWE1NmRiNDNhYjFlMTM5YjdjMjdlNGE1NjQzZTQ0ZjU1YzY4Yzg=
|
data/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2013 Sift Science
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
data/README.rdoc
CHANGED
data/lib/sift/client.rb
CHANGED
|
@@ -83,6 +83,9 @@ module Sift
|
|
|
83
83
|
# path (optional)
|
|
84
84
|
# Overrides the default API path with a different URL.
|
|
85
85
|
#
|
|
86
|
+
# return_score (optional)
|
|
87
|
+
# Whether the API response should include a score for this user (the score will
|
|
88
|
+
# be calculated using the submitted event
|
|
86
89
|
#
|
|
87
90
|
# == Returns:
|
|
88
91
|
# In the case of an HTTP error (timeout, broken connection, etc.), this
|
|
@@ -90,12 +93,11 @@ module Sift
|
|
|
90
93
|
# the status message and status code. In general, you can ignore the returned
|
|
91
94
|
# result, though.
|
|
92
95
|
#
|
|
93
|
-
def track(event, properties = {}, timeout = nil, path = nil)
|
|
94
|
-
|
|
96
|
+
def track(event, properties = {}, timeout = nil, path = nil, return_score = false)
|
|
95
97
|
raise(RuntimeError, "event must be a string") if event.nil? || event.to_s.empty?
|
|
96
98
|
raise(RuntimeError, "properties cannot be empty") if properties.empty?
|
|
97
|
-
|
|
98
99
|
path ||= @path
|
|
100
|
+
path = path + "?return_score=#{return_score ? "true" : "false"}"
|
|
99
101
|
options = {
|
|
100
102
|
:body => MultiJson.dump(delete_nils(properties).merge({"$type" => event,
|
|
101
103
|
"$api_key" => @api_key}))
|
data/lib/sift/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sift
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 1.1.5
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Fred Sadaghiani
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
11
|
+
date: 2014-05-31 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rspec
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
17
|
- - ~>
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
@@ -22,7 +20,6 @@ dependencies:
|
|
|
22
20
|
type: :development
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
24
|
- - ~>
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
@@ -30,7 +27,6 @@ dependencies:
|
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: webmock
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
31
|
- - ~>
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
@@ -38,7 +34,6 @@ dependencies:
|
|
|
38
34
|
type: :development
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
38
|
- - ~>
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
@@ -46,7 +41,6 @@ dependencies:
|
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
|
47
42
|
name: httparty
|
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
44
|
requirements:
|
|
51
45
|
- - ! '>='
|
|
52
46
|
- !ruby/object:Gem::Version
|
|
@@ -54,7 +48,6 @@ dependencies:
|
|
|
54
48
|
type: :runtime
|
|
55
49
|
prerelease: false
|
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
51
|
requirements:
|
|
59
52
|
- - ! '>='
|
|
60
53
|
- !ruby/object:Gem::Version
|
|
@@ -62,7 +55,6 @@ dependencies:
|
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
|
63
56
|
name: multi_json
|
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
none: false
|
|
66
58
|
requirements:
|
|
67
59
|
- - ~>
|
|
68
60
|
- !ruby/object:Gem::Version
|
|
@@ -70,7 +62,6 @@ dependencies:
|
|
|
70
62
|
type: :runtime
|
|
71
63
|
prerelease: false
|
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
-
none: false
|
|
74
65
|
requirements:
|
|
75
66
|
- - ~>
|
|
76
67
|
- !ruby/object:Gem::Version
|
|
@@ -78,7 +69,6 @@ dependencies:
|
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
|
79
70
|
name: rspec
|
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
|
81
|
-
none: false
|
|
82
72
|
requirements:
|
|
83
73
|
- - ! '>='
|
|
84
74
|
- !ruby/object:Gem::Version
|
|
@@ -86,7 +76,6 @@ dependencies:
|
|
|
86
76
|
type: :development
|
|
87
77
|
prerelease: false
|
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
-
none: false
|
|
90
79
|
requirements:
|
|
91
80
|
- - ! '>='
|
|
92
81
|
- !ruby/object:Gem::Version
|
|
@@ -94,7 +83,6 @@ dependencies:
|
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
|
95
84
|
name: rake
|
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
|
97
|
-
none: false
|
|
98
86
|
requirements:
|
|
99
87
|
- - ! '>='
|
|
100
88
|
- !ruby/object:Gem::Version
|
|
@@ -102,7 +90,6 @@ dependencies:
|
|
|
102
90
|
type: :development
|
|
103
91
|
prerelease: false
|
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
93
|
requirements:
|
|
107
94
|
- - ! '>='
|
|
108
95
|
- !ruby/object:Gem::Version
|
|
@@ -118,6 +105,7 @@ files:
|
|
|
118
105
|
- .travis.yml
|
|
119
106
|
- Gemfile
|
|
120
107
|
- HISTORY
|
|
108
|
+
- LICENSE
|
|
121
109
|
- README.rdoc
|
|
122
110
|
- Rakefile
|
|
123
111
|
- examples/simple.rb
|
|
@@ -132,27 +120,26 @@ files:
|
|
|
132
120
|
- spec/unit/sift_spec.rb
|
|
133
121
|
homepage: http://siftscience.com
|
|
134
122
|
licenses: []
|
|
123
|
+
metadata: {}
|
|
135
124
|
post_install_message:
|
|
136
125
|
rdoc_options: []
|
|
137
126
|
require_paths:
|
|
138
127
|
- lib
|
|
139
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
|
-
none: false
|
|
141
129
|
requirements:
|
|
142
130
|
- - ! '>='
|
|
143
131
|
- !ruby/object:Gem::Version
|
|
144
132
|
version: '0'
|
|
145
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
|
-
none: false
|
|
147
134
|
requirements:
|
|
148
135
|
- - ! '>='
|
|
149
136
|
- !ruby/object:Gem::Version
|
|
150
137
|
version: '0'
|
|
151
138
|
requirements: []
|
|
152
139
|
rubyforge_project: sift
|
|
153
|
-
rubygems_version:
|
|
140
|
+
rubygems_version: 2.0.7
|
|
154
141
|
signing_key:
|
|
155
|
-
specification_version:
|
|
142
|
+
specification_version: 4
|
|
156
143
|
summary: Sift Science Ruby API Gem
|
|
157
144
|
test_files:
|
|
158
145
|
- spec/integration/sift_spec.rb
|