Class: MetricFu::Configuration
- Inherits:
-
Object
- Object
- MetricFu::Configuration
- Defined in:
- lib/metric_fu/base.rb
Instance Attribute Summary collapse
-
#base_directory ⇒ Object
Returns the value of attribute base_directory.
-
#churn ⇒ Object
Returns the value of attribute churn.
-
#coverage ⇒ Object
Returns the value of attribute coverage.
-
#flay ⇒ Object
Returns the value of attribute flay.
-
#flog ⇒ Object
Returns the value of attribute flog.
-
#general ⇒ Object
Returns the value of attribute general.
-
#heckle ⇒ Object
Returns the value of attribute heckle.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#reek ⇒ Object
Returns the value of attribute reek.
-
#roodi ⇒ Object
Returns the value of attribute roodi.
-
#saikuro ⇒ Object
Returns the value of attribute saikuro.
-
#template_dir ⇒ Object
Returns the value of attribute template_dir.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
68 69 70 71 72 73 |
# File 'lib/metric_fu/base.rb', line 68 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
#base_directory ⇒ Object
Returns the value of attribute base_directory.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def base_directory @base_directory end |
#churn ⇒ Object
Returns the value of attribute churn.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def churn @churn end |
#coverage ⇒ Object
Returns the value of attribute coverage.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def coverage @coverage end |
#flay ⇒ Object
Returns the value of attribute flay.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def flay @flay end |
#flog ⇒ Object
Returns the value of attribute flog.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def flog @flog end |
#general ⇒ Object
Returns the value of attribute general.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def general @general end |
#heckle ⇒ Object
Returns the value of attribute heckle.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def heckle @heckle end |
#metrics ⇒ Object
Returns the value of attribute metrics.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def metrics @metrics end |
#reek ⇒ Object
Returns the value of attribute reek.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def reek @reek end |
#roodi ⇒ Object
Returns the value of attribute roodi.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def roodi @roodi end |
#saikuro ⇒ Object
Returns the value of attribute saikuro.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def saikuro @saikuro end |
#template_dir ⇒ Object
Returns the value of attribute template_dir.
65 66 67 |
# File 'lib/metric_fu/base.rb', line 65 def template_dir @template_dir end |
Class Method Details
.run {|MetricFu.configuration| ... } ⇒ Object
75 76 77 |
# File 'lib/metric_fu/base.rb', line 75 def self.run() yield MetricFu.configuration end |
Instance Method Details
#reset ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/metric_fu/base.rb', line 79 def reset @general = { :open_in_browser => true } @churn = {} rcov_opts = ["--sort coverage", "--html", "--exclude /gems/,/Library/,spec"] rcov_opts << "--rails" if MetricFu.is_rails? @coverage = { :test_files => ['test/**/*_test.rb', 'spec/**/*_spec.rb'], :rcov_opts => rcov_opts } @flay = { :dirs_to_flay => MetricFu.code_dirs} @flog = { :dirs_to_flog => MetricFu.code_dirs} @heckle = { :dirs_to_heckle => MetricFu.code_dirs} @reek = { :dirs_to_reek => MetricFu.code_dirs} @roodi = { :dirs_to_roodi => MetricFu.code_dirs} @metrics = MetricFu.default_metrics @saikuro = {} @template_dir = File.join(File.dirname(__FILE__), '..', 'templates') @base_directory = ENV['CC_BUILD_ARTIFACTS'] || 'tmp/metric_fu' end |