Skip to content

Commit

Permalink
thor for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Dec 24, 2010
1 parent 6759403 commit f047951
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
8 changes: 8 additions & 0 deletions bin/vimgolf
@@ -0,0 +1,8 @@
#!/usr/bin/env ruby

lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)

require 'vimgolf/cli'

VimGolf::CLI.start
16 changes: 16 additions & 0 deletions lib/vimgolf/cli.rb
@@ -0,0 +1,16 @@
require 'thor'

module VimGolf
class CLI < Thor

desc "download ID", "download available challenge"
method_options :force => :boolean, :alias => :string
def download(name)
puts "download"
if options.force?
end

end

end
end
11 changes: 6 additions & 5 deletions vimgolf.gemspec
Expand Up @@ -6,13 +6,14 @@ Gem::Specification.new do |s|
s.name = "vimgolf"
s.version = Vimgolf::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["TODO: Write your name"]
s.email = ["TODO: Write your email address"]
s.homepage = "http://rubygems.org/gems/vimgolf"
s.summary = %q{TODO: Write a gem summary}
s.description = %q{TODO: Write a gem description}
s.authors = ["Ilya Grigorik"]
s.email = ["ilya@igvita.com"]
s.homepage = "http://github.com/igrigorik/vimgolf"
s.summary = %q{TODO: CLI client for vimgolf.com}
s.description = s.summary

s.rubyforge_project = "vimgolf"
s.add_dependency = "thor"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down

0 comments on commit f047951

Please sign in to comment.