Sha256: 937658b71032411f91e0ac95c0faf810c90180b28f165cb85204f7947074c1e6

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

# encoding: utf-8

require "nake/argv"
require "nake/task"

module Nake
  VERSION ||= "0.0.2"
  TaskNotFound ||= Class.new(StandardError)
  ConfigurationError ||= Class.new(StandardError)

  def self.run(args = ARGV)
    name = args.shift
    task = Task[name]
    if name && task.nil?
      raise TaskNotFound, "Task with name #{name} doesn't exist"
    elsif name.nil? && task.nil?
      raise TaskNotFound, "You have to specify a task you want to run!"
    end
    opts = args.extend(ArgvParsingMixin).extract!
    task.call(args, opts)
  end
end

require "nake/dsl"
require "nake/helpers"
require "nake/tasks"
require "nake/colors"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nake-0.0.2 lib/nake.rb
nake-0.0.2.pre lib/nake.rb