staccato 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/lib/staccato.rb +23 -0
- data/lib/staccato/event.rb +16 -0
- data/lib/staccato/exception.rb +19 -0
- data/lib/staccato/hit.rb +41 -0
- data/lib/staccato/pageview.rb +15 -0
- data/lib/staccato/social.rb +15 -0
- data/lib/staccato/tracker.rb +32 -0
- data/lib/staccato/version.rb +3 -0
- data/spec/integration/tracker_spec.rb +96 -0
- data/spec/lib/stacatto_spec.rb +21 -0
- data/spec/lib/staccato/event_spec.rb +87 -0
- data/spec/lib/staccato/pageview_spec.rb +78 -0
- data/spec/lib/staccato/tracker_spec.rb +45 -0
- data/spec/spec_helper.rb +22 -0
- data/staccato.gemspec +28 -0
- metadata +154 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
File without changes
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Tony Pitale
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Staccato
|
2
|
+
|
3
|
+
Ruby Google Analytics Measurement
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'staccato'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install staccato
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
tracker = Staccato.tracker('UA-XXXX-Y') # REQUIRED, your Google Analytics Tracking ID
|
22
|
+
|
23
|
+
`#tracker` optionally takes a second param for the `client_id` value
|
24
|
+
By default, the `client_id` is set to a random UUID with `SecureRandom.uuid`
|
25
|
+
|
26
|
+
# Track a Pageview (all values optional)
|
27
|
+
tracker.pageview(path: '/page-path', hostname: 'mysite.com', title: 'A Page!')
|
28
|
+
|
29
|
+
# Track an Event (all values optional)
|
30
|
+
tracker.event(category: 'video', action: 'play', label: 'cars', value: 1)
|
31
|
+
|
32
|
+
# Track social activity (all values REQUIRED)
|
33
|
+
tracker.social(action: 'like', network: 'facebook', target: '/something')
|
34
|
+
|
35
|
+
# Track exceptions (all values optional)
|
36
|
+
tracker.exception(description: 'RuntimeException', fatal: true)
|
37
|
+
|
38
|
+
## Google Documentation
|
39
|
+
|
40
|
+
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
|
41
|
+
https://developers.google.com/analytics/devguides/collection/protocol/v1/reference
|
42
|
+
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
1. Fork it
|
47
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
48
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
49
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
50
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/lib/staccato.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'net/http'
|
3
|
+
require 'forwardable'
|
4
|
+
require 'securerandom'
|
5
|
+
|
6
|
+
require "staccato/version"
|
7
|
+
|
8
|
+
module Staccato
|
9
|
+
def self.tracker(id, client_id = nil)
|
10
|
+
Staccato::Tracker.new(id, client_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.tracking_uri
|
14
|
+
URI('http://www.')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
require 'staccato/hit'
|
19
|
+
require 'staccato/pageview'
|
20
|
+
require 'staccato/event'
|
21
|
+
require 'staccato/social'
|
22
|
+
require 'staccato/exception'
|
23
|
+
require 'staccato/tracker'
|
data/lib/staccato/hit.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
module Staccato
|
2
|
+
module Hit
|
3
|
+
def self.included(model)
|
4
|
+
model.extend Forwardable
|
5
|
+
|
6
|
+
model.class_eval do
|
7
|
+
attr_accessor :tracker, :options
|
8
|
+
|
9
|
+
def_delegators :@options, *model::FIELDS.keys
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(tracker, options = {})
|
14
|
+
self.tracker = tracker
|
15
|
+
self.options = OpenStruct.new(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
def fields
|
19
|
+
self.class::FIELDS
|
20
|
+
end
|
21
|
+
|
22
|
+
def params
|
23
|
+
{
|
24
|
+
'v' => 1,
|
25
|
+
'tid' => tracker.id,
|
26
|
+
'cid' => tracker.client_id,
|
27
|
+
't' => type.to_s
|
28
|
+
}.merge(Hash[
|
29
|
+
fields.map {|field,key| [key, options[field]]}
|
30
|
+
]).reject {|_,v| v.nil?}
|
31
|
+
end
|
32
|
+
|
33
|
+
def track!
|
34
|
+
post(Staccato.tracking_uri, params)
|
35
|
+
end
|
36
|
+
|
37
|
+
def post(uri, params = {})
|
38
|
+
Net::HTTP.post_form(uri, params)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Staccato
|
2
|
+
class Tracker
|
3
|
+
def initialize(id, client_id = nil)
|
4
|
+
@id = id
|
5
|
+
@client_id = client_id
|
6
|
+
end
|
7
|
+
|
8
|
+
def id
|
9
|
+
@id
|
10
|
+
end
|
11
|
+
|
12
|
+
def client_id
|
13
|
+
@client_id ||= SecureRandom.uuid
|
14
|
+
end
|
15
|
+
|
16
|
+
def pageview(options = {})
|
17
|
+
Staccato::Pageview.new(self, options).track!
|
18
|
+
end
|
19
|
+
|
20
|
+
def event(options = {})
|
21
|
+
Staccato::Event.new(self, options).track!
|
22
|
+
end
|
23
|
+
|
24
|
+
def social(options = {})
|
25
|
+
Staccato::Social.new(self, options).track!
|
26
|
+
end
|
27
|
+
|
28
|
+
def exception(options = {})
|
29
|
+
Staccato::Exception.new(self, options).track!
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Staccato::Tracker do
|
4
|
+
let(:uri) {Staccato.tracking_uri}
|
5
|
+
let(:tracker) {Staccato.tracker('UA-XXXX-Y')}
|
6
|
+
let(:response) {stub(:body => '', :status => 201)}
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
SecureRandom.stubs(:uuid).returns('555')
|
10
|
+
Net::HTTP.stubs(:post_form).returns(response)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "#pageview" do
|
14
|
+
before(:each) do
|
15
|
+
tracker.pageview(path: '/foobar', title: 'FooBar', hostname: 'mysite.com')
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'tracks page path and page title' do
|
19
|
+
Net::HTTP.should have_received(:post_form).with(uri, {
|
20
|
+
'v' => 1,
|
21
|
+
'tid' => 'UA-XXXX-Y',
|
22
|
+
'cid' => '555',
|
23
|
+
't' => 'pageview',
|
24
|
+
'dh' => 'mysite.com',
|
25
|
+
'dp' => '/foobar',
|
26
|
+
'dt' => 'FooBar'
|
27
|
+
})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "#event" do
|
32
|
+
before(:each) do
|
33
|
+
tracker.event({
|
34
|
+
category: 'video',
|
35
|
+
action: 'play',
|
36
|
+
label: 'cars',
|
37
|
+
value: 1
|
38
|
+
})
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'tracks event category, action, label, value' do
|
42
|
+
Net::HTTP.should have_received(:post_form).with(uri, {
|
43
|
+
'v' => 1,
|
44
|
+
'tid' => 'UA-XXXX-Y',
|
45
|
+
'cid' => '555',
|
46
|
+
't' => 'event',
|
47
|
+
'ec' => 'video',
|
48
|
+
'ea' => 'play',
|
49
|
+
'el' => 'cars',
|
50
|
+
'ev' => 1
|
51
|
+
})
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#social" do
|
56
|
+
before(:each) do
|
57
|
+
tracker.social({
|
58
|
+
action: 'like',
|
59
|
+
network: 'facebook',
|
60
|
+
target: '/blog'
|
61
|
+
})
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'tracks social action, network, target' do
|
65
|
+
Net::HTTP.should have_received(:post_form).with(uri, {
|
66
|
+
'v' => 1,
|
67
|
+
'tid' => 'UA-XXXX-Y',
|
68
|
+
'cid' => '555',
|
69
|
+
't' => 'social',
|
70
|
+
'sa' => 'like',
|
71
|
+
'sn' => 'facebook',
|
72
|
+
'st' => '/blog'
|
73
|
+
})
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "#exception" do
|
78
|
+
before(:each) do
|
79
|
+
tracker.exception({
|
80
|
+
description: 'RuntimeException',
|
81
|
+
fatal: true
|
82
|
+
})
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'tracks social action, network, target' do
|
86
|
+
Net::HTTP.should have_received(:post_form).with(uri, {
|
87
|
+
'v' => 1,
|
88
|
+
'tid' => 'UA-XXXX-Y',
|
89
|
+
'cid' => '555',
|
90
|
+
't' => 'exception',
|
91
|
+
'exd' => 'RuntimeException',
|
92
|
+
'exf' => 1
|
93
|
+
})
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Staccato do
|
4
|
+
|
5
|
+
context 'configuring a tracker' do
|
6
|
+
|
7
|
+
let(:tracker) {Staccato.tracker 'UA-XXXX-Y'}
|
8
|
+
|
9
|
+
it 'has an assigned id' do
|
10
|
+
tracker.id.should eq('UA-XXXX-Y')
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'uses a uuid for the client_id' do
|
14
|
+
SecureRandom.stubs(:uuid).returns("a-uuid")
|
15
|
+
|
16
|
+
tracker.client_id.should eq('a-uuid')
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Staccato::Event do
|
4
|
+
|
5
|
+
let(:tracker) {Staccato.tracker('UA-XXXX-Y', '555')}
|
6
|
+
|
7
|
+
context "with all options" do
|
8
|
+
let(:event) do
|
9
|
+
Staccato::Event.new(tracker, {
|
10
|
+
:category => 'video',
|
11
|
+
:action => 'play',
|
12
|
+
:label => 'cars',
|
13
|
+
:value => 12
|
14
|
+
})
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'has a category' do
|
18
|
+
event.category.should eq('video')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'has a action' do
|
22
|
+
event.action.should eq('play')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'has a label' do
|
26
|
+
event.label.should eq('cars')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'has a value' do
|
30
|
+
event.value.should eq(12)
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'has all params' do
|
34
|
+
event.params.should eq({
|
35
|
+
'v' => 1,
|
36
|
+
'tid' => 'UA-XXXX-Y',
|
37
|
+
'cid' => '555',
|
38
|
+
't' => 'event',
|
39
|
+
'ec' => 'video',
|
40
|
+
'ea' => 'play',
|
41
|
+
'el' => 'cars',
|
42
|
+
'ev' => 12
|
43
|
+
})
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context "with extra options" do
|
48
|
+
let(:event) do
|
49
|
+
Staccato::Event.new(tracker, {
|
50
|
+
:category => 'video',
|
51
|
+
:action => 'play',
|
52
|
+
:label => 'cars',
|
53
|
+
:value => 12,
|
54
|
+
:hostname => 'mysite.com',
|
55
|
+
:path => '/foobar'
|
56
|
+
})
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'has all params' do
|
60
|
+
event.params.should eq({
|
61
|
+
'v' => 1,
|
62
|
+
'tid' => 'UA-XXXX-Y',
|
63
|
+
'cid' => '555',
|
64
|
+
't' => 'event',
|
65
|
+
'ec' => 'video',
|
66
|
+
'ea' => 'play',
|
67
|
+
'el' => 'cars',
|
68
|
+
'ev' => 12
|
69
|
+
})
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context "with no options" do
|
74
|
+
let(:event) do
|
75
|
+
Staccato::Event.new(tracker, {})
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'has require params' do
|
79
|
+
event.params.should eq({
|
80
|
+
'v' => 1,
|
81
|
+
'tid' => 'UA-XXXX-Y',
|
82
|
+
'cid' => '555',
|
83
|
+
't' => 'event'
|
84
|
+
})
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Staccato::Pageview do
|
4
|
+
|
5
|
+
let(:tracker) {Staccato.tracker('UA-XXXX-Y', '555')}
|
6
|
+
|
7
|
+
context "with all options" do
|
8
|
+
let(:pageview) do
|
9
|
+
Staccato::Pageview.new(tracker, {
|
10
|
+
:hostname => 'mysite.com',
|
11
|
+
:path => '/foobar',
|
12
|
+
:title => 'FooBar'
|
13
|
+
})
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'has a hostname' do
|
17
|
+
pageview.hostname.should eq('mysite.com')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'has a path' do
|
21
|
+
pageview.path.should eq('/foobar')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'has a title' do
|
25
|
+
pageview.title.should eq('FooBar')
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'has all params' do
|
29
|
+
pageview.params.should eq({
|
30
|
+
'v' => 1,
|
31
|
+
'tid' => 'UA-XXXX-Y',
|
32
|
+
'cid' => '555',
|
33
|
+
't' => 'pageview',
|
34
|
+
'dh' => 'mysite.com',
|
35
|
+
'dp' => '/foobar',
|
36
|
+
'dt' => 'FooBar'
|
37
|
+
})
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with extra options" do
|
42
|
+
let(:pageview) do
|
43
|
+
Staccato::Pageview.new(tracker, {
|
44
|
+
:hostname => 'mysite.com',
|
45
|
+
:path => '/foobar',
|
46
|
+
:title => 'FooBar',
|
47
|
+
:action => 'play'
|
48
|
+
})
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'has all params' do
|
52
|
+
pageview.params.should eq({
|
53
|
+
'v' => 1,
|
54
|
+
'tid' => 'UA-XXXX-Y',
|
55
|
+
'cid' => '555',
|
56
|
+
't' => 'pageview',
|
57
|
+
'dh' => 'mysite.com',
|
58
|
+
'dp' => '/foobar',
|
59
|
+
'dt' => 'FooBar'
|
60
|
+
})
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
context "with no options" do
|
65
|
+
let(:pageview) do
|
66
|
+
Staccato::Pageview.new(tracker, {})
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'has require params' do
|
70
|
+
pageview.params.should eq({
|
71
|
+
'v' => 1,
|
72
|
+
'tid' => 'UA-XXXX-Y',
|
73
|
+
'cid' => '555',
|
74
|
+
't' => 'pageview'
|
75
|
+
})
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Staccato::Tracker do
|
4
|
+
|
5
|
+
let(:tracker) {Staccato.tracker('UA-XXXX-Y')}
|
6
|
+
|
7
|
+
context "#pageview" do
|
8
|
+
let(:pageview) {Staccato::Pageview.new(tracker, {})}
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
pageview.stubs(:track!)
|
12
|
+
Staccato::Pageview.stubs(:new).returns(pageview)
|
13
|
+
|
14
|
+
tracker.pageview(path: '/foobar')
|
15
|
+
end
|
16
|
+
|
17
|
+
it "creates a new Pageview" do
|
18
|
+
Staccato::Pageview.should have_received(:new).with(tracker, path: '/foobar')
|
19
|
+
end
|
20
|
+
|
21
|
+
it "tracks on the Pageview" do
|
22
|
+
pageview.should have_received(:track!)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "#event" do
|
27
|
+
let(:event) {Staccato::Event.new(tracker, {})}
|
28
|
+
|
29
|
+
before(:each) do
|
30
|
+
event.stubs(:track!)
|
31
|
+
Staccato::Event.stubs(:new).returns(event)
|
32
|
+
|
33
|
+
tracker.event(category: 'video', action: 'play')
|
34
|
+
end
|
35
|
+
|
36
|
+
it "creates a new Event" do
|
37
|
+
Staccato::Event.should have_received(:new).with(tracker, category: 'video', action: 'play')
|
38
|
+
end
|
39
|
+
|
40
|
+
it "tracks on the Event" do
|
41
|
+
event.should have_received(:track!)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
|
3
|
+
require 'rspec'
|
4
|
+
require 'mocha/api'
|
5
|
+
require 'bourne'
|
6
|
+
|
7
|
+
require File.expand_path('../../lib/staccato', __FILE__)
|
8
|
+
|
9
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.mock_with :mocha
|
12
|
+
|
13
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
14
|
+
config.run_all_when_everything_filtered = true
|
15
|
+
config.filter_run :focus
|
16
|
+
|
17
|
+
# Run specs in random order to surface order dependencies. If you find an
|
18
|
+
# order dependency and want to debug it, you can fix the order by providing
|
19
|
+
# the seed, which is printed after each run.
|
20
|
+
# --seed 1234
|
21
|
+
config.order = 'random'
|
22
|
+
end
|
data/staccato.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'staccato/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "staccato"
|
8
|
+
spec.version = Staccato::VERSION
|
9
|
+
spec.authors = ["Tony Pitale"]
|
10
|
+
spec.email = ["tpitale@gmail.com"]
|
11
|
+
spec.description = "Ruby Google Analytics Measurement"
|
12
|
+
spec.summary = "Ruby Google Analytics Measurement"
|
13
|
+
spec.homepage = "https://github.com/tpitale/staccato"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "mocha"
|
25
|
+
spec.add_development_dependency "bourne"
|
26
|
+
|
27
|
+
# spec.add_runtime_dependency "uuid"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: staccato
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tony Pitale
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-08-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: mocha
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: bourne
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: Ruby Google Analytics Measurement
|
95
|
+
email:
|
96
|
+
- tpitale@gmail.com
|
97
|
+
executables: []
|
98
|
+
extensions: []
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
101
|
+
- .gitignore
|
102
|
+
- .rspec
|
103
|
+
- CHANGELOG.md
|
104
|
+
- Gemfile
|
105
|
+
- LICENSE.txt
|
106
|
+
- README.md
|
107
|
+
- Rakefile
|
108
|
+
- lib/staccato.rb
|
109
|
+
- lib/staccato/event.rb
|
110
|
+
- lib/staccato/exception.rb
|
111
|
+
- lib/staccato/hit.rb
|
112
|
+
- lib/staccato/pageview.rb
|
113
|
+
- lib/staccato/social.rb
|
114
|
+
- lib/staccato/tracker.rb
|
115
|
+
- lib/staccato/version.rb
|
116
|
+
- spec/integration/tracker_spec.rb
|
117
|
+
- spec/lib/stacatto_spec.rb
|
118
|
+
- spec/lib/staccato/event_spec.rb
|
119
|
+
- spec/lib/staccato/pageview_spec.rb
|
120
|
+
- spec/lib/staccato/tracker_spec.rb
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
- staccato.gemspec
|
123
|
+
homepage: https://github.com/tpitale/staccato
|
124
|
+
licenses:
|
125
|
+
- MIT
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 1.8.23
|
145
|
+
signing_key:
|
146
|
+
specification_version: 3
|
147
|
+
summary: Ruby Google Analytics Measurement
|
148
|
+
test_files:
|
149
|
+
- spec/integration/tracker_spec.rb
|
150
|
+
- spec/lib/stacatto_spec.rb
|
151
|
+
- spec/lib/staccato/event_spec.rb
|
152
|
+
- spec/lib/staccato/pageview_spec.rb
|
153
|
+
- spec/lib/staccato/tracker_spec.rb
|
154
|
+
- spec/spec_helper.rb
|