trak-ruby 0.0.4 → 0.0.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.
- data/VERSION +1 -1
- data/lib/trak.rb +3 -4
- data/trak-ruby.gemspec +1 -1
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
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.5'
|
7
7
|
HEADERS = { 'Content-Type' => 'application/json' }
|
8
8
|
|
9
9
|
attr_accessor :distinct_id, :channel
|
@@ -113,7 +113,7 @@ class Trak
|
|
113
113
|
# @param opts [Hash] options to pass to track call (distinct_id [String], channel [String])
|
114
114
|
# @return [Object]
|
115
115
|
#
|
116
|
-
def page_view(url, page_title, opts = {})
|
116
|
+
def page_view(url, page_title = nil, opts = {})
|
117
117
|
defaults = {
|
118
118
|
:event => 'Page view',
|
119
119
|
:distinct_id => self.distinct_id,
|
@@ -124,8 +124,7 @@ class Trak
|
|
124
124
|
},
|
125
125
|
}
|
126
126
|
opts = defaults.merge opts
|
127
|
-
raise "url" unless url
|
128
|
-
raise "page_title" unless page_title
|
127
|
+
raise "url is required" unless url
|
129
128
|
raise "properties must be a Hash" unless defaults[:properties].kind_of?(Hash)
|
130
129
|
raise "No distinct_id is set." if opts[:distinct_id].nil?
|
131
130
|
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.5'
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ 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: &70210656720760 !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: *70210656720760
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70210653618360 !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: *70210653618360
|
36
36
|
description: trak.io helps you track the metrics that actually matter to your startup
|
37
37
|
email:
|
38
38
|
- bwsewell@gmail.com
|