forked from jscruggs/metric_fu
-
Notifications
You must be signed in to change notification settings - Fork 2
/
metric_fu.rb
21 lines (18 loc) · 888 Bytes
/
metric_fu.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Load a few things to make our lives easier elsewhere.
module MetricFu
LIB_ROOT = File.dirname(__FILE__)
end
base_dir = File.join(MetricFu::LIB_ROOT, 'base')
generator_dir = File.join(MetricFu::LIB_ROOT, 'generators')
template_dir = File.join(MetricFu::LIB_ROOT, 'templates')
# We need to require these two things first because our other classes
# depend on them.
require File.join(base_dir, 'report')
require File.join(base_dir, 'generator')
# Load the rakefile so users of the gem get the default metric_fu task
load File.join(MetricFu::LIB_ROOT, '..', 'tasks', 'metric_fu.rake')
# Now load everything else that's in the directory
Dir[File.join(base_dir, '*.rb')].each{|l| require l }
Dir[File.join(generator_dir, '*.rb')].each {|l| require l }
Dir[File.join(template_dir, 'standard/*.rb')].each {|l| require l}
Dir[File.join(template_dir, 'awesome/*.rb')].each {|l| require l}