Sha256: 6de865a1dee440a3586330fcb872fb947f16f5bf6286e8b5bc7fd882a68ef5ed

Contents?: true

Size: 550 Bytes

Versions: 37

Compression:

Stored size: 550 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
    require "flay_task"
    FlayTask.new :flay, self.flay_threshold
  rescue Exception
    # skip
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
hoe-4.2.2 lib/hoe/flay.rb
hoe-4.2.0 lib/hoe/flay.rb
hoe-4.1.0 lib/hoe/flay.rb
hoe-4.0.5 lib/hoe/flay.rb
hoe-4.0.4 lib/hoe/flay.rb
hoe-4.0.3 lib/hoe/flay.rb
hoe-4.0.2 lib/hoe/flay.rb
hoe-4.0.1 lib/hoe/flay.rb
hoe-4.0.0 lib/hoe/flay.rb
hoe-3.26.0 lib/hoe/flay.rb
hoe-3.25.0 lib/hoe/flay.rb
hoe-3.24.0 lib/hoe/flay.rb
hoe-3.23.1 lib/hoe/flay.rb
hoe-3.23.0 lib/hoe/flay.rb
hoe-3.22.3 lib/hoe/flay.rb
hoe-3.22.2 lib/hoe/flay.rb
hoe-3.22.1 lib/hoe/flay.rb
hoe-3.22.0 lib/hoe/flay.rb
hoe-3.21.0 lib/hoe/flay.rb
hoe-3.20.0 lib/hoe/flay.rb