7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/papers/cli.rb', line 7
def run
options.parse!
case @command
when :generate
Papers::ManifestGenerator.new.generate!
when :update
Papers::ManifestUpdater.new.update!
when :help
emit_help ""
else
emit_help "Unrecognized command."
end
rescue Papers::FileExistsError => e
warn "Error: 'papers_manifest.yml' already exists at '#{e.message}'. Aborting..."
rescue OptionParser::ParseError => e
emit_help "Problem parsing options: #{e.message}"
end
|