Sha256: b432b44998b352b3aa129775d41a4956904345182e1ccecc5d7d0c7d24a22ec5

Contents?: true

Size: 1.06 KB

Versions: 66

Compression:

Stored size: 1.06 KB

Contents

#!/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

Version data entries

66 entries across 66 versions & 5 rubygems

Version Path
auser-poolparty-1.2.10 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.11 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.12 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.3 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.4 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.7 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.8 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.2.9 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.0 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.1 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.10 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.11 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.12 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.13 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.14 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.15 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.16 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.17 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.2 vendor/gems/git-style-binaries/test/fixtures/wordpress
auser-poolparty-1.3.3 vendor/gems/git-style-binaries/test/fixtures/wordpress