Sha256: 79c88c69873e6d57ad4f4c9d97d456ac7baeafb3c3a8c0baaf4be763d3c5826e
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
module Octopress module Commands class Isolate < Command def self.init_with_program(p) p.command(:isolate) do |c| c.syntax 'isolate <POST> [options]' c.description "Move all posts not matching selected psot to _posts/_exile. Command accepts path to post or search string." CommandHelpers.add_common_options c c.action do |args, options| options['path'] = args.first if options['path'] && !File.exist?(options['path']) options['path'] = CommandHelpers.select_posts(options['path'], 'isolate') end isolate_post(options) 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| integrate_posts(options) end end end def self.isolate_post(options) Octopress::Isolate.new(options).isolate end def self.integrate_posts(options) Octopress::Isolate.new(options).integrate end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octopress-3.0.0.rc.27 | lib/octopress/commands/isolate.rb |
octopress-3.0.0.rc.26 | lib/octopress/commands/isolate.rb |