Class: MetaProject::Tracker::XForge::XForgeTracker

Inherits:
Base
  • Object
show all
Includes:
DigitIssues
Defined in:
lib/meta_project/tracker/xforge/xforge_tracker.rb

Direct Known Subclasses

RubyForgeTracker, SourceForgeTracker

Defined Under Namespace

Classes: SubTracker

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DigitIssues

command_pattern, #identifier_examples, issue_pattern, #markup

Methods inherited from Base

classes

Constructor Details

#initialize(overview = nil, project = nil) ⇒ XForgeTracker

TODO: don’t pass in project!! pass in hostname and id! This won’t work from DC!!



15
16
17
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 15

def initialize(overview=nil, project=nil)
  @overview, @project = overview, project
end

Instance Attribute Details

#overviewObject

Returns the value of attribute overview.



12
13
14
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 12

def overview
  @overview
end

#projectObject

Returns the value of attribute project.



12
13
14
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 12

def project
  @project
end

Instance Method Details

#create(issue, user_name, password) ⇒ Object



32
33
34
35
36
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 32

def create(issue, user_name, password)
  # TODO: get the subtracker atid or name from the issue's options
  subtracker = sub_trackers[0]
  subtracker.create(issue, user_name, password)
end

#issue(identifier) ⇒ Object

Finds an Issue by identifier



20
21
22
23
24
25
26
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 20

def issue(identifier)
  sub_trackers.each do |sub_tracker|
    issue = sub_tracker.issue(identifier)
    return issue unless issue.nil?
  end
  nil
end

#materialize(issue) ⇒ Object



28
29
30
# File 'lib/meta_project/tracker/xforge/xforge_tracker.rb', line 28

def materialize(issue)
  issue
end