Module: Diggit::DevelopersActivity::WorkspaceInit
- Extended by:
- WorkspaceInit
- Included in:
- WorkspaceInit
- Defined in:
- lib/diggit/developers_activity/workspace_init.rb
Overview
Initializes a workspace with the developers activity dataset
Constant Summary collapse
- SOURCES_LIST =
'sources.list'
- SOURCES_OPTIONS_FILE =
'sources_options'
- OPTIONS_FILE =
'options'
- DGIT_FOLDER =
'.dgit'
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/diggit/developers_activity/workspace_init.rb', line 19 def init Dig.init_dir('.') Dig.init('.') Dig.it.config.add_analysis('cloc_per_file') Dig.it.config.add_analysis('module_metrics_analysis') Dig.it.config.add_analysis('months_activity_analysis') Dig.it.config.add_analysis('project_developers_analysis') Dig.it.config.add_analysis('releases_activity_analysis') Dig.it.config.add_join('developer_turnover_join') dataset_dir = File.('dataset', File.dirname(__FILE__)) IO.readlines(File.join(dataset_dir, SOURCES_LIST)).select { |l| !l.strip.empty? && !l.start_with?('#') } .each { |url| Dig.it.journal.add_source(url.strip) } FileUtils.cp(File.join(dataset_dir, OPTIONS_FILE), DGIT_FOLDER) FileUtils.cp(File.join(dataset_dir, SOURCES_OPTIONS_FILE), DGIT_FOLDER) end |