mintdigital / pathways

Pathways Ruby Gem - Find out the common pathways within your Rails app.
1 stars 2 forks source link

Move the mongo connection to Parser #1

Open simonreed opened 13 years ago

simonreed commented 13 years ago

Pass the connection configuration options into Parser which is only called when initialized.

Pathways::Parser.new(options)

At the moment Mongo is required when even just tracking which is wrong.

dstrelau commented 13 years ago

You may want to consider decoupling the tracking, parsing, and server segments, kind of how resque works. require 'pathways' would load up the tracking code while require 'pathways/server' would include the sinatra and mongo code. This would mean you could have the pathways gem in your Gemfile without requiring a mongo connection at boot time.