analyticator 1.1.0 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- analyticator (1.0.3)
4
+ analyticator (1.1.2)
5
5
  haml
6
6
  sinatra
7
7
 
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ #Analyticator
2
+
3
+ Have you ever tried to add Google Analytics event tracking to an application? The only way to test them while you are in development is to watch the requests in your development tools and hope that you are reading them right!
4
+
5
+ No longer!
6
+
7
+ All you have to do is modify your Google Analytics tracking code during dev!
8
+
9
+ ##Normal Code:
10
+
11
+ <script type="text/javascript">
12
+
13
+ var _gaq = _gaq || [];
14
+ _gaq.push(['_setAccount', 'UA-XXXXX-Y']);
15
+ _gaq.push(['_trackPageview']);
16
+
17
+ (function() {
18
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
19
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
20
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
21
+ })();
22
+
23
+ ##Modified Code
24
+
25
+ <script type="text/javascript">
26
+
27
+ var _gaq = _gaq || [];
28
+ _gaq.push(['_setAccount', 'UA-XXXXX-Y']);
29
+ _gaq.push(['_trackPageview']);
30
+
31
+ (function() {
32
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
33
+ ga.src = 'http://localhost:8080/ga.js';
34
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
35
+ })();
@@ -5,7 +5,6 @@ class Analytics < Sinatra::Base
5
5
  configure do
6
6
  set :static, true
7
7
  set :environment, :production
8
- set :views, File.expand_path('./views', __FILE__)
9
8
  set :haml, { :format => :html5 }
10
9
  set :port, 8080
11
10
  @@events ||= []
@@ -1,3 +1,3 @@
1
1
  module Analyticator
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.3"
3
3
  end
@@ -23,7 +23,6 @@
23
23
  %table
24
24
  %thead
25
25
  %tr
26
- %th{style: "padding-left: 20px; padding-right: 20px"} Date
27
26
  %th{style: "padding-left: 20px; padding-right: 20px"} Action
28
27
  %th{style: "padding-left: 20px; padding-right: 20px"} Location
29
28
  %th{style: "padding-left: 20px; padding-right: 20px"} Label
@@ -36,7 +35,6 @@
36
35
  -else
37
36
  -@events.each do |event|
38
37
  %tr
39
- %td{style: "padding-left: 20px; padding-right: 20px"}= event[:created_at].strftime("%b/%d/%Y %H:%M")
40
38
  %td{style: "padding-left: 20px; padding-right: 20px"}= event[:action]
41
39
  %td{style: "padding-left: 20px; padding-right: 20px"}= event[:location]
42
40
  %td{style: "padding-left: 20px; padding-right: 20px"}= event[:label]
metadata CHANGED
@@ -1,68 +1,72 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: analyticator
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 1
8
+ - 3
9
+ version: 1.1.3
5
10
  platform: ruby
6
- authors:
11
+ authors:
7
12
  - Chris MacNaughton
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
- date: 2013-04-26 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2013-04-29 00:00:00 -05:00
18
+ default_executable: analyticator
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
14
21
  name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ! '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
22
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ! '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ version_requirements: *id001
32
+ - !ruby/object:Gem::Dependency
28
33
  name: sinatra
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
34
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: haml
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
41
+ version: "0"
48
42
  type: :runtime
43
+ version_requirements: *id002
44
+ - !ruby/object:Gem::Dependency
45
+ name: haml
49
46
  prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- description: ! ' Emulate google analytics during development to test events '
56
- email:
47
+ requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ type: :runtime
55
+ version_requirements: *id003
56
+ description: " Emulate google analytics during development to test events "
57
+ email:
57
58
  - chris@elocal.com
58
- executables:
59
+ executables:
59
60
  - analyticator
60
61
  extensions: []
62
+
61
63
  extra_rdoc_files: []
62
- files:
64
+
65
+ files:
63
66
  - .gitignore
64
67
  - Gemfile
65
68
  - Gemfile.lock
69
+ - README.md
66
70
  - analyticator.gemspec
67
71
  - bin/.gitkeep
68
72
  - bin/analyticator
@@ -77,28 +81,35 @@ files:
77
81
  - lib/analytics/public/js/bootstrap.min.js
78
82
  - lib/analytics/version.rb
79
83
  - lib/analytics/views/index.haml
84
+ has_rdoc: true
80
85
  homepage: http://nyancat.com
81
- licenses:
86
+ licenses:
82
87
  - MIT
83
- metadata: {}
84
88
  post_install_message:
85
89
  rdoc_options: []
86
- require_paths:
90
+
91
+ require_paths:
87
92
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ! '>='
91
- - !ruby/object:Gem::Version
92
- version: '0'
93
- required_rubygems_version: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ! '>='
96
- - !ruby/object:Gem::Version
97
- version: '0'
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ segments:
105
+ - 0
106
+ version: "0"
98
107
  requirements: []
108
+
99
109
  rubyforge_project:
100
- rubygems_version: 2.0.3
110
+ rubygems_version: 1.3.6
101
111
  signing_key:
102
- specification_version: 4
112
+ specification_version: 3
103
113
  summary: Emulate google analytics during development
104
114
  test_files: []
115
+
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTgxMTI3ZTQ5ZmU4NDc2N2E0NDM5OGU3NTdjMzNjZmFjM2JjNWZiMw==
5
- data.tar.gz: !binary |-
6
- OTc3ZjQ3ODBiMGYyNWU0MTIwNjUxNGU3ZmQ5ZGNhNmY5NTJiYmViNA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MjZjNTAxY2M2YTBiZDg4MjNjYjMwOGUzN2U4NWExYjQ1Y2QxMzVlMDNjYWFh
10
- ZTA5NjUwODlhOWE5ZDI1MTBlMWMyYWYyZGUyZjA5YjVkNjU0MjliZWRmNzJl
11
- ZGE4NWViODI5ZWE5YWY0Yzg0YmE3NzQyYjNlMTM5ZmUxNjAyNTk=
12
- data.tar.gz: !binary |-
13
- YjAxMjY5ODEzZTFjY2UzYzNmNzVkMjU4ZDdkYjA3Y2Y0N2EzOTFlYjAzNmI3
14
- NWQ4M2MxM2RmMjEyNDc3Mzc3NGM2N2I3OTY5M2ViYWY5YzFkZGYzYzgzZmVm
15
- YjRhZjdhYzBlNDVhZWRkYTc3N2MwZjMxZTg4OTU3YWY0NjhjOTg=