#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../../lib")

require 'git-style-binary/command'
GitStyleBinary.primary do
  version "0.0.1 (c) 2009 Nate Murray - local"
  opt :test_primary, "test an option on the primary", :type => String
  
  action do
    @categories = ["sports", "news"]
  end
  
  before_run do |cmd|
    puts "before_run command #{cmd}"
  end
  
  after_run do |cmd|
    puts "after_run command #{cmd}"
  end

  run do |command|
    puts "Primary Options: #{command.opts.inspect}"
  end
end

# OR

# require 'git-style-binary/primary'
# command = GitStyleBinary::primary("wordpress") do
#   version "#{$0} 0.0.1 (c) 2009 Nate Murray"
#   banner <<-EOS
# usage: #{$0} #{all_options.collect(:&to_s).join(" ")} COMMAND [ARGS]
#
# The wordpress subcommands commands are:
# {subcommand_names.pretty_print}
#
# See 'wordpress help COMMAND' for more information on a specific command.
# EOS
#   opt :verbose,  "verbose", :default => false
#   opt :dry,      "dry run", :default => false
#   opt :test_global, "a basic global string option", :type => String
# end
