git_pr 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8cc6ae5ee1b8542c6604e93b867b02f2ad50b3b
4
- data.tar.gz: 2c5cba47012e107e6abcfded23dfeaf2854b7d75
3
+ metadata.gz: 7dd812898dce3ddc1a3640e6e2313f0e825c61c2
4
+ data.tar.gz: 2f94a7acbf7ee95099dfc834256300d981dd4bb2
5
5
  SHA512:
6
- metadata.gz: 932da4da4bdc06625caa8a4db56343a703e0e06bb4418e6643d08b2acb1a28e7b8426ad9ef839d500eb239ae8bd8ba0b43b501762672fb709eade05d91ab89e9
7
- data.tar.gz: f4cdb8e73c7e3eae5375186f9f4eefd1df25ed02c31e3213456df13577b956e41f3c8cab376dd80e8408ac2c1c2bf3b681b839301f6730fb3eab3e93b73587c5
6
+ metadata.gz: 06cb3c21ac7e1fd42d1b34756099615641ff2aeddc82060bee1c293dbbc16f2b73e35ea36ae54892bf98898a4a528fd3a58a4d8f09e075fbaf104e3327b93967
7
+ data.tar.gz: f9888e80c161f5eba816f81cf3f8425ee41db36d8ec8cff205f9ac95083c3595cfd7d1169a10696fec87c3b40da424153e5bd11eb5fe385258a09fec9a815308
data/lib/git_pr/github.rb CHANGED
@@ -97,9 +97,12 @@ module GitPr
97
97
  project_remote = git.remotes.find { |x| default_remotes.include? x.name }
98
98
  end
99
99
  if project_remote
100
- url_match = project_remote.url.match "^git@github.com:(.*).git"
100
+ # Regex comment: match the github_user/repository non-greedily (.*?), and
101
+ # accept an optional .git at the end, but don't capture it (?:\.git).
102
+ url_match = project_remote.url.match /^git@github.com:(.*?)(?:\.git)?$/
101
103
  unless url_match
102
104
  puts "Specified remote '#{project_remote}' is not a GitHub remote.".red
105
+ puts "Remote URL: #{project_remote.url}".red if $verbose
103
106
  exit -1
104
107
  end
105
108
  github_project = url_match[1]
data/lib/git_pr/merge.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'shellwords'
2
+
1
3
  module GitPr
2
4
 
3
5
  def self.ensure_remotes_for_pull_request git, pull
@@ -103,7 +105,7 @@ module GitPr
103
105
  # merge commit is created.
104
106
  puts "Merging changes from '#{rebase_branch}' to '#{target_branch}'"
105
107
  GitPr.run_command "git checkout -q #{target_branch}"
106
- GitPr.run_command "git merge --no-ff #{rebase_branch} -m 'Merge #{pull_summary(pull)}'"
108
+ GitPr.run_command "git merge --no-ff #{rebase_branch} -m #{Shellwords.escape("Merge " + pull_summary(pull))}"
107
109
 
108
110
  # Print a log of the merge with branch structure visible. Jump through hoops to
109
111
  # get the right branch to start the log revision range with. If origin/develop
@@ -1,3 +1,3 @@
1
1
  module GitPr
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Sharon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize