Skip to content

Commit 33a091b

Browse files
committed
Docs updated
1 parent 24d4158 commit 33a091b

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

README.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ What is it?
55
===========
66

77
1. A `Rack::Middleware` that sends selected parts of the request environment to an UDP socket
8-
2. An `EventMachine` daemon that opens an UDP socket and sends out received data to CouchDB
9-
3. A set of CouchDB map-reduce views, for analysis
10-
8+
2. An `EventMachine` daemon that opens an UDP socket and sends out received data to a database
119

1210
Does it work?
1311
=============
1412

15-
Yes but the test suite is incomplete.
13+
Yes, we are using it in production.
1614
If you can help in complete the test suite, it is much appreciated :-).
1715

1816
Deploying
@@ -22,33 +20,30 @@ Deploying
2220

2321
gem 'usage\_tracker', :require => 'usage\_tracker/middleware'
2422

25-
* Add the Middleware to your application:
23+
* Configure the middleware and plug it into your application:
2624

25+
UsageTracker::Middleware.config(:host => '192.168.1.20', :port => '8840')
2726
Your::Application.config.middleware.use UsageTracker::Middleware
2827

29-
* The daemon can be started manually with the following command, inside a Rails.root:
28+
* Install the gem on the target machine and run it with this command:
3029

3130
$ usage_tracker [environment]
3231

32+
If you run it into a Rails.root it will log and write pids in canonical dirs.
33+
3334
`environment` is optional and will default to "development" if no command line
3435
option nor the RAILS\_ENV environment variable are set.
3536

3637
or can be put under Upstart using the provided configuration file located in
3738
`config/usage_tracker_upstart.conf`. Check it out and modify it to suit your needs.
3839

39-
The daemon logs to `log/usage_tracker.log` if the log directory exists and rotates its
40-
logs when receives the USR1 signal. If log directory does not exist it logs in the
41-
current directory.
40+
The daemon logs to `usage_tracker.log` if the log directory exists and rotates its
41+
logs when receives the USR1 signal.
4242

43-
* The daemon writes its pid into tmp/pids/usage\_tracker.pid
43+
* The daemon writes its pid into usage\_tracker.pid
4444

45-
* The daemon connects to a Couch database named `usage_tracker` running on `localhost`,
46-
default port `5984/TCP`, and listens on `localhost`, port `5985/UDP` by default.
47-
You can change these settings via a `config/usage_tracker.yml` file. See the example
48-
in the `config` directory of the gem distribution.
49-
50-
* The CouchDB instance must be running, the database is created (and updated)
51-
if necessary.
45+
* The daemon can be configured to work with couchdb or mongodb adapter. Look at the
46+
sample configuration file for hints.
5247

5348
* If the daemon cannot start, e.g. because of unavailable database or listening
5449
address, it will print a diagnostig message to STDERR, log to usage\_tracker.log
@@ -64,12 +59,10 @@ Tests are still incomplete. You can start the running:
6459

6560
> bundle exec rspec spec
6661
67-
6862
All required gems for testing should be installed running:
6963

7064
> bundle install
7165
7266
About the middleware, it's probably better for you to test that in your own
73-
app's integration test suite. Some sample code has been brutally extracted from
74-
Panmind's codebase and is included in middleware\_test.rb file.
67+
app's integration test suite.
7568

0 commit comments

Comments
 (0)