Sha256: 85e56cbccbc462c465a7d0cc10440a3b212c68db93bd119fb0a1ab8b15f75e5e

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

# encoding: utf-8

namespace :metrics do
  begin
    $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))

    require 'yardstick/rake/measurement'
    require 'yardstick/rake/verify'
    require 'yaml'

    config = YAML.load_file(File.expand_path('../../../config/yardstick.yml', __FILE__))

    # yardstick_measure task
    Yardstick::Rake::Measurement.new

    # verify_measurements task
    Yardstick::Rake::Verify.new do |verify|
      verify.threshold = config.fetch('threshold')
    end
  rescue LoadError
    %w[ yardstick_measure verify_measurements ].each do |name|
      task name.to_s do
        $stderr.puts "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yardstick-0.9.6 tasks/metrics/yardstick.rake
yardstick-0.9.5 tasks/metrics/yardstick.rake
yardstick-0.9.4 tasks/metrics/yardstick.rake
yardstick-0.9.3 tasks/metrics/yardstick.rake