trak-ruby 0.0.5 → 0.0.6
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/README.md +1 -1
- data/VERSION +1 -1
- data/lib/trak.rb +7 -3
- data/trak-ruby.gemspec +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -110,7 +110,7 @@ The `track` method will set the class variable `@distinct_id` if you pass it a d
|
|
110
110
|
### Page View
|
111
111
|
|
112
112
|
```ruby
|
113
|
-
Trak.page_view(url, page_title, opts = {})
|
113
|
+
Trak.page_view(url, page_title = nil, opts = {})
|
114
114
|
```
|
115
115
|
|
116
116
|
Page view is just a wrapper for: `Trak.track('Page View')`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
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.6'
|
7
7
|
HEADERS = { 'Content-Type' => 'application/json' }
|
8
8
|
|
9
9
|
attr_accessor :distinct_id, :channel
|
@@ -16,8 +16,12 @@ class Trak
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def execute_request(url, data)
|
19
|
-
|
20
|
-
|
19
|
+
unless defined?(SILENCE) && SILENCE
|
20
|
+
response = @http.post(url, data, HEADERS)
|
21
|
+
JSON.parse(response.body)
|
22
|
+
end
|
23
|
+
rescue
|
24
|
+
# Do something to handle errors
|
21
25
|
end
|
22
26
|
|
23
27
|
# Identify is how you send trak.io properties about a person like Email, Name, Account Type, Age, etc.
|
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.6'
|
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.6
|
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-
|
12
|
+
date: 2013-12-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70225841049820 !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: *70225841049820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70225840267600 !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: *70225840267600
|
36
36
|
description: trak.io helps you track the metrics that actually matter to your startup
|
37
37
|
email:
|
38
38
|
- bwsewell@gmail.com
|