Sha256: 5ac7940f4389aed86a9d2eb3d027901d0538b78d48a7d23380c4d911d280edcd

Contents?: true

Size: 1.11 KB

Versions: 10

Compression:

Stored size: 1.11 KB

Contents

module Octopress
  module Commands
    class Isolate < Command
      def self.init_with_program(p)
        p.command(:isolate) do |c|
          c.syntax 'isolate [search] [options]'
          c.description "Move posts to _posts/_exile if they do not match the search text or move the most recent post if search text is omitted."
          c.option 'path',   '--path [STRING]', 'Isolate a post at the specified path.'
          c.option 'config', '--config <CONFIG_FILE>[,CONFIG_FILE2,...]', Array, 'Custom Jekyll configuration file'

          c.action do |args, options|
            if !args.empty?
              options['search'] = args.first
            end
            Octopress::Isolate.new(options).process
          end
        end

        p.command(:integrate) do |c|
          c.syntax 'integrate'
          c.description "Reintegrate posts from _posts/_exile."
          c.option 'config', '--config <CONFIG_FILE>[,CONFIG_FILE2,...]', Array, 'Custom Jekyll configuration file'

          c.action do |args, options|
            Octopress::Isolate.new(options).revert
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
octopress-3.0.0.rc.25 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.24 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.23 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.22 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.21 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.20 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.19 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.18 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.17 lib/octopress/commands/isolate.rb
octopress-3.0.0.rc.16 lib/octopress/commands/isolate.rb