pivotal-integration 1.6.0.1 → 1.6.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODY3YjFhNGFjYjYxMjdhYmU1Zjc3Mzg0YjVhZTk0NjQwYjZhYWU0Zg==
4
+ MDA0MzQ0NjdkMTNiN2ViMTViM2Y0MGU2YmYzN2M5Nzg4OGRmMjAxYw==
5
5
  data.tar.gz: !binary |-
6
- Mjk2ODZhNjI5NGY1OTk4ZGI4NTcyNzYyZGM1ZmY2OWM2NjA4OGE3Yw==
6
+ ZDI5NmVkMTI4YWRhZjk0M2M4NzgzODg2MTg3MDBlMTAzZDI5ZWY1OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzM2NTFmNDNmMjY1MjFmOTBjZmFhYWU0ODdlMjZjZjZmMmFmOTA1MmM2N2Vj
10
- NTU5ZWMyZjA4NGIxMjRmYTJkMGNiZjhlMDAyMzRhZjQ3NDRiYzVmOGIwOTAy
11
- MDM1ODU0ZTZjZjUwNTFhOWU1MjJmMGVkOGM4ZWExODM4NzVhYjQ=
9
+ NDc3OWNmMzYzMzg4YzMyOWE2NzQ3OGFjNjBmMWYxODNiZGIwMTQ5ZmRlNTk4
10
+ NDBhN2VmYjcwYTM4NzU4ZDFhOGVkYzBiZWI4NWMwNjIzNTcwNGJkOWU3OWFi
11
+ YjI5M2Y0NWViMGRmOTFlZTE2NGYyNTc5OTE2NThjZjkyZTAzMzA=
12
12
  data.tar.gz: !binary |-
13
- ZTgwZTE5YjA5MjNjN2JhYmY4MDI2ZDI0OTdkZjE3MmJjNzE1YTg0ZjIwZmIy
14
- NGM1ZjY3YzZhNmQ0YjQwYzAzMjFkYmM0MzFiYzg2MjNkZmNlOGI4N2JlMDc0
15
- OGY5OGE1NjYzNWI0Mjg1NzAxYmU5YWE2YTIzOTdiZmFhN2MxNTg=
13
+ YjEzODE1ODdkMTU4ODk0Nzc1NjdhMjQ3Y2YwZmVlZjQ4ZmY3YmIwNmRjYTZh
14
+ NDlhZTUyZjFiY2YwYzliMTgwYTVmZWI2ODg5NjBlOTk4ODk5NGUwMGFhMDMw
15
+ ZWRmN2U4M2RmMjIwZDlkODM1YWQwNjUwZmViYTcyNmUzNzk0MmE=
data/README.md CHANGED
@@ -1,11 +1,5 @@
1
1
  # Git Pivotal Tracker Integration
2
- [![Build Status](https://travis-ci.org/nebhale/git-pivotal-tracker-integration.png?branch=master)](https://travis-ci.org/nebhale/git-pivotal-tracker-integration)
3
- [![Gem Version](https://badge.fury.io/rb/git-pivotal-tracker-integration.png)](http://badge.fury.io/rb/git-pivotal-tracker-integration)
4
- [![Dependency Status](https://gemnasium.com/nebhale/git-pivotal-tracker-integration.png)](http://gemnasium.com/nebhale/git-pivotal-tracker-integration)
5
- [![Code Climate](https://codeclimate.com/github/nebhale/git-pivotal-tracker-integration.png)](https://codeclimate.com/github/nebhale/git-pivotal-tracker-integration)
6
-
7
-
8
- `pivotal-integration` provides a set of additional Git commands to help developers when working with [Pivotal Tracker][pivotal-tracker].
2
+ `pivotal-integration` provides a set of additional Git commands to help developers when working with [Pivotal Tracker][pivotal-tracker]. It is based on and extended from [git-pivotal-tracker-integration](https://github.com/nebhale/git-pivotal-tracker-integration) by Ben Hale.
9
3
 
10
4
  [pivotal-tracker]: http://www.pivotaltracker.com
11
5
 
data/bin/pivotal CHANGED
@@ -33,7 +33,7 @@ def print_command_help(commands)
33
33
  end
34
34
 
35
35
  def show_help
36
- puts "Usage: git pivotal [--help] <command> [<args>]"
36
+ puts "Usage: pivotal [--help] <command> [<args>]"
37
37
  puts
38
38
 
39
39
  main_commands = COMMANDS.select{ |c| %w(start finish new).include? c.name.demodulize.downcase }
@@ -48,21 +48,46 @@ def show_help
48
48
  end
49
49
 
50
50
  begin
51
- options = {}
52
- optparse = OptionParser.new do |opts|
53
- opts.on('-h', '--help') do
54
- show_help
55
- exit
56
- end
51
+ if COMMAND_NAMES.include?(ARGV.first.try(:downcase))
52
+ command = ARGV.shift.downcase
53
+
54
+ options = {}
55
+ optparse = OptionParser.new do |opts|
56
+ opts.on('-h', '--help') do
57
+ show_help
58
+ exit
59
+ end
60
+
61
+ opts.on('-S', '--story ID') do |id|
62
+ options[:story_id] = id
63
+ end
64
+
65
+ if command == 'start'
66
+ opts.on('--use-current') do
67
+ options[:use_current] = true
68
+ end
69
+ end
57
70
 
58
- opts.on('-S', '--story ID') do |id|
59
- options[:story_id] = id
71
+ if command == 'finish'
72
+ opts.on('--pull-request') do
73
+ options[:pull_request] = true
74
+ end
75
+
76
+ opts.on('--no-complete') do
77
+ options[:no_complete] = true
78
+ end
79
+
80
+ opts.on('--no-delete') do
81
+ options[:no_delete] = true
82
+ end
83
+
84
+ opts.on('--no-merge') do
85
+ options[:no_merge] = true
86
+ end
87
+ end
60
88
  end
61
- end
62
- optparse.parse!
89
+ optparse.parse!
63
90
 
64
- if COMMAND_NAMES.include?(ARGV.first.try(:downcase))
65
- command = ARGV.shift
66
91
  command_class = PivotalIntegration::Command.const_get(command.classify)
67
92
  command_class.new(options).run(*ARGV)
68
93
 
@@ -27,10 +27,10 @@ class PivotalIntegration::Command::Finish < PivotalIntegration::Command::Base
27
27
  #
28
28
  # @return [void]
29
29
  def run(*arguments)
30
- no_complete = arguments.delete('--no-complete')
31
- no_delete = arguments.delete('--no-delete')
32
- no_merge = arguments.delete('--no-merge')
33
- pull_request = arguments.delete('--pull-request') || PivotalIntegration::Util::Git.finish_mode == :pull_request
30
+ no_complete = @options.fetch(:no_complete, false)
31
+ no_delete = @options.fetch(:no_delete, false)
32
+ no_merge = @options.fetch(:no_merge, false)
33
+ pull_request = @options.fetch(:pull_request, false) || PivotalIntegration::Util::Git.finish_mode == :pull_request
34
34
 
35
35
  if pull_request
36
36
  PivotalIntegration::Util::Git.push PivotalIntegration::Util::Git.branch_name
@@ -21,6 +21,6 @@ if [[ $2 != "commit" && -n $STORY_ID ]]; then
21
21
  ORIG_MSG_FILE="$1"
22
22
  TEMP=$(mktemp /tmp/git-XXXXX)
23
23
 
24
- (printf "\n\n[#$STORY_ID] " ; cat "$1") > "$TEMP"
24
+ (cat "$1" ; printf "\n\n[#$STORY_ID]") > "$TEMP"
25
25
  cat "$TEMP" > "$ORIG_MSG_FILE"
26
26
  fi
@@ -33,7 +33,7 @@ class PivotalIntegration::Command::Start < PivotalIntegration::Command::Base
33
33
  # @return [void]
34
34
  def run(*arguments)
35
35
  filter = arguments.first
36
- use_current_branch = arguments.delete('--use-current')
36
+ use_current_branch = @options.fetch(:use_current, false)
37
37
 
38
38
  if filter == 'new'
39
39
  arguments.shift
@@ -176,7 +176,7 @@ class PivotalIntegration::Util::Git
176
176
  when :web
177
177
  # Open the PR editor in a web browser
178
178
  repo = get_config('remote.origin.url')[/(?<=git@github.com:)[a-z0-9_-]+\/[a-z0-9_-]+/]
179
- title = CGI::escape("#{story.name} [##{story.id}]")
179
+ title = CGI::escape("[##{story.id}] #{story.name}]")
180
180
  Launchy.open "https://github.com/#{repo}/compare/#{branch_name}?expand=1&pull_request[title]=#{title}"
181
181
 
182
182
  else
@@ -15,4 +15,5 @@
15
15
 
16
16
  # The root module for the project
17
17
  module PivotalIntegration
18
+ VERSION = '1.6.0.2'
18
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-integration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.1
4
+ version: 1.6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hale
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-21 00:00:00.000000000 Z
12
+ date: 2014-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime