git-bundle 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/LICENSE.txt +1 -1
- data/lib/git_bundle/commands/generic.rb +35 -5
- data/lib/git_bundle/console.rb +7 -1
- data/lib/git_bundle/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: 5fd3dff341b34d70c5e00235262bb39cfe394cbf
|
4
|
+
data.tar.gz: 36f3501f1d8cda04c76e556728bec30c0c305917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852ec697b4e298057ddaffa3e72f9816336496e9aac114fc2f3385ba1e5d9e19147d4921eb0290b1dbc3fc96db98c30fef818cfd2e03b9de2fb7e96c3e32b605
|
7
|
+
data.tar.gz: 61749820a89a6694db8f698f858ae5f3478666cc5a7cdd4b4897138870e6185095a9658fcded76abe25b66eef703fe6d8597f0b59f8b681920f5021255562774
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
@@ -8,14 +8,44 @@ module GitBundle
|
|
8
8
|
@args = args
|
9
9
|
end
|
10
10
|
|
11
|
+
def print_wait_line(names)
|
12
|
+
STDOUT.print "Waiting for #{names.map {|name| colorize(name, COLORS[:highlight], true)}.join(', ')}"
|
13
|
+
STDOUT.flush
|
14
|
+
end
|
15
|
+
|
11
16
|
def invoke
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
repository_results = @repositories.map {|repo| {repository: repo, output: '', error: false, complete: false, thread: nil}}
|
18
|
+
|
19
|
+
@repositories.each_with_index do |repo, index|
|
20
|
+
results = repository_results[index]
|
21
|
+
results[:thread] = Thread.new do
|
22
|
+
results[:output] = repo.execute_git(@args, color: true)
|
23
|
+
results[:error] = true unless $?.exitstatus == 0
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
waiting_for_repositories = @repositories.map(&:name)
|
28
|
+
print_wait_line(waiting_for_repositories)
|
29
|
+
|
30
|
+
until waiting_for_repositories.empty?
|
31
|
+
repository_results.each do |result|
|
32
|
+
next if result[:complete]
|
33
|
+
|
34
|
+
if result[:thread].join(0.1)
|
35
|
+
result[:complete] = true
|
36
|
+
clear_line
|
37
|
+
|
38
|
+
puts_repo_heading(result[:repository])
|
39
|
+
puts result[:output]
|
40
|
+
|
41
|
+
waiting_for_repositories.delete(result[:repository].name)
|
42
|
+
print_wait_line(waiting_for_repositories) unless waiting_for_repositories.empty?
|
43
|
+
end
|
44
|
+
end
|
17
45
|
end
|
18
46
|
|
47
|
+
puts ''
|
48
|
+
errors = repository_results.select {|r| r[:error]}.map {|r| r[:repository].name}
|
19
49
|
puts_error "Command failed in #{errors.join(', ')}." unless errors.empty?
|
20
50
|
end
|
21
51
|
end
|
data/lib/git_bundle/console.rb
CHANGED
@@ -3,7 +3,13 @@ module GitBundle
|
|
3
3
|
COLORS = {error: 31,
|
4
4
|
attention: 32,
|
5
5
|
prompt: 33,
|
6
|
-
heading: 34
|
6
|
+
heading: 34,
|
7
|
+
highlight: 36}
|
8
|
+
|
9
|
+
def clear_line
|
10
|
+
STDOUT.print "\r\e[0K"
|
11
|
+
STDOUT.flush
|
12
|
+
end
|
7
13
|
|
8
14
|
def puts_repo_heading(repo)
|
9
15
|
puts colorize("\n=== #{repo.name} (#{repo.branch})", COLORS[:heading], true)
|
data/lib/git_bundle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-bundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Pretorius
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|