Class: Gem::Commands::IssuesCommand

Inherits:
Gem::Command
  • Object
show all
Defined in:
lib/rubygems/commands/issues_command.rb

Instance Method Summary collapse

Constructor Details

#initializeIssuesCommand

Returns a new instance of IssuesCommand.



3
4
5
# File 'lib/rubygems/commands/issues_command.rb', line 3

def initialize
  super 'issues', "Open a gem's issue tracker"
end

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rubygems/commands/issues_command.rb', line 7

def execute
  require "rubygems/home/spec_loader"
  require "rubygems/home/browser"

  name = get_one_gem_name
  link = ::Gem::Home::SpecLoader.get_issues_url(name)
  if link
    ::Gem::Home::Browser.open_link(link)
  else
    puts "We did our best, but there are no links for this gem"
    exit 1
  end
end