Set the output directory of metric_fu via the command line?

17 views
Skip to first unread message

ingmarhamer

unread,
Oct 8, 2009, 9:43:44 AM10/8/09
to metric_fu
Is there any way to set the output directory of metric_fu via the
command line instead of setting it in the rakefile?

I'm writing an online ruby-code-analyzer where a user can upload a zip
or tar file to be analyzed.
I'm using metric_fu to generate some of the results.
This works great for one user - but once I have multiple users trying
to analyze their project at the same time I obviously need to set
different input/output directories.
For now my 'workaround' is to create a rakefile for each user and then
use rake's -f option to use that file - but it would be much "cleaner"
if I could just set the input/output dirs on the command line

I tried using
rake metrics:all --base_directory '/some/dir' ,
rake metrics:all config.base_directory='/some/dir'
and similar syntax but it just leads to metrics_fu doing nothing (not
producting any errors either)


in my rakefile I have something like

config.scratch_directory = File.join(config.base_directory,
'scratch')
config.output_directory = File.join(config.base_directory, 'output')
config.data_directory = File.join(config.base_directory, '_data')

so if I could set the base-directory dynamically i'd be all set...


any suggestions?
Reply all
Reply to author
Forward
0 new messages