-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.rb
28 lines (26 loc) · 820 Bytes
/
cli.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Skellington
class CLI < Thor
desc 'version', 'Print the version'
def version
puts "skellington version #{VERSION}"
end
map %w(-v --version) => :version
desc 'generate some_path', 'Generate a skeleton Sinatra app named SomePath at some_path'
method_option :licensor,
aliases: '-l',
description: 'Name to insert into the license file'
def generate wormname
@g = Generator.new wormname
@g.licensor = options[:licensor]
@g.run
end
map %w(-g) => :generate
desc 'postinstall', 'Show some helpful hints'
def postinstall
s = 'For some other things you might find useful, see this gist:'
s << "\n\n"
s << ' https://gist.github.com/pikesley/1789cab7b10f0d8765d4'
puts s
end
end
end