Sha256: 2cfdb0c73fdfb39c04348dfe08f8b5cd1a14f0c35621f7b87d9cb8c9e724d5fb

Contents?: true

Size: 552 Bytes

Versions: 6

Compression:

Stored size: 552 Bytes

Contents

module Octopress
  class Publish < Command
    def self.init_with_program(p)
      p.command(:publish) do |c|
        c.syntax 'octopress 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.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

6 entries across 6 versions & 1 rubygems

Version Path
octopress-3.0.0.alpha8 lib/octopress/commands/publish.rb
octopress-3.0.0.alpha7 lib/octopress/commands/publish.rb
octopress-3.0.0.alpha6 lib/octopress/commands/publish.rb
octopress-3.0.0.alpha5 lib/octopress/commands/publish.rb
octopress-3.0.0.alpha4 lib/octopress/commands/publish.rb
octopress-3.0.0.alpha3 lib/octopress/commands/publish.rb