Class: FalkorLib::CLI::New

Inherits:
Thor
  • Object
show all
Defined in:
lib/falkorlib/cli/new.rb

Overview

Thor class for all bootstrapping / initialization

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



19
20
21
# File 'lib/falkorlib/cli/new.rb', line 19

def self.banner(task, _namespace = true, subcommand = false)
  "#{basename} #{task.formatted_usage(self, true, subcommand)}"
end

Instance Method Details

#commandsObject



25
26
27
# File 'lib/falkorlib/cli/new.rb', line 25

def commands
  puts New.all_commands.keys.sort - [ 'commands' ]
end

#letter(path = Dir.pwd) ⇒ Object

_



88
89
90
# File 'lib/falkorlib/cli/new.rb', line 88

def letter(path = Dir.pwd)
  FalkorLib::Bootstrap.latex(path, :letter, options)
end

#license(path = Dir.pwd) ⇒ Object



97
98
99
100
# File 'lib/falkorlib/cli/new.rb', line 97

def license(path = Dir.pwd)
  license = options[:license] ?  options[:license] : FalkorLib::Bootstrap.select_licence('none')
  FalkorLib::Bootstrap.license(path, license, '', options)
end

#readme(path = '.') ⇒ Object



170
171
172
# File 'lib/falkorlib/cli/new.rb', line 170

def readme(path = '.')
  FalkorLib::Bootstrap.readme(path, options)
end

#repo(name = '.') ⇒ Object

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” _



64
65
66
67
68
# File 'lib/falkorlib/cli/new.rb', line 64

def repo(name = '.')
  options[:rvm] = true if options[:rake] || options[:gem]
  # _newrepo(name, options)
  FalkorLib::Bootstrap.repo(name, options)
end

#rvm(path = '.') ⇒ Object

__



140
141
142
# File 'lib/falkorlib/cli/new.rb', line 140

def rvm(path = '.')
  FalkorLib::Bootstrap.rvm(path, options)
end

#slides(path = Dir.pwd) ⇒ Object

method_option :dir, :aliases => ‘-d’, :desc => ‘Project directory (relative to the git root directory)’ _



109
110
111
# File 'lib/falkorlib/cli/new.rb', line 109

def slides(path = Dir.pwd)
  FalkorLib::Bootstrap.latex(path, :beamer, options)
end

#trash(path = Dir.pwd) ⇒ Object

__



116
117
118
# File 'lib/falkorlib/cli/new.rb', line 116

def trash(path = Dir.pwd)
  FalkorLib::Bootstrap.trash(path)
end

#versionfile(path = '.') ⇒ Object

_



153
154
155
# File 'lib/falkorlib/cli/new.rb', line 153

def versionfile(path = '.')
  FalkorLib::Bootstrap.versionfile(path, options)
end