Permalink
Browse files

vendored with-tracking-js pixel ping

  • Loading branch information...
1 parent ed6e858 commit 6ac9e7beb8b79fce000daba1e05a5f72d5f7563a @thejefflarson thejefflarson committed Sep 7, 2010
Showing with 17 additions and 4 deletions.
  1. +3 −0 .gitmodules
  2. +3 −3 README
  3. +10 −1 lib/tasks/{track.rake → pixel.rake}
  4. +1 −0 vendor/pixel-ping
View
3 .gitmodules
@@ -0,0 +1,3 @@
+[submodule "vendor/pixel-ping"]
+ path = vendor/pixel-ping
+ url = git@github.com:documentcloud/pixel-ping.git
View
6 README
@@ -12,16 +12,16 @@
| \ | || | / |
- Pixel Pong is the reference implementation for the Pixel Ping stats collector.
+ Pixel Pong is a backend for the Pixel Ping stats collector.
See Pixel Ping:
http://github.com/documentcloud/pixel-ping
== Guided Tour
- First you should install Pixel Ping via npm:
+ First you should install the with-tracking-js branch of Pixel Ping via rake:
- npm install pixel-ping
+ rake pixel:install
Pixel Ping's configuration files are stored in:
View
11 lib/tasks/track.rake → lib/tasks/pixel.rake
@@ -1,12 +1,21 @@
PID_FILE = "tmp/pids/pixel_ping.pid"
namespace :pixel do
desc "start the node tracker"
- task :track => :environment do
+ task :track do
if File.exists? PID_FILE
pid = File.read PID_FILE
Process.kill("USR1", pid.to_i)
end
launch_command = "pixel-ping #{Rails.root}/config/pixel-ping.#{Rails.env}.json"
sh "nohup #{launch_command} > log/pixel_ping.log 2>&1 & echo $! > #{PID_FILE}"
end
+
+ desc "install the with-tracking-js branch of pixel-ping"
+ task :install do
+ todo = []
+ todo << "git submodule update --init"
+ todo << "cd vendor/pixel-ping"
+ todo << "npm install ."
+ sh todo.join(" && ")
+ end
end
1 vendor/pixel-ping
@@ -0,0 +1 @@
+Subproject commit 72e1a71fa6849e80ba7a9132cf03db82433846e6

0 comments on commit 6ac9e7b

Please sign in to comment.