Module: GitPivot::Pivotal
- Extended by:
- Shared
- Defined in:
- lib/git-pivot/pivotal.rb
Class Method Summary collapse
- .deliver ⇒ Object
- .finish ⇒ Object
- .info ⇒ Object
- .project ⇒ Object
-
.start(id = nil, mine = false) ⇒ Object
will ignore id if mine is true.
- .user ⇒ Object
Methods included from Shared
Class Method Details
.deliver ⇒ Object
42 43 44 45 46 47 |
# File 'lib/git-pivot/pivotal.rb', line 42 def deliver current_story @story.update(current_state: :delivered) out "Marked story as delivered." end |
.finish ⇒ Object
35 36 37 38 39 40 |
# File 'lib/git-pivot/pivotal.rb', line 35 def finish current_story @story.update(completed: true) out "Marked story as finished." end |
.info ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/git-pivot/pivotal.rb', line 49 def info current_story """ -- Pivotal Info -- Name: #{@story.name} URL: #{@story.url} Desc: #{@story.description} """ end |
.project ⇒ Object
18 19 20 21 |
# File 'lib/git-pivot/pivotal.rb', line 18 def project tracker @project ||= PivotalTracker::Project.find GitPivot::Git.config 'pivotal.project-id' end |
.start(id = nil, mine = false) ⇒ Object
will ignore id if mine is true
28 29 30 31 32 33 |
# File 'lib/git-pivot/pivotal.rb', line 28 def start(id=nil, mine=false) story = (mine || id.nil?) ? project.stories.all(owned_by: user).first : project.stories.find(id) story.update(owned_by: user, current_state: :started) return [story.id, story.story_type, "Story #{id} started..."] end |