ding 1.2.4 → 1.2.5

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: fe5e1d69894d7cc671a8548c30b5fc80a0c3b8cb
4
- data.tar.gz: 335f9ad291ea78cd4b0970886053692717132ff8
3
+ metadata.gz: 852f8d7b2c81e1f9add37fc53fa7c1451507beb8
4
+ data.tar.gz: bea5f5455250cd77a750981d0095bc96ba93bce8
5
5
  SHA512:
6
- metadata.gz: e8a1100a6bc0217b6507be4f1fe28ca983231745260099be0732a613216b8332abaeaf8a327e16f10792916a8ab408df9cb20d82e7c30adf5f9ac33dbd4bd3c6
7
- data.tar.gz: 5a173fe81594030dbc9f192f97fb583f3d108566c156b31c3e254cf6a17dbeb9b4e6d66accab9aaa59d374fcbccd4c8f5954839de08aed793afc1a9d3c7adf89
6
+ metadata.gz: 89077adae81bba83de931a1ab9dd14a821e33b9c4f573e51a73dca48a9285959dde0fe981b91c7779bbc3df08d5936ea406baf561dee279bdc39b6fd3ac3d7e4
7
+ data.tar.gz: bd458bcc277ddb7d01e6bd6e977503859972ab12127c3c924c92edaab63ce20299488e5dd8e1ed95ca7b568196e275bd1275da35bb96daf209b7557387b7b532
data/lib/ding/cli.rb CHANGED
@@ -39,9 +39,10 @@ module Ding
39
39
  say "\n --> No feature branches available to test, I'm out of here!\n\n", :red
40
40
  exit 1
41
41
  end
42
-
43
42
  feature_branches = ask_which_item(branches, "\nWhich feature branch should I use?", :multiple)
44
43
 
44
+ commit_parents = repo.commit_parents(testing_branch)
45
+
45
46
  repo.tap do |r|
46
47
  say "\n> Deleting any synched #{testing_branch}", :green
47
48
  r.delete_branch(testing_branch)
@@ -67,6 +68,11 @@ module Ding
67
68
  say "\n --> There were merge errors, ding dang it!\n\n", :red
68
69
  exit 1
69
70
  end
71
+
72
+ if repo.commit_parents(testing_branch).sort == commit_parents.sort
73
+ result = options[:verbose] ? ": #{commit_parents}" : ''
74
+ say "\n --> That did not alter the testing branch commit parents#{result}!\n", :yellow
75
+ end
70
76
  end
71
77
 
72
78
  rescue => e
@@ -164,7 +170,7 @@ module Ding
164
170
 
165
171
  say question
166
172
  reply = ask(" >", :yellow).to_s
167
- replies = reply.split(',')
173
+ replies = reply.split(',').map(&:strip)
168
174
  if reply.empty? || reply.upcase == 'Q'
169
175
  say "\n --> OK, nothing for me to do here but ding ding ding!\n\n", :green
170
176
  exit 0
@@ -40,6 +40,10 @@ module Ding
40
40
  %x(git rev-parse --abbrev-ref HEAD)
41
41
  end
42
42
 
43
+ def commit_parents(branch)
44
+ %x(git rev-list --parents -n 1 #{remote_version(branch)}).split.drop(1)
45
+ end
46
+
43
47
  def delete_branch(branch)
44
48
  local_branch = local_version(branch)
45
49
  remote_branch = remote_version(branch)
data/lib/ding/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ding
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Bain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-18 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler