Skip to content

Commit

Permalink
add blank command and version
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Nov 3, 2010
1 parent faedbd7 commit 7488829
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
0.1.0
19 changes: 19 additions & 0 deletions lib/rubygems/commands/dependent_command.rb
@@ -0,0 +1,19 @@
require 'rubygems/command'

class Gem::Commands::DependentCommand < Gem::Command
def initialize
super 'dependent', 'Show which gems depend on a gem'
end

def arguments
"GEMNAME which gems depend on a gem"
end

def usage
"#{program_name} GEMNAME"
end

def execute
puts "it works #{get_all_gem_names} !?"
end
end
2 changes: 2 additions & 0 deletions lib/rubygems/dependent.rb
Expand Up @@ -2,6 +2,8 @@

module Gem
class Dependent
VERSION = File.read( File.join(File.dirname(__FILE__),'..','..','VERSION') ).strip

def self.find(gem, options={})
specs_and_sources = all_specs_and_sources
if options[:fetch_limit]
Expand Down
4 changes: 4 additions & 0 deletions spec/dependent_spec.rb
Expand Up @@ -7,4 +7,8 @@
dependencies = Gem::Dependent.find('hpricot', :fetch_limit => 10)
dependencies.map{|name, deps| [name, deps.first.name] }.should == expected
end

it "has a VERSION" do
Gem::Dependent::VERSION.should =~ /^\d+\.\d+\.\d+$/
end
end

0 comments on commit 7488829

Please sign in to comment.