git-pivot 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ git-pivot/
data/git-pivot.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "git-pivot"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Luke van der Hoeven"]
8
8
  s.email = ["hungerandthirst@gmail.com"]
data/lib/git-pivot/git.rb CHANGED
@@ -12,14 +12,14 @@ module GitPivot
12
12
 
13
13
  def finish(commit)
14
14
  if has_changes? && commit
15
- out "Please enter your commit message: "
15
+ out "Please enter your commit message: ", false
16
16
  close_commit input
17
17
  elsif has_changes?
18
- exit out "Please commit changes before closing ticket.\n"
18
+ exit out "Please commit changes before closing ticket."
19
19
  end
20
20
 
21
21
  merge_branch
22
- out "Merged changes back to master.\n"
22
+ out "Merged changes back to master."
23
23
  end
24
24
 
25
25
  def config(param)
@@ -19,9 +19,8 @@ module GitPivot
19
19
  id, text = GitPivot::Pivotal.start(ticket, options[:mine])
20
20
 
21
21
  out text
22
- out "\n"
23
22
  out GitPivot::Git.start(id)
24
- out "\nYou are now licensed to develop. Godspeed.\n"
23
+ out "You are now licensed to develop. Godspeed."
25
24
  end
26
25
 
27
26
 
@@ -31,7 +30,7 @@ module GitPivot
31
30
  def finish
32
31
  GitPivot::Pivotal.finish
33
32
  GitPivot::Git.finish(options[:commit])
34
- out "Story complete.\n"
33
+ out "Story complete."
35
34
  end
36
35
  end
37
36
  end
@@ -33,13 +33,16 @@ module GitPivot
33
33
  end
34
34
 
35
35
  def finish
36
- current_story.update(current_state: :finished)
37
- out "Marked story as finished.\n"
36
+ current_story
37
+ exit out "You are not currently working on a story."
38
+
39
+ @story.update(completed: :true)
40
+ out "Marked story as finished."
38
41
  end
39
42
 
40
43
  def info
41
44
  current_story
42
- return "No info found for Pivotal Tracker.\n" if @story.nil?
45
+ return "No info found for Pivotal Tracker." if @story.nil?
43
46
  """
44
47
  -- Pivotal Info --
45
48
  Name: #{@story.name}
@@ -1,7 +1,8 @@
1
1
  module GitPivot
2
2
  module Shared
3
- def out(text)
3
+ def out(text, newline=true)
4
4
  $stdout.write text
5
+ $stdout.write "\n" if newline
5
6
  end
6
7
 
7
8
  def input
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: git-pivot
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Luke van der Hoeven
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-12 00:00:00 -04:00
13
+ date: 2011-05-23 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency