komagata-web_tracker_helper 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/web_tracker_helper.rb +8 -0
- data/test/test_helper.rb +10 -0
- data/test/web_tracker_helper_test.rb +7 -0
- metadata +62 -0
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Masaki Komagata
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= web_tracker_helper
|
2
|
+
|
3
|
+
A small helper for Web Tracker.
|
4
|
+
|
5
|
+
== INSTALATION
|
6
|
+
|
7
|
+
$ sudo gem install komagata-web_tracker_helper -s http://gems.github.com
|
8
|
+
|
9
|
+
== USAGE
|
10
|
+
|
11
|
+
use tracking_code rails view file.
|
12
|
+
|
13
|
+
<%= tracking_code 'foo.bar.com', 'xxxxxxxxxxxxx' if Rails.env.production? %>
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2009 Masaki Komagata <komagata@gmail.com>. See LICENSE for details.
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ActionView::Base.send :include, WebTrackerHelper
|
data/install.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Install hook code here
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module WebTrackerHelper
|
2
|
+
def tracking_code(server, sid)
|
3
|
+
url = "http://#{server}/beacon/beacon.gif?sid=#{sid}&guid=on"
|
4
|
+
env = {"req" => request.url, "ref" => request.referer}
|
5
|
+
query = env.map {|k,v|"#{ERB::Util.u k}=#{ERB::Util.u v}"}.join '&'
|
6
|
+
image_tag "#{url}?#{query}"
|
7
|
+
end
|
8
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: komagata-web_tracker_helper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Masaki Komagata
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-08-13 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: A small rails helper plugin for Web Tracker.
|
17
|
+
email: komagata@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- init.rb
|
27
|
+
- install.rb
|
28
|
+
- lib/web_tracker_helper.rb
|
29
|
+
- test/test_helper.rb
|
30
|
+
- test/web_tracker_helper_test.rb
|
31
|
+
- LICENSE
|
32
|
+
- README.rdoc
|
33
|
+
has_rdoc: false
|
34
|
+
homepage: http://github.com/komagata/web_tracker_helper
|
35
|
+
licenses:
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options:
|
38
|
+
- --charset=UTF-8
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
version:
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: "0"
|
52
|
+
version:
|
53
|
+
requirements: []
|
54
|
+
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 1.3.5
|
57
|
+
signing_key:
|
58
|
+
specification_version: 3
|
59
|
+
summary: A small rails helper plugin for Web Tracker
|
60
|
+
test_files:
|
61
|
+
- test/test_helper.rb
|
62
|
+
- test/web_tracker_helper_test.rb
|