git-multi 2.6.1 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/Gemfile.lock +16 -19
- data/git-multi.gemspec +2 -1
- data/lib/git/multi/commands.rb +15 -1
- data/lib/git/multi/report.rb +8 -6
- data/lib/git/multi/version.rb +1 -1
- data/lib/git/multi.rb +19 -5
- metadata +19 -6
- data/lib/ext/kernel.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d67da6065deb617ec35011956c6c726d31da7fcb32f1672326f6de23bab2613
|
4
|
+
data.tar.gz: d522c33fce1d1d53b785bca1b13bde697b9391c328bf717f90430016bb5f4e14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979d1a098da4582eb08dbd5183fc7af0f697484bb949d52b435b94d9d8163e23a405241a74a71fd8e8ebfea7a520c820f2a899c5693a789c9c71f2cc3d155896
|
7
|
+
data.tar.gz: 2039285af97431a8704579d750f2e14a2a00e48225454db71b19a4f7f1450168bd1d2982965e9cc569a781527b7c05a2a3631a1f5002a8803d91a59a5ce53444
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,53 +1,50 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git-multi (2.
|
5
|
-
|
4
|
+
git-multi (2.7.0)
|
5
|
+
faraday (~> 0.15.0)
|
6
|
+
octokit (~> 4)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
13
|
ast (2.4.0)
|
13
14
|
coderay (1.1.2)
|
14
15
|
faraday (0.15.4)
|
15
16
|
multipart-post (>= 1.2, < 3)
|
16
17
|
interception (0.5)
|
17
|
-
jaro_winkler (1.5.
|
18
|
+
jaro_winkler (1.5.3)
|
18
19
|
method_source (0.9.2)
|
19
|
-
minitest (5.
|
20
|
+
minitest (5.12.2)
|
20
21
|
multipart-post (2.1.1)
|
21
22
|
octokit (4.14.0)
|
22
23
|
sawyer (~> 0.8.0, >= 0.5.3)
|
23
|
-
parallel (1.
|
24
|
-
parser (2.6.
|
24
|
+
parallel (1.17.0)
|
25
|
+
parser (2.6.4.1)
|
25
26
|
ast (~> 2.4.0)
|
26
|
-
powerpack (0.1.2)
|
27
27
|
pry (0.12.2)
|
28
28
|
coderay (~> 1.1.0)
|
29
29
|
method_source (~> 0.9.0)
|
30
30
|
pry-rescue (1.5.0)
|
31
31
|
interception (>= 0.5)
|
32
32
|
pry (>= 0.12.0)
|
33
|
-
|
34
|
-
public_suffix (3.1.1)
|
33
|
+
public_suffix (4.0.1)
|
35
34
|
rainbow (3.0.0)
|
36
|
-
rake (
|
37
|
-
rubocop (0.
|
35
|
+
rake (13.0.0)
|
36
|
+
rubocop (0.74.0)
|
38
37
|
jaro_winkler (~> 1.5.1)
|
39
38
|
parallel (~> 1.10)
|
40
|
-
parser (>= 2.
|
41
|
-
powerpack (~> 0.1)
|
42
|
-
psych (>= 3.1.0)
|
39
|
+
parser (>= 2.6)
|
43
40
|
rainbow (>= 2.2.2, < 4.0)
|
44
41
|
ruby-progressbar (~> 1.7)
|
45
|
-
unicode-display_width (
|
46
|
-
ruby-progressbar (1.10.
|
42
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
43
|
+
ruby-progressbar (1.10.1)
|
47
44
|
sawyer (0.8.2)
|
48
45
|
addressable (>= 2.3.5)
|
49
46
|
faraday (> 0.8, < 2.0)
|
50
|
-
unicode-display_width (1.
|
47
|
+
unicode-display_width (1.6.0)
|
51
48
|
|
52
49
|
PLATFORMS
|
53
50
|
ruby
|
data/git-multi.gemspec
CHANGED
@@ -25,7 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.post_install_message = Git::Multi::PIM
|
27
27
|
|
28
|
-
spec.add_dependency '
|
28
|
+
spec.add_dependency 'faraday', '~> 0.15.0'
|
29
|
+
spec.add_dependency 'octokit', '~> 4'
|
29
30
|
|
30
31
|
spec.add_development_dependency 'bundler'
|
31
32
|
spec.add_development_dependency 'minitest'
|
data/lib/git/multi/commands.rb
CHANGED
@@ -94,6 +94,7 @@ module Git
|
|
94
94
|
->(repo) {
|
95
95
|
Kernel.system "git clone -q #{repo.rels[:ssh].href.shellescape}"
|
96
96
|
},
|
97
|
+
nil, # captured
|
97
98
|
in: 'parent_dir'
|
98
99
|
)
|
99
100
|
end
|
@@ -176,7 +177,20 @@ module Git
|
|
176
177
|
Kernel.system cmd
|
177
178
|
},
|
178
179
|
->(repo) {
|
179
|
-
|
180
|
+
prefix = "sed -e 's#^##{repo.full_name.shellescape}: #'"
|
181
|
+
Kernel.system "#{cmd} 2>&1 | #{prefix} ;"
|
182
|
+
},
|
183
|
+
->(repo, errors) {
|
184
|
+
#
|
185
|
+
# because `Kernel.system()` uses the standard shell,
|
186
|
+
# which always means "/bin/sh" on Unix-like systems,
|
187
|
+
# the following version using "process substitution"
|
188
|
+
# doesn't work:
|
189
|
+
#
|
190
|
+
# Kernel.system "#{cmd} 2> >(#{prefix}) | #{prefix} ;"
|
191
|
+
#
|
192
|
+
prefix = "sed -e 's#^##{repo.full_name.shellescape}: #'"
|
193
|
+
Kernel.system "#{cmd} 2> #{errors} | #{prefix} ;"
|
180
194
|
},
|
181
195
|
in: 'local_path'
|
182
196
|
)
|
data/lib/git/multi/report.rb
CHANGED
@@ -84,20 +84,22 @@ module Git
|
|
84
84
|
private_class_method def symbolize(token)
|
85
85
|
case token
|
86
86
|
when Git::Multi.env_var('OCTOKIT_ACCESS_TOKEN')
|
87
|
-
|
87
|
+
'${OCTOKIT_ACCESS_TOKEN}'
|
88
88
|
when Git::Multi.global_option('github.token')
|
89
|
-
|
90
|
-
else
|
89
|
+
'github.token'
|
90
|
+
else
|
91
|
+
'(unset)'
|
91
92
|
end
|
92
93
|
end
|
93
94
|
|
94
95
|
private_class_method def abbreviate(directory, root_dir = nil)
|
95
96
|
case root_dir
|
96
97
|
when :home
|
97
|
-
|
98
|
+
directory.gsub(Git::Multi::HOME, '${HOME}')
|
98
99
|
when :workarea
|
99
|
-
|
100
|
-
else
|
100
|
+
directory.gsub(Git::Multi::WORKAREA, '${WORKAREA}')
|
101
|
+
else
|
102
|
+
abbreviate(abbreviate(directory, :workarea), :home)
|
101
103
|
end
|
102
104
|
end
|
103
105
|
|
data/lib/git/multi/version.rb
CHANGED
data/lib/git/multi.rb
CHANGED
@@ -4,6 +4,8 @@ require 'pathname'
|
|
4
4
|
require 'fileutils'
|
5
5
|
require 'shellwords'
|
6
6
|
|
7
|
+
require 'English'
|
8
|
+
|
7
9
|
require 'octokit'
|
8
10
|
require 'sawyer'
|
9
11
|
require 'faraday'
|
@@ -11,7 +13,6 @@ require 'addressable'
|
|
11
13
|
|
12
14
|
require 'ext/dir'
|
13
15
|
require 'ext/string'
|
14
|
-
require 'ext/kernel'
|
15
16
|
require 'ext/commify'
|
16
17
|
require 'ext/sawyer/resource'
|
17
18
|
|
@@ -144,21 +145,34 @@ module Git
|
|
144
145
|
|
145
146
|
module Nike
|
146
147
|
|
147
|
-
|
148
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
149
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
150
|
+
def just_do_it(interactive, pipelined, captured = nil, options = {})
|
148
151
|
working_dir = case (options[:in] || '').to_sym
|
149
152
|
when :parent_dir then parent_dir
|
150
153
|
when :local_path then local_path
|
151
154
|
else Dir.pwd
|
152
155
|
end
|
153
156
|
Dir.chdir(working_dir) do
|
154
|
-
if
|
155
|
-
puts "#{full_name.invert} (#{fractional_index})"
|
157
|
+
if STDOUT.tty? && STDERR.tty?
|
158
|
+
STDOUT.puts "#{full_name.invert} (#{fractional_index})"
|
156
159
|
interactive.call(self)
|
160
|
+
elsif STDERR.tty?
|
161
|
+
errors = File.join(ENV['TMPDIR'], "git-multi.#{$PID}")
|
162
|
+
captured.call(self, errors)
|
163
|
+
unless File.zero?(errors)
|
164
|
+
# rubocop:disable Style/StderrPuts
|
165
|
+
STDERR.puts "#{full_name.invert} (#{fractional_index})"
|
166
|
+
Kernel.system "cat #{errors} > /dev/tty ;"
|
167
|
+
# rubocop:enable Style/StderrPuts
|
168
|
+
end
|
157
169
|
else
|
158
|
-
|
170
|
+
pipelined.call(self)
|
159
171
|
end
|
160
172
|
end
|
161
173
|
end
|
174
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
175
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
162
176
|
|
163
177
|
def spputs(*args)
|
164
178
|
# split, prefix and puts
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-multi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Vandenberk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.15.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.15.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: octokit
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4
|
33
|
+
version: '4'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4
|
40
|
+
version: '4'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +149,6 @@ files:
|
|
135
149
|
- git-multi.gemspec
|
136
150
|
- lib/ext/commify.rb
|
137
151
|
- lib/ext/dir.rb
|
138
|
-
- lib/ext/kernel.rb
|
139
152
|
- lib/ext/sawyer/resource.rb
|
140
153
|
- lib/ext/string.rb
|
141
154
|
- lib/git/hub.rb
|
@@ -174,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
187
|
- !ruby/object:Gem::Version
|
175
188
|
version: '0'
|
176
189
|
requirements: []
|
177
|
-
rubygems_version: 3.0.
|
190
|
+
rubygems_version: 3.0.6
|
178
191
|
signing_key:
|
179
192
|
specification_version: 4
|
180
193
|
summary: The ultimate multi-repo utility for git!
|