trak-ruby 0.0.3 → 0.0.4
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.
- data/VERSION +1 -1
- data/lib/trak.rb +4 -4
- data/trak-ruby.gemspec +1 -1
- metadata +6 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/trak.rb
CHANGED
@@ -3,7 +3,7 @@ require 'json'
|
|
3
3
|
|
4
4
|
class Trak
|
5
5
|
|
6
|
-
VERSION = '0.0.
|
6
|
+
VERSION = '0.0.4'
|
7
7
|
HEADERS = { 'Content-Type' => 'application/json' }
|
8
8
|
|
9
9
|
attr_accessor :distinct_id, :channel
|
@@ -28,7 +28,7 @@ class Trak
|
|
28
28
|
#
|
29
29
|
def identify(distinct_id, properties = {})
|
30
30
|
raise "distinct_id required" unless distinct_id
|
31
|
-
raise "properties must be a Hash" unless
|
31
|
+
raise "properties must be a Hash" unless properties.kind_of?(Hash)
|
32
32
|
data = {
|
33
33
|
:token => @api_key,
|
34
34
|
:data => {
|
@@ -89,7 +89,7 @@ class Trak
|
|
89
89
|
opts = defaults.merge opts
|
90
90
|
raise "event is required" unless event
|
91
91
|
raise "properties must be a Hash" unless defaults[:properties].kind_of?(Hash)
|
92
|
-
raise "No distinct_id is set.
|
92
|
+
raise "No distinct_id is set." if opts[:distinct_id].nil?
|
93
93
|
data = {
|
94
94
|
:token => @api_key,
|
95
95
|
:data => {
|
@@ -127,7 +127,7 @@ class Trak
|
|
127
127
|
raise "url" unless url
|
128
128
|
raise "page_title" unless page_title
|
129
129
|
raise "properties must be a Hash" unless defaults[:properties].kind_of?(Hash)
|
130
|
-
raise "No distinct_id is set.
|
130
|
+
raise "No distinct_id is set." if opts[:distinct_id].nil?
|
131
131
|
data = {
|
132
132
|
:token => @api_key,
|
133
133
|
:data => {
|
data/trak-ruby.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{trak-ruby}
|
6
|
-
s.version = '0.0.
|
6
|
+
s.version = '0.0.4'
|
7
7
|
s.authors = ["Brian Sewell"]
|
8
8
|
s.email = ["bwsewell@gmail.com"]
|
9
9
|
s.description = %q{trak.io helps you track the metrics that actually matter to your startup}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trak-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70339187146260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.3'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70339187146260
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70339187142600 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70339187142600
|
36
36
|
description: trak.io helps you track the metrics that actually matter to your startup
|
37
37
|
email:
|
38
38
|
- bwsewell@gmail.com
|