Sha256: 218b64ec24e7778733cde6591d666ce874c651ba3efe2c33f944db2e53fa29a3

Contents?: true

Size: 928 Bytes

Versions: 66

Compression:

Stored size: 928 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../../lib")
require 'git-style-binary/command'

GitStyleBinary.command do
  short_desc "create a blog post"
  banner <<-EOS
SYNOPSIS
      #{command.full_name} #{all_options_string} {content|STDIN} 

EOS
  opt :blog,     "short name of the blog to use", :default => 'default'
  opt :category, "tag/category. specify multiple times for multiple categories", :type => String, :multi => true
  opt :title,    "title for the post", :required => true, :type => String
  opt :type,     "type of the content [html|xhtml|text]", :default => 'html', :type => String

  run do |command|
    command.die :type, "type must be one of [html|xhtml|text]" unless command.opts[:type] =~ /^(x?html|text)$/i

    puts "Subcommand name:     #{command.name.inspect}"
    puts "Options:             #{command.opts.inspect}"
    puts "Remaining arguments: #{command.argv.inspect}"
  end
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-post
auser-poolparty-1.2.11 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.12 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.3 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.4 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.7 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.8 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.2.9 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.0 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.1 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.10 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.11 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.12 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.13 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.14 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.15 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.16 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.17 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.2 vendor/gems/git-style-binaries/test/fixtures/wordpress-post
auser-poolparty-1.3.3 vendor/gems/git-style-binaries/test/fixtures/wordpress-post