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 +4 -4
- data/lib/ding/cli.rb +8 -2
- data/lib/ding/models/git.rb +4 -0
- data/lib/ding/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 852f8d7b2c81e1f9add37fc53fa7c1451507beb8
|
4
|
+
data.tar.gz: bea5f5455250cd77a750981d0095bc96ba93bce8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/ding/models/git.rb
CHANGED
@@ -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
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
|
+
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-
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|