Sha256: ef354b4abd285f8900476e2fbb5a526005daa16fdb5ede384997b1334083a75a

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

require "chef/fork/commands"

class Chef
  class Fork
    module Commands
      class Cookbook < Noop
        def run(args=[])
          rest = optparse.order(args)
          case rest.first
          when "show"
            cookbook_show(rest.slice(1..-1) || [])
          when "upload"
            cookbook_upload(rest.slice(1..-1) || [])
          else
            raise(NameError.new(rest.inspect))
          end
        end

        private
        def cookbook_show(args=[])
          raise(NotImplementedError.new(args.inspect))
        end

        def cookbook_upload(args=[])
          raise(NotImplementedError.new(args.inspect))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef-fork-0.1.1 lib/chef/fork/commands/cookbook.rb