CmdParse::Command
The CLI command for applying a bundle to a webgen website.
Apply the style specified in args[0] to the webgen website.
# File lib/webgen/cli/apply_command.rb, line 45
45: def execute(args)
46: wm = Webgen::WebsiteManager.new(commandparser.directory)
47: if !File.directory?(wm.website.directory)
48: raise "You need to specify a valid webgen website directory!"
49: elsif args.length == 0
50: raise OptionParser::MissingArgument.new('STYLE')
51: else
52: name = Utils.match_bundle_name(wm, args[0])
53: puts "The following files in the website directory will be created or overwritten:"
54: puts wm.bundles[name].paths.sort.join("\n")
55: continue = @force
56: if !continue
57: print "Procede? (yes/no): "
58: continue = ($stdin.readline =~ /y(es)?/)
59: end
60: wm.apply_bundle(name) if continue
61: end
62: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.