Class: MetricFu::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/metric_fu/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration



132
133
134
135
136
137
# File 'lib/metric_fu/base.rb', line 132

def initialize
  raise "Use config.churn instead of MetricFu::CHURN_OPTIONS" if defined? ::MetricFu::CHURN_OPTIONS
  raise "Use config.flog[:dirs_to_flog] instead of MetricFu::DIRECTORIES_TO_FLOG" if defined? ::MetricFu::DIRECTORIES_TO_FLOG
  raise "Use config.saikuro instead of MetricFu::SAIKURO_OPTIONS" if defined? ::MetricFu::SAIKURO_OPTIONS      
  reset      
end

Instance Attribute Details

#churnObject

Returns the value of attribute churn.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def churn
  @churn
end

#coverageObject

Returns the value of attribute coverage.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def coverage
  @coverage
end

#flayObject

Returns the value of attribute flay.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def flay
  @flay
end

#flogObject

Returns the value of attribute flog.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def flog
  @flog
end

#metricsObject

Returns the value of attribute metrics.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def metrics
  @metrics
end

#reekObject

Returns the value of attribute reek.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def reek
  @reek
end

#roodiObject

Returns the value of attribute roodi.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def roodi
  @roodi
end

#saikuroObject

Returns the value of attribute saikuro.



131
132
133
# File 'lib/metric_fu/base.rb', line 131

def saikuro
  @saikuro
end

Class Method Details

.run {|MetricFu.configuration| ... } ⇒ Object



139
140
141
# File 'lib/metric_fu/base.rb', line 139

def self.run()  
  yield MetricFu.configuration
end

Instance Method Details

#resetObject



143
144
145
146
147
148
149
150
151
152
153
# File 'lib/metric_fu/base.rb', line 143

def reset
  @churn    =  {}
  @coverage = { :test_files => ['test/**/*_test.rb', 'spec/**/*_spec.rb'],
                :rcov_opts => ["--sort coverage", "--html", "--rails", "--exclude /gems/,/Library/,spec"] }
  @flay     = { :dirs_to_flay => CODE_DIRS}
  @flog     = { :dirs_to_flog => CODE_DIRS}
  @reek     = { :dirs_to_reek => CODE_DIRS}
  @roodi    = { :dirs_to_roodi => CODE_DIRS}
  @metrics          = DEFAULT_METRICS
  @saikuro  = {}
end