class FalkorLib::CLI::App

Main Application

Public Class Methods

start(*args) click to toggle source

stackoverflow.com/questions/49042591/how-to-add-help-h-flag-to-thor-command

Calls superclass method
# File lib/falkorlib/cli.rb, line 26
def self.start(*args)
  if (Thor::HELP_MAPPINGS & ARGV).any? and subcommands.grep(/^#{ARGV[0]}/).empty?
    Thor::HELP_MAPPINGS.each do |cmd|
      if match = ARGV.delete(cmd)
        ARGV.unshift match
      end
    end
  end
  super
end

Public Instance Methods

commands() click to toggle source
# File lib/falkorlib/cli.rb, line 58
def commands
  puts App.all_commands.keys.sort - [ "zsh-completions"]
end
config(_key = '') click to toggle source
# File lib/falkorlib/cli.rb, line 73
def config(_key = '')
  info "Thor options:"
  puts options.to_yaml
  info "FalkorLib internal configuration:"
  puts FalkorLib.config.to_yaml
end
gitcrypt(path = '.') click to toggle source
# File lib/falkorlib/cli.rb, line 91
def gitcrypt(path = '.')
  FalkorLib::Bootstrap.gitcrypt(path, options)
end
gitignore(path = '.') click to toggle source
# File lib/falkorlib/cli.rb, line 104
def gitignore(path = '.')
  FalkorLib::Bootstrap.gitignore(path, options)
end
init(name = '.') click to toggle source
method_option :latex, :aliases => '-l', :type => :boolean, :desc => "Initiate a LaTeX project"
#method_option :gem,   :type => :boolean, :desc => "Initiate a Ruby gem project"
method_option :rvm,   :type => :boolean, :desc => "Initiate a RVM-based Ruby project"
method_option :ruby, :default => '1.9.3', :desc => "Ruby version to configure for RVM"
method_option :pyenv, :type => :boolean, :desc => "Initiate a pyenv-based Python project"
method_option :octopress, :aliases => ['-o', '--www'], :type => :boolean, :desc => "Initiate an Octopress web site"

_

# File lib/falkorlib/cli.rb, line 143
def init(name = '.')
  #options[:rvm] = true if options[:rake] or options[:gem]
  # _newrepo(name, options)
  FalkorLib::Bootstrap.repo(name, options)
end
mkdocs(path = '.') click to toggle source
# File lib/falkorlib/cli.rb, line 158
def mkdocs(path = '.')
  FalkorLib::Bootstrap.mkdocs(path, options)
end
motd(path = '.') click to toggle source
# File lib/falkorlib/cli.rb, line 181
def motd(path = '.')
  FalkorLib::Bootstrap.motd(path, options)
end
vagrant(path = '.') click to toggle source
# File lib/falkorlib/cli.rb, line 196
def vagrant(path = '.')
  FalkorLib::Bootstrap.vagrant(path, options)
end
version() click to toggle source
# File lib/falkorlib/cli.rb, line 202
def version
  say "Falkor[Lib] version " + FalkorLib::VERSION, :yellow # + "on ruby " + `ruby --version`
end