lib/whipped-cream/cli.rb in whipped-cream-0.0.1 vs lib/whipped-cream/cli.rb in whipped-cream-0.1.0
- old
+ new
@@ -7,11 +7,11 @@
default_task :usage
desc "usage", "Display usage banner", hide: true
def usage
puts [
- "whipped-cream #{WhippedCream::VERSION}",
+ "Whipped Cream #{WhippedCream::VERSION}",
"https://github.com/justincampbell/whipped-cream"
].join("\n")
puts "\n"
@@ -35,15 +35,17 @@
desc "start PLUGIN", "Start a plugin"
method_option :daemonize,
type: :boolean,
desc: "Run the server in the background"
+ method_option :port,
+ desc: "Choose a different port to run the server on"
def start(plugin_name)
plugin_path = resolve_plugin(plugin_name)
plugin = Plugin.from_file(plugin_path)
- server = Server.new(plugin)
- server.start(options)
+ server = Server.new(plugin, options)
+ server.start
end
no_tasks do
def resolve_plugin(name)
name # TODO: resolve name to filename