Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
nkpart committed Sep 21, 2009
1 parent 914eeab commit 5908c80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 9 additions & 7 deletions lib/dget.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def self.parse_args args


engine, project_spec, file = *args engine, project_spec, file = *args
if (engine && project_spec) if (engine && project_spec)
return [engine, project_spec, file] [engine, project_spec, file]
else
[]
end end

return []
end end


def self.cli(stdin, stdout, args) def self.cli(stdin, stdout, args)
Expand All @@ -36,10 +36,12 @@ def self.cli(stdin, stdout, args)
when "googlecode" when "googlecode"
GC.do(project_spec, file) GC.do(project_spec, file)
end end
else else
stdout.puts "Usage: " stdout.puts <<USAGE
stdout.puts " dget [github|googlecode] [user/project|project] [file]" Usage:
stdout.puts " dget http://github.com/user/project [file]" dget [github|googlecode] [user/project|project] [file]
dget http://github.com/user/project [file]
USAGE
end end
end end
end end
3 changes: 1 addition & 2 deletions spec/dget_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
[["http://wiki.github.com/jgarber/redcloth", "test.html"], ["github", "jgarber/redcloth", "test.html"]] [["http://wiki.github.com/jgarber/redcloth", "test.html"], ["github", "jgarber/redcloth", "test.html"]]
].each do |args, out| ].each do |args, out|
DGet.parse_args(args).should == out DGet.parse_args(args).should == out
end end

end end
end end

0 comments on commit 5908c80

Please sign in to comment.