snogmetrics 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -13
- data/Gemfile.lock +10 -13
- data/Rakefile +7 -30
- data/lib/snogmetrics/railtie.rb +12 -0
- data/lib/snogmetrics.rb +2 -11
- data/snogmetrics.gemspec +21 -74
- metadata +115 -22
data/Gemfile
CHANGED
@@ -1,14 +1,4 @@
|
|
1
|
-
source :
|
1
|
+
source :rubygems
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
gem 'jeweler'
|
6
|
-
gem 'yard'
|
7
|
-
gem 'BlueCloth'
|
8
|
-
gem 'rails', '= 2.3.5'
|
9
|
-
end
|
10
|
-
|
11
|
-
group :test do
|
12
|
-
gem 'rspec', '>= 1.3.0'
|
13
|
-
gem 'rcov'
|
14
|
-
end
|
3
|
+
# Specify your gem's dependencies in swifff.gemspec
|
4
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
snogmetrics (0.1.4)
|
5
|
+
|
1
6
|
GEM
|
2
7
|
remote: http://rubygems.org/
|
3
8
|
specs:
|
@@ -12,13 +17,6 @@ GEM
|
|
12
17
|
activeresource (2.3.5)
|
13
18
|
activesupport (= 2.3.5)
|
14
19
|
activesupport (2.3.5)
|
15
|
-
gemcutter (0.6.1)
|
16
|
-
git (1.2.5)
|
17
|
-
jeweler (1.4.0)
|
18
|
-
gemcutter (>= 0.1.0)
|
19
|
-
git (>= 1.2.5)
|
20
|
-
rubyforge (>= 2.0.0)
|
21
|
-
json_pure (1.4.6)
|
22
20
|
rack (1.0.1)
|
23
21
|
rails (2.3.5)
|
24
22
|
actionmailer (= 2.3.5)
|
@@ -30,8 +28,6 @@ GEM
|
|
30
28
|
rake (0.8.7)
|
31
29
|
rcov (0.9.8)
|
32
30
|
rspec (1.3.0)
|
33
|
-
rubyforge (2.0.4)
|
34
|
-
json_pure (>= 1.1.7)
|
35
31
|
yard (0.6.0)
|
36
32
|
|
37
33
|
PLATFORMS
|
@@ -39,9 +35,10 @@ PLATFORMS
|
|
39
35
|
|
40
36
|
DEPENDENCIES
|
41
37
|
BlueCloth
|
42
|
-
|
43
|
-
rails
|
44
|
-
rake
|
38
|
+
bundler (~> 1.0.0)
|
39
|
+
rails
|
40
|
+
rake (~> 0.8.7)
|
45
41
|
rcov
|
46
|
-
rspec
|
42
|
+
rspec
|
43
|
+
snogmetrics!
|
47
44
|
yard
|
data/Rakefile
CHANGED
@@ -1,23 +1,13 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
require 'yard'
|
1
3
|
require 'spec/rake/spectask'
|
2
4
|
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
gem.summary = %Q{SNOGmetrics is a KISSmetrics helper for Rails}
|
10
|
-
gem.description = %Q{SNOGmetrics gives you the best of both worlds: access to KISSmetrics' JavaScript API through Ruby}
|
11
|
-
gem.email = 'theo@iconara.net'
|
12
|
-
gem.homepage = 'http://github.com/iconara/snogmetrics'
|
13
|
-
gem.authors = ['Theo']
|
14
|
-
gem.version = Snogmetrics::VERSION
|
15
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
-
end
|
17
|
-
Jeweler::GemcutterTasks.new
|
18
|
-
rescue LoadError
|
19
|
-
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
20
|
-
end
|
6
|
+
task :default => :spec
|
7
|
+
|
8
|
+
Bundler::GemHelper.install_tasks
|
9
|
+
|
10
|
+
YARD::Rake::YardocTask.new
|
21
11
|
|
22
12
|
Spec::Rake::SpecTask.new(:spec) do |spec|
|
23
13
|
spec.libs << 'lib' << 'spec'
|
@@ -29,16 +19,3 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
|
|
29
19
|
spec.pattern = 'spec/**/*_spec.rb'
|
30
20
|
spec.rcov = true
|
31
21
|
end
|
32
|
-
|
33
|
-
task :spec => :check_dependencies
|
34
|
-
|
35
|
-
task :default => :spec
|
36
|
-
|
37
|
-
begin
|
38
|
-
require 'yard'
|
39
|
-
YARD::Rake::YardocTask.new
|
40
|
-
rescue LoadError
|
41
|
-
task :yard do
|
42
|
-
abort 'YARD is not available. In order to run yardoc, you must: sudo gem install yard'
|
43
|
-
end
|
44
|
-
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'snogmetrics'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
|
5
|
+
module Snogmetrics
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
initializer 'my_railtie.configure_rails_initialization' do
|
8
|
+
ActionController::Base.send(:include, Snogmetrics)
|
9
|
+
ActionView::Base.send(:include, Snogmetrics)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/snogmetrics.rb
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
# the default implementation outputs the real API only when
|
15
15
|
# `Rails.env.production?` is true.
|
16
16
|
module Snogmetrics
|
17
|
-
VERSION = '0.1.
|
17
|
+
VERSION = '0.1.5'
|
18
18
|
|
19
19
|
# Returns an instance of KissmetricsApi, which is an interface to the
|
20
20
|
# KISSmetrics API. It has the methods #record and #identify, which work just
|
@@ -130,18 +130,9 @@ private
|
|
130
130
|
def api_js
|
131
131
|
if @fake_it
|
132
132
|
<<-JS
|
133
|
-
var KM = {
|
134
|
-
record: function() {
|
135
|
-
_kmq.push(["record"].concat(Array.prototype.slice.apply(arguments)));
|
136
|
-
},
|
137
|
-
identify: function() {
|
138
|
-
_kmq.push(["identify"].concat(Array.prototype.slice.apply(arguments)));
|
139
|
-
}
|
140
|
-
};
|
141
|
-
|
142
133
|
if (window.console) {
|
143
134
|
_kmq = (function(queue) {
|
144
|
-
|
135
|
+
var printCall = function() {
|
145
136
|
console.dir(arguments);
|
146
137
|
}
|
147
138
|
|
data/snogmetrics.gemspec
CHANGED
@@ -1,81 +1,28 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/snogmetrics', __FILE__)
|
5
3
|
|
6
4
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
5
|
+
s.name = 'snogmetrics'
|
6
|
+
s.version = Snogmetrics::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ['Theo Hultberg']
|
9
|
+
s.email = ['theo@iconara.net']
|
10
|
+
s.homepage = 'http://github.org/iconara/snogmetrics'
|
11
|
+
s.summary = 'SNOGmetrics is a KISSmetrics helper for Rails'
|
12
|
+
s.description = 'SNOGmetrics gives you the best of both worlds: access to KISSmetrics\' JavaScript API through Ruby'
|
9
13
|
|
10
|
-
s.required_rubygems_version =
|
11
|
-
s.
|
12
|
-
s.date = %q{2010-09-02}
|
13
|
-
s.description = %q{SNOGmetrics gives you the best of both worlds: access to KISSmetrics' JavaScript API through Ruby}
|
14
|
-
s.email = %q{theo@iconara.net}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.mdown"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"CHANGELOG.mdown",
|
23
|
-
"Gemfile",
|
24
|
-
"Gemfile.lock",
|
25
|
-
"LICENSE",
|
26
|
-
"README.mdown",
|
27
|
-
"Rakefile",
|
28
|
-
"example/snoggy/.gitignore",
|
29
|
-
"example/snoggy/README.mdown",
|
30
|
-
"example/snoggy/Rakefile",
|
31
|
-
"example/snoggy/app/controllers/application_controller.rb",
|
32
|
-
"example/snoggy/app/controllers/snogs_controller.rb",
|
33
|
-
"example/snoggy/app/views/layouts/application.html.erb",
|
34
|
-
"example/snoggy/app/views/snogs/new.html.erb",
|
35
|
-
"example/snoggy/app/views/snogs/thank_you.html.erb",
|
36
|
-
"example/snoggy/config/boot.rb",
|
37
|
-
"example/snoggy/config/environment.rb",
|
38
|
-
"example/snoggy/config/environments/development.rb",
|
39
|
-
"example/snoggy/config/environments/production.rb",
|
40
|
-
"example/snoggy/config/environments/test.rb",
|
41
|
-
"example/snoggy/config/initializers/snogmetrics.rb",
|
42
|
-
"example/snoggy/config/routes.rb",
|
43
|
-
"example/snoggy/script/about",
|
44
|
-
"example/snoggy/script/console",
|
45
|
-
"example/snoggy/script/dbconsole",
|
46
|
-
"example/snoggy/script/destroy",
|
47
|
-
"example/snoggy/script/generate",
|
48
|
-
"example/snoggy/script/performance/benchmarker",
|
49
|
-
"example/snoggy/script/performance/profiler",
|
50
|
-
"example/snoggy/script/plugin",
|
51
|
-
"example/snoggy/script/runner",
|
52
|
-
"example/snoggy/script/server",
|
53
|
-
"example/snoggy/vendor/plugins/snogmetrics/init.rb",
|
54
|
-
"lib/snogmetrics.rb",
|
55
|
-
"rails/init.rb",
|
56
|
-
"snogmetrics.gemspec",
|
57
|
-
"spec/snogmetrics_spec.rb",
|
58
|
-
"spec/spec.opts",
|
59
|
-
"spec/spec_helper.rb"
|
60
|
-
]
|
61
|
-
s.homepage = %q{http://github.com/iconara/snogmetrics}
|
62
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
63
|
-
s.require_paths = ["lib"]
|
64
|
-
s.rubygems_version = %q{1.3.7}
|
65
|
-
s.summary = %q{SNOGmetrics is a KISSmetrics helper for Rails}
|
66
|
-
s.test_files = [
|
67
|
-
"spec/snogmetrics_spec.rb",
|
68
|
-
"spec/spec_helper.rb"
|
69
|
-
]
|
14
|
+
s.required_rubygems_version = '>= 1.3.6'
|
15
|
+
s.rubyforge_project = 'snogmetrics'
|
70
16
|
|
71
|
-
|
72
|
-
|
73
|
-
|
17
|
+
s.add_development_dependency 'bundler', '~> 1.0.0'
|
18
|
+
s.add_development_dependency 'rake', '~> 0.8.7'
|
19
|
+
s.add_development_dependency 'yard'
|
20
|
+
s.add_development_dependency 'BlueCloth'
|
21
|
+
s.add_development_dependency 'rails'
|
22
|
+
s.add_development_dependency 'rspec'
|
23
|
+
s.add_development_dependency 'rcov'
|
74
24
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
else
|
79
|
-
end
|
25
|
+
s.files = `git ls-files`.split("\n")
|
26
|
+
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
27
|
+
s.require_path = 'lib'
|
80
28
|
end
|
81
|
-
|
metadata
CHANGED
@@ -1,33 +1,126 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snogmetrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 19
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
|
-
- Theo
|
12
|
+
- Theo Hultberg
|
14
13
|
autorequire:
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-10-24 00:00:00 +02:00
|
19
18
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bundler
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 8
|
46
|
+
- 7
|
47
|
+
version: 0.8.7
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: yard
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: BlueCloth
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rails
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
type: :development
|
88
|
+
version_requirements: *id005
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec
|
91
|
+
prerelease: false
|
92
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
100
|
+
type: :development
|
101
|
+
version_requirements: *id006
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rcov
|
104
|
+
prerelease: false
|
105
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
segments:
|
111
|
+
- 0
|
112
|
+
version: "0"
|
113
|
+
type: :development
|
114
|
+
version_requirements: *id007
|
22
115
|
description: "SNOGmetrics gives you the best of both worlds: access to KISSmetrics' JavaScript API through Ruby"
|
23
|
-
email:
|
116
|
+
email:
|
117
|
+
- theo@iconara.net
|
24
118
|
executables: []
|
25
119
|
|
26
120
|
extensions: []
|
27
121
|
|
28
|
-
extra_rdoc_files:
|
29
|
-
|
30
|
-
- README.mdown
|
122
|
+
extra_rdoc_files: []
|
123
|
+
|
31
124
|
files:
|
32
125
|
- .document
|
33
126
|
- .gitignore
|
@@ -64,18 +157,19 @@ files:
|
|
64
157
|
- example/snoggy/script/server
|
65
158
|
- example/snoggy/vendor/plugins/snogmetrics/init.rb
|
66
159
|
- lib/snogmetrics.rb
|
160
|
+
- lib/snogmetrics/railtie.rb
|
67
161
|
- rails/init.rb
|
68
162
|
- snogmetrics.gemspec
|
69
163
|
- spec/snogmetrics_spec.rb
|
70
164
|
- spec/spec.opts
|
71
165
|
- spec/spec_helper.rb
|
72
166
|
has_rdoc: true
|
73
|
-
homepage: http://github.
|
167
|
+
homepage: http://github.org/iconara/snogmetrics
|
74
168
|
licenses: []
|
75
169
|
|
76
170
|
post_install_message:
|
77
|
-
rdoc_options:
|
78
|
-
|
171
|
+
rdoc_options: []
|
172
|
+
|
79
173
|
require_paths:
|
80
174
|
- lib
|
81
175
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -83,7 +177,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
177
|
requirements:
|
84
178
|
- - ">="
|
85
179
|
- !ruby/object:Gem::Version
|
86
|
-
hash: 3
|
87
180
|
segments:
|
88
181
|
- 0
|
89
182
|
version: "0"
|
@@ -92,17 +185,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
185
|
requirements:
|
93
186
|
- - ">="
|
94
187
|
- !ruby/object:Gem::Version
|
95
|
-
hash: 3
|
96
188
|
segments:
|
97
|
-
-
|
98
|
-
|
189
|
+
- 1
|
190
|
+
- 3
|
191
|
+
- 6
|
192
|
+
version: 1.3.6
|
99
193
|
requirements: []
|
100
194
|
|
101
|
-
rubyforge_project:
|
195
|
+
rubyforge_project: snogmetrics
|
102
196
|
rubygems_version: 1.3.7
|
103
197
|
signing_key:
|
104
198
|
specification_version: 3
|
105
199
|
summary: SNOGmetrics is a KISSmetrics helper for Rails
|
106
|
-
test_files:
|
107
|
-
|
108
|
-
- spec/spec_helper.rb
|
200
|
+
test_files: []
|
201
|
+
|