0

metric_fu 4.4.1 を使用しています

私の .metrics ファイルには次のように書かれています:

MetricFu::Configuration.run do |config|  
 config.metrics -= [:reek]  
 config.metrics -= [:flay]  
 config.metrics -= [:flog]
end

私の metric_fu.rake は言う:

begin
  require 'metric_fu'
rescue LoadError
  puts 'Could not load metric_fu'
end 

実行すると: bundle exec rake metrics:all で次のエラーが発生します

rake aborted!
undefined method `metrics' for #<MetricFu::Configuration:0xa3d4f14>
/home/montells/Projects/beesor/.metrics:2:in `block in <top (required)>'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/metric_fu-4.4.1/lib/metric_fu/configuration.rb:102:in `run'
/home/montells/Projects/beesor/.metrics:1:in `<top (required)>'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/metric_fu-4.4.1/lib/metric_fu/run.rb:32:in `load_user_configuration'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/metric_fu-4.4.1/lib/metric_fu/run.rb:6:in `initialize'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/metric_fu-4.4.1/lib/metric_fu/tasks/metric_fu.rake:5:in `new'
/home/montells/.rvm/gems/ruby-1.9.3-p392/gems/metric_fu-4.4.1/lib/metric_fu/tasks/metric_fu.rake:5:in `block (2 levels) in <top (required)>'
Tasks: TOP => metrics:all
(See full trace by running task with --trace)
4

1 に答える 1