spire-git-pivotal-tracker 1.0.0 → 1.1.0

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.
@@ -50,7 +50,14 @@ class GitPivotalTrackerIntegration::Command::Start < GitPivotalTrackerIntegratio
50
50
  private
51
51
 
52
52
  def development_branch_name(story)
53
- branch_name = "#{story.id}-" + ask("Enter branch name (#{story.id}-<branch-name>): ")
53
+ suggested = "#{story.id}-#{story.name.strip.gsub(/[^a-zA-Z0-9]/, '-').squeeze}"
54
+ puts "suggested name: #{suggested}"
55
+ user_choice = ask("Enter branch name (or enter to accept suggestion)").strip
56
+ if (user_choice == '')
57
+ branch_name = suggested
58
+ else
59
+ branch_name = "#{story.id}-" + user_choice.gsub(/[^a-zA-Z0-9]/, '-').squeeze
60
+ end
54
61
  puts
55
62
  branch_name
56
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spire-git-pivotal-tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-02 00:00:00.000000000 Z
12
+ date: 2016-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline