public
Description:
Homepage: http://activescaffold.com
Clone URL: git://github.com/activescaffold/active_scaffold.git
scambra (author)
Fri Nov 06 08:28:30 -0800 2009
commit  991081cbfe6be10bda2e7ab9a4c69c4fbaf29686
tree    4d413ddd77020704d970fbf181b476906cf77306
parent  70cad8842f4c97cda7127970defe7c83f466596c
active_scaffold / install.rb
100644 40 lines (33 sloc) 0.955 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##
## Install ActiveScaffold assets into /public
##
 
require File.dirname(__FILE__) + '/install_assets'
 
##
## Install Counter
##
#
# What's going on here?
# We're incrementing a web counter so we can track SVN installs of ActiveScaffold
#
# How?
# We're making a GET request to errcount.com to update a simple counter. No data is transmitted.
#
# Why?
# So we can know how many people are using ActiveScaffold and modulate our level of effort accordingly.
# Despite numerous pleas our Googly overlords still only provide us with download stats for the zip distro.
#
# *Thanks for your understanding*
#
 
class ErrCounter # using errcount.com
  require "net/http"
  
  @@ACCOUNT_ID = 341
  @@SITE_DOMAIN = 'installs.activescaffold.com'
  
  def self.increment
    @http = Net::HTTP.new("errcount.com")
    resp, data = @http.get2("/ctr/#{@@ACCOUNT_ID}.js", {'Referer' => @@SITE_DOMAIN})
  end
end
 
begin
  ErrCounter.increment
rescue
end