bin/powder in powder-0.3.1 vs bin/powder in powder-0.3.2
- old
+ new
@@ -1,6 +1,6 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
require 'fileutils'
require 'net/https'
@@ -105,12 +105,12 @@
desc "stop", "An alias to down"
alias :stop :down
desc "link", "Link a pow"
- method_option :force, :type => :boolean, :default => false, :alias => '-f', :desc => "remove the old configuration, overwrite .powder"
- method_option :"no-config", :type => :boolean, :default => false, :alias => '-n', :desc => "do not write a .powder file"
+ method_option :force, :type => :boolean, :default => false, :aliases => '-f', :desc => "remove the old configuration, overwrite .powder"
+ method_option :"no-config", :type => :boolean, :default => false, :aliases => '-n', :desc => "do not write a .powder file"
def link(name=nil)
return unless is_powable?
if File.symlink?(POW_PATH)
current_path = %x{pwd}.chomp
if name
@@ -180,11 +180,11 @@
print_table(pows)
end
desc "open", "Open a pow in the browser"
method_option :browser, :type => :string, :default => nil, :aliases => '-b', :desc => 'browser to open with'
- method_option :xip, :type => :boolean, :default => false, :alias => '-x', :desc => "open xip.io instead of .domain"
+ method_option :xip, :type => :boolean, :default => false, :aliases => '-x', :desc => "open xip.io instead of .domain"
def open(name=nil)
browser = options.browser? ? "-a \'#{options.browser}\'" : nil
if options.xip?
local_ip = '0.0.0.0'
begin
@@ -201,11 +201,11 @@
%x{open #{browser} http://#{name || get_pow_name}.#{domain}}
end
end
desc "unlink", "Unlink a pow app"
- method_option :delete, :type => :boolean, :default => false, :alias => '-e', :desc => "delete .powder"
+ method_option :delete, :type => :boolean, :default => false, :aliases => '-e', :desc => "delete .powder"
def unlink(name=nil)
return unless is_powable?
FileUtils.rm_f POW_PATH + '/' + (name || get_pow_name)
say "Successfully removed #{(name || get_pow_name)}"
if options[:delete]
@@ -346,10 +346,10 @@
json.each {|k,v| say "#{k.ljust(12, ' ')} #{v}"}
end
desc "portmap PORT", "Map a port to an app"
method_option :name, :type => :string, :aliases => '-n', :desc => 'name of the port map'
- method_option :force, :type => :boolean, :default => false, :alias => '-f', :desc => "remove the old configuration, overwrite .powder"
+ method_option :force, :type => :boolean, :default => false, :aliases => '-f', :desc => "remove the old configuration, overwrite .powder"
def portmap(port)
if File.symlink?(POW_PATH)
name = options.name ? options.name : get_pow_name
app_path = "#{POW_PATH}/#{name}"
FileUtils.rm_f(app_path) if options[:force]