Sha256: 86947b883534e5aa590d8941eea1b8a26d445c04d4d93ef8cd54dac85bbef6b6

Contents?: true

Size: 571 Bytes

Versions: 30

Compression:

Stored size: 571 Bytes

Contents

##
# Flog plugin for hoe.
#
# === Tasks Provided:
#
# flog::               Analyze code complexity.

module Hoe::Flog
  ##
  # Optional: flog threshold to determine threshold failure. [default: 1500-200]

  attr_accessor :flog_threshold

  ##
  # Initialize variables for plugin.

  def initialize_flog
    self.flog_threshold ||= timebomb 1500, 1000 # 80% of average :(
  end

  ##
  # Define tasks for plugin.

  def define_flog_tasks
    begin
      require 'flog_task'
      FlogTask.new :flog, self.flog_threshold
    rescue Exception
      # skip
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
hoe-3.1.1 lib/hoe/flog.rb
hoe-3.1.0 lib/hoe/flog.rb
hoe-3.0.8 lib/hoe/flog.rb
hoe-3.0.7 lib/hoe/flog.rb
hoe-3.0.6 lib/hoe/flog.rb
hoe-3.0.5 lib/hoe/flog.rb
hoe-3.0.4 lib/hoe/flog.rb
hoe-3.0.3 lib/hoe/flog.rb
hoe-3.0.2 lib/hoe/flog.rb
hoe-3.0.1 lib/hoe/flog.rb
hoe-3.0.0 lib/hoe/flog.rb
hoe-2.16.1 lib/hoe/flog.rb
hoe-2.16.0 lib/hoe/flog.rb
hoe-2.15.0 lib/hoe/flog.rb
hoe-2.14.0 lib/hoe/flog.rb
hoe-2.13.1 lib/hoe/flog.rb
hoe-2.13.0 lib/hoe/flog.rb
hoe-2.12.5 lib/hoe/flog.rb
hoe-2.12.4 lib/hoe/flog.rb
hoe-2.12.3 lib/hoe/flog.rb