mobi_check_in 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module MobiCheckIn
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
data/lib/mobi_check_in.rb CHANGED
@@ -19,6 +19,14 @@ module MobiCheckIn
19
19
  end
20
20
  end
21
21
 
22
+ def self.printable_story_number
23
+ if story_number =~ /^\d*$/
24
+ "MOBI-#{story_number}"
25
+ else
26
+ story_number
27
+ end
28
+ end
29
+
22
30
  def self.incremental options={}
23
31
  pair_names = ""
24
32
  story_number = ""
@@ -39,8 +47,6 @@ module MobiCheckIn
39
47
  begin
40
48
  $stdout.write "Story number (NA) [#{story_number}]: "
41
49
  input = $stdin.gets.strip
42
- input = "MOBI-#{input}" if input =~ /^\d*$/
43
- return if story_number && input.empty?
44
50
  story_number = input unless input.empty?
45
51
  end until !story_number.empty?
46
52
 
@@ -51,7 +57,7 @@ module MobiCheckIn
51
57
  if story_number.delete("/").downcase == "na"
52
58
  commit_message = ""
53
59
  else
54
- commit_message = "#{story_number} - #{pair_names} - "
60
+ commit_message = "#{printable_story_number} - #{pair_names} - "
55
61
  end
56
62
 
57
63
  author = "#{pair_names}"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 18
9
- version: 0.0.18
8
+ - 19
9
+ version: 0.0.19
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Kormushoff