Sha256: a4b5d76df493e312be1bd8a40341b1dc6ac961f9f8d4a9073d7ed85c3e8dc6cb

Contents?: true

Size: 597 Bytes

Versions: 14

Compression:

Stored size: 597 Bytes

Contents

##
# Flay plugin for hoe.
#
# === Tasks Provided:
#
# flay::               Analyze for code duplication.

module Hoe::Flay
  ##
  # Optional: flay threshold to determine threshold failure. [default: 1200-100]

  attr_accessor :flay_threshold

  ##
  # Initialize variables for plugin.

  def initialize_flay
    self.flay_threshold ||= timebomb 1200, 100  # 80% of average :(
  end

  ##
  # Define tasks for plugin.

  def define_flay_tasks
    begin
      require 'flay'
      require 'flay_task'
      FlayTask.new :flay, self.flay_threshold
    rescue Exception
      # skip
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hoe-2.9.1 lib/hoe/flay.rb
hoe-2.9.1.b.2 lib/hoe/flay.rb
hoe-2.9.0 lib/hoe/flay.rb
hoe-2.8.0 lib/hoe/flay.rb
hoe-2.7.0 lib/hoe/flay.rb
hoe-2.6.2 lib/hoe/flay.rb
hoe-2.6.1 lib/hoe/flay.rb
hoe-2.6.0 lib/hoe/flay.rb
hoe-2.5.0 lib/hoe/flay.rb
hoe-2.4.0 lib/hoe/flay.rb
hoe-2.3.3 lib/hoe/flay.rb
hoe-2.3.0 lib/hoe/flay.rb
hoe-2.3.1 lib/hoe/flay.rb
hoe-2.3.2 lib/hoe/flay.rb