Sha256: 15f405689e2f156173e377f2f8ae772ee41fc1361cd1be0b2eeb3e0d4b614254
Contents?: true
Size: 663 Bytes
Versions: 1
Compression:
Stored size: 663 Bytes
Contents
module Octopress class Publish < Command def self.init_with_program(p) p.command(:publish) do |c| c.syntax 'publish <PATH> [options]' c.description 'Convert a draft to a normal published post.' c.option 'date', '--date DATE', 'String that is parseable by Time#parse. (default: Time.now.iso8601)' c.option 'force', '--force', 'Overwrite file if it already exists' CommandHelpers.add_common_options c c.action do |args, options| abort "You must specify a path." if args.empty? options['path'] = args.first Draft.new(options).publish end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octopress-3.0.0.rc.1 | lib/octopress/commands/publish.rb |