ding 1.2.0 → 1.2.2
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 +3 -3
- data/lib/ding/models/git.rb +12 -7
- 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: b6894adf146cfef036be30a3509a7f799be6d206
|
4
|
+
data.tar.gz: 3c7ddb4379dd7df1f909079c7b758daf648ce705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7ffdd1ac10d674e21e7cfcd38c9f3bbbb92fa855054e76fc8912f4e69283244500c5ced02432fa143f58738d324a26023122389a7c1dbb7e3bfb527a300cb84
|
7
|
+
data.tar.gz: 08cdc83e6e375be3de31be1f5658315f529bf6de3c15ec2708792024eddf5360c368ef0570bf6608eccf1ee6f5f229357e084be825f8e0322ebc65e2fcd46239
|
data/lib/ding/cli.rb
CHANGED
@@ -30,11 +30,11 @@ module Ding
|
|
30
30
|
say "> Deleting #{testing_branch}", :green
|
31
31
|
r.delete_branch(testing_branch)
|
32
32
|
|
33
|
-
say ">
|
34
|
-
r.
|
33
|
+
say "> Synchronising with the remote", :green
|
34
|
+
r.update
|
35
35
|
end
|
36
36
|
|
37
|
-
branches = repo.
|
37
|
+
branches = repo.remote_branches(options[:pattern])
|
38
38
|
if branches.empty?
|
39
39
|
say "\n --> No feature branches available to test, I'm out of here!\n\n", :red
|
40
40
|
exit 1
|
data/lib/ding/models/git.rb
CHANGED
@@ -9,9 +9,17 @@ module Ding
|
|
9
9
|
raise "#{repo} is NOT a git repository" unless git_repo?
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def local_branches(pattern)
|
13
|
+
branches pattern, false
|
14
|
+
end
|
15
|
+
|
16
|
+
def remote_branches(pattern)
|
17
|
+
branches pattern, true
|
18
|
+
end
|
19
|
+
|
20
|
+
def branches(pattern, remote=true)
|
13
21
|
merged = options[:merged] ? '--merged' : '--no-merged'
|
14
|
-
remote =
|
22
|
+
remote = '--remote' if remote
|
15
23
|
%x(git branch #{remote} --list #{remote_version(pattern)} #{merged}).split
|
16
24
|
end
|
17
25
|
|
@@ -70,12 +78,9 @@ module Ding
|
|
70
78
|
end
|
71
79
|
end
|
72
80
|
|
73
|
-
def fetch_branches
|
74
|
-
raise "Error synchronising with the remote" unless run_cmd 'git fetch --all'
|
75
|
-
end
|
76
|
-
|
77
81
|
def update
|
78
|
-
|
82
|
+
command = options[:local] ? 'git up' : 'git fetch --all'
|
83
|
+
raise "Error synchronising with the remote" unless run_cmd command
|
79
84
|
end
|
80
85
|
|
81
86
|
def reset_local_state
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Warren Bain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|