Permalink
Browse files

moar

  • Loading branch information...
1 parent 914eeab commit 5908c8089bd1113e871c1996505eb34727f167a1 @nkpart committed Sep 21, 2009
Showing with 10 additions and 9 deletions.
  1. +9 −7 lib/dget.rb
  2. +1 −2 spec/dget_spec.rb
View
@@ -20,10 +20,10 @@ def self.parse_args args
engine, project_spec, file = *args
if (engine && project_spec)
- return [engine, project_spec, file]
+ [engine, project_spec, file]
+ else
+ []
end
-
- return []
end
def self.cli(stdin, stdout, args)
@@ -36,10 +36,12 @@ def self.cli(stdin, stdout, args)
when "googlecode"
GC.do(project_spec, file)
end
- else
- stdout.puts "Usage: "
- stdout.puts " dget [github|googlecode] [user/project|project] [file]"
- stdout.puts " dget http://github.com/user/project [file]"
+ else
+ stdout.puts <<USAGE
+ Usage:
+ dget [github|googlecode] [user/project|project] [file]
+ dget http://github.com/user/project [file]
+USAGE
end
end
end
View
@@ -9,7 +9,6 @@
[["http://wiki.github.com/jgarber/redcloth", "test.html"], ["github", "jgarber/redcloth", "test.html"]]
].each do |args, out|
DGet.parse_args(args).should == out
- end
-
+ end
end
end

0 comments on commit 5908c80

Please sign in to comment.