Skip to content

Commit

Permalink
Fixed shell help output in commands.rb: make clear each command accep…
Browse files Browse the repository at this point in the history
…ts multiple params. Deleted duplicated Update class from commands.rb.
  • Loading branch information
Luca Guidi committed May 19, 2008
1 parent df66cd0 commit 7763ad4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,3 +1,5 @@
* Fixed shell help output in commands.rb: make clear each command accepts multiple params. Deleted duplicated Update class from commands.rb.

* Fixed sashimi.gemspec: sashimi executable is now available after gem setup

* Made AbstractRepository#remove_hidden_folders platform independent
Expand Down
39 changes: 9 additions & 30 deletions lib/sashimi/commands.rb
Expand Up @@ -24,9 +24,9 @@ def options
o.separator ""
o.separator "COMMANDS"

o.separator " install Install plugin from known URL."
o.separator " uninstall Uninstall plugin from local repository."
o.separator " update Update an installed plugin."
o.separator " install Install plugin(s) from known URL(s)."
o.separator " uninstall Uninstall plugin(s) from local repository."
o.separator " update Update installed plugin(s)."
o.separator " list List all installed plugins."
o.separator " add Add installed plugin(s) to a Rails app."

Expand Down Expand Up @@ -85,8 +85,8 @@ def initialize(base_command)
def options
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@base_command.script_name} install URL"
o.define_head "Install a plugin."
o.banner = "Usage: #{@base_command.script_name} install URL [URL2, URL3]"
o.define_head "Install plugin(s) from known URL(s)."
end
end

Expand All @@ -106,8 +106,8 @@ def initialize(base_command)
def options
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@base_command.script_name} uninstall PLUGIN"
o.define_head "Remove an installed plugin."
o.banner = "Usage: #{@base_command.script_name} uninstall PLUGIN [PLUGIN2, PLUGIN3]"
o.define_head "Uninstall plugin(s) from local repository."
end
end

Expand All @@ -127,8 +127,8 @@ def initialize(base_command)
def options
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@base_command.script_name} update PLUGIN"
o.define_head "Update an installed plugin."
o.banner = "Usage: #{@base_command.script_name} update PLUGIN [PLUGIN2, PLUGIN3]"
o.define_head "Update installed plugin(s)."
end
end

Expand All @@ -139,27 +139,6 @@ def parse!(args)
end
end
end

class Uninstall
def initialize(base_command)
@base_command = base_command
end

def options
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@base_command.script_name} uninstall PLUGIN"
o.define_head "Remove an installed plugin."
end
end

def parse!(args)
options.parse!(args)
args.each do |name|
Plugin.new(name).uninstall
end
end
end

class List
def initialize(base_command)
Expand Down

0 comments on commit 7763ad4

Please sign in to comment.