Sha256: d94339f9756cb5089367a5e4c877ebfee9ae819b472444d44ea96858abc8a8dc

Contents?: true

Size: 592 Bytes

Versions: 14

Compression:

Stored size: 592 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'
      require 'flog_task'
      FlogTask.new :flog, self.flog_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/flog.rb
hoe-2.9.1.b.2 lib/hoe/flog.rb
hoe-2.9.0 lib/hoe/flog.rb
hoe-2.8.0 lib/hoe/flog.rb
hoe-2.7.0 lib/hoe/flog.rb
hoe-2.6.2 lib/hoe/flog.rb
hoe-2.6.1 lib/hoe/flog.rb
hoe-2.6.0 lib/hoe/flog.rb
hoe-2.5.0 lib/hoe/flog.rb
hoe-2.4.0 lib/hoe/flog.rb
hoe-2.3.3 lib/hoe/flog.rb
hoe-2.3.0 lib/hoe/flog.rb
hoe-2.3.1 lib/hoe/flog.rb
hoe-2.3.2 lib/hoe/flog.rb