Class: Flux::Trackers::PivotalTracker

Inherits:
Thor
  • Object
show all
Includes:
Util
Defined in:
lib/flux/trackers/pivotal_tracker.rb

Constant Summary collapse

STATES_W_ESTIMATE =
%w(started finished delivered accepted rejected)
STATES =
%w(unscheduled unstarted) + STATES_W_ESTIMATE
MAPPINGS =
Hash.new { |h, k| h[k] = k }

Instance Method Summary collapse

Methods included from Util

#puts_table

Instance Method Details

#finish(story_id) ⇒ Object



21
22
23
# File 'lib/flux/trackers/pivotal_tracker.rb', line 21

def finish(story_id)
  update_state story_id, 'finished'
end

#grab(story_id) ⇒ Object



27
28
29
30
31
32
# File 'lib/flux/trackers/pivotal_tracker.rb', line 27

def grab(story_id)
  attrs            = {:owner => me.name}
  attrs[:estimate] = options[:estimate] if options[:estimate]

  update_attributes story_id, attrs
end

#listObject



14
15
16
17
# File 'lib/flux/trackers/pivotal_tracker.rb', line 14

def list
  list_stories pt::Iteration.
    current_backlog(fake_project).map { |i| i.stories }.flatten
end

#start(story_id) ⇒ Object



36
37
38
# File 'lib/flux/trackers/pivotal_tracker.rb', line 36

def start(story_id)
  update_state story_id, 'started'
end

#update(story_id) ⇒ Object



49
50
51
# File 'lib/flux/trackers/pivotal_tracker.rb', line 49

def update(story_id)
  update_attributes story_id, options[:attributes]
end