Sha256: 678d75d74b8b7185f36005834d9c1e13228906e330c6ba260da786246674434f

Contents?: true

Size: 934 Bytes

Versions: 13

Compression:

Stored size: 934 Bytes

Contents

require 'thor'
require 'highline'
require 'paint'
require 'pathname'
require 'site_hook/paths'
require 'site_hook/exceptions'
require 'site_hook/deprecate'
commands = SiteHook::Paths.lib_dir.join('site_hook/commands').children
commands.each do |filename|
  next if filename == '.' or filename == '..'
  f = filename.dirname
  require  "#{f + filename.basename('.*')}"
end

module SiteHook
  class CLI < Thor
    desc '--version, -v', 'returns version and exits'
    def __version
      puts SiteHook::VERSION
    end
    map ['-v', '--version'] => :__version

    desc 'config [subcommand] [options]', 'configure site_hook'
    subcommand('config', SiteHook::Commands::ConfigClass)
    desc 'server [subcommand] [options]', 'run server actions'
    subcommand('server', SiteHook::Commands::ServerClass)
    desc 'jekyll [subcommand] [options]', 'run jekyll actions'
    subcommand('jekyll', SiteHook::Commands::JekyllClass)

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
site_hook-0.9.16 lib/site_hook/cli.rb
site_hook-0.9.15 lib/site_hook/cli.rb
site_hook-0.9.14 lib/site_hook/cli.rb
site_hook-0.9.12 lib/site_hook/cli.rb
site_hook-0.9.11 lib/site_hook/cli.rb
site_hook-0.9.10 lib/site_hook/cli.rb
site_hook-0.9.9 lib/site_hook/cli.rb
site_hook-0.9.8 lib/site_hook/cli.rb
site_hook-0.9.7 lib/site_hook/cli.rb
site_hook-0.9.6 lib/site_hook/cli.rb
site_hook-0.9.5 lib/site_hook/cli.rb
site_hook-0.9.4 lib/site_hook/cli.rb
site_hook-0.9.3 lib/site_hook/cli.rb