Sha256: 51a1e6a9188764244fd3995a95948ffd80bf5e115097ec5631a2443889a76fdb

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

require 'rake'
require 'rake/tasklib'
require 'koality'

module Koality
  class RakeTask < ::Rake::TaskLib

    def initialize(task_name = :koality)
      yield Koality.options if block_given?

      define_task task_name
    end

    def define_task(task_name)
      unless ::Rake.application.last_comment
        desc %(Ensures various code metrics are met)
      end

      task task_name do
        Koality.run
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
koality-1.0.1 lib/koality/rake_task.rb
koality-1.0.0 lib/koality/rake_task.rb