git-multi 1.0.9 → 1.0.10

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
  SHA256:
3
- metadata.gz: d9f18b7401f3d302bf0de32a7af25b1d8e4f6c3d9afb937ef2282434e5ead56b
4
- data.tar.gz: '09a6dfc7de48a4a0eb5d47c2aee5f1f33cffbc895663fa4c2a2a775e46dd527d'
3
+ metadata.gz: 87a5098e57c1c0543ff692107ed8f72df532fb3dfdc0695c50611e2f478af8c4
4
+ data.tar.gz: 7d26ed3027f6115e335cb88786cc4cab70bf9f94eb184551d13df1d2f5c8a120
5
5
  SHA512:
6
- metadata.gz: 022bb068ad9d6241b0c066939469ee0cd97c0c590d3990dae0cddc460003d413a3c6120502aefde7c7ed46debd1ddc1d1d90e8a742f8f86b136f2bf11ca4d570
7
- data.tar.gz: a23b9afae4768afddbc9706f84bca703031d9348d3fa2e52e0d7bff32e51f1ebc4e7acab75ecfda9e3c545645117cb04b534d799c59a1155ebdc52c2b56abeab
6
+ metadata.gz: 947af0e03bb9bcbb8ee2b22ea976163c5becc4207b3d0787c0be3f9439c9cd64d657f8324fed2ee0e9acd7a2390e464e9d876bc700b21c1e79962b0ac5f2ef77
7
+ data.tar.gz: d8e11968d5a6eeba9157a21ff12f49f5a769a261f38a34d593019d150ed2812a1af3aab7f33aab2b4ce0022a7efb50ffb197dc8d2513772d8435794e62b364bc
data/.pryrc CHANGED
@@ -28,12 +28,18 @@ end
28
28
 
29
29
  # utility function to set pry context
30
30
  # to an instance of <Octokit::Client>
31
- def client() pry Git::Hub.send(:client); end
31
+ def client() pry(Git::Hub.send(:client)); end
32
32
 
33
33
  # utility function to set pry context
34
34
  # to the Array of github repositories
35
- def repos() pry Git::Multi.repositories; end
35
+ def repos() pry(Git::Multi.repositories); end
36
36
 
37
37
  # utility function to set pry context
38
38
  # to the various 'git multi' commands:
39
- def cmds() pry Git::Multi::Commands; end
39
+ def cmds() pry(Git::Multi::Commands); end
40
+
41
+ # utility function to set context
42
+ # to the named github repository:
43
+ def repo_named(full_name)
44
+ pry(Git::Multi.repositories.find { |repo| repo.full_name == full_name })
45
+ end
@@ -6,7 +6,7 @@ require 'addressable'
6
6
  module Git
7
7
  module Multi
8
8
  NAME = 'git-multi'.freeze
9
- VERSION = '1.0.9'.freeze
9
+ VERSION = '1.0.10'.freeze
10
10
 
11
11
  DEPENDENCY_VERSIONS = [
12
12
  "octokit.rb v#{Octokit::VERSION}",
data/man/git-multi.1 CHANGED
@@ -2,12 +2,12 @@
2
2
  .\" Title: git-multi
3
3
  .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
4
  .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
- .\" Date: 10/08/2018
5
+ .\" Date: 11/01/2018
6
6
  .\" Manual: Git Manual
7
- .\" Source: Git 2.19.1.272.gf84b9b09d.dirty
7
+ .\" Source: Git 2.19.1.542.gc4df23f792.dirty
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "GIT\-MULTI" "1" "10/08/2018" "Git 2\&.19\&.1\&.272\&.gf84b9b" "Git Manual"
10
+ .TH "GIT\-MULTI" "1" "11/01/2018" "Git 2\&.19\&.1\&.542\&.gc4df23" "Git Manual"
11
11
  .\" -----------------------------------------------------------------
12
12
  .\" * Define some portability stuff
13
13
  .\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@
31
31
  git-multi \- execute the same git command in multiple repositories
32
32
  .SH "VERSION"
33
33
  .sp
34
- This is \fBv1\&.0\&.9\fR of \fIgit multi\fR \&... hooray!
34
+ This is \fBv1\&.0\&.10\fR of \fIgit multi\fR \&... hooray!
35
35
  .SH "SYNOPSIS"
36
36
  .sp
37
37
  There are some options for \fBgit multi\fR itself, in which case it is invoked as follows:
@@ -244,7 +244,19 @@ git multi fetch \-p
244
244
  .RE
245
245
  .\}
246
246
  .sp
247
- print out the local branch for each repo
247
+ print out the local branch for each repo (using \fBsymbolic\-ref\fR)
248
+ .sp
249
+ .if n \{\
250
+ .RS 4
251
+ .\}
252
+ .nf
253
+ git multi symbolic\-ref \-\-quiet \-\-short HEAD
254
+ .fi
255
+ .if n \{\
256
+ .RE
257
+ .\}
258
+ .sp
259
+ print out the local branch for each repo (using \fBrev\-parse\fR)
248
260
  .sp
249
261
  .if n \{\
250
262
  .RS 4
@@ -346,7 +358,7 @@ find all projects that have been pushed to in the last week
346
358
  .RS 4
347
359
  .\}
348
360
  .nf
349
- git multi \-\-find \*(Aq((Time\&.now \- pushed_at) / 60 / 60 / 24) <= 7\*(Aq
361
+ git multi \-\-find \*(Aq((Time\&.now\&.utc \- pushed_at) / 60 / 60 / 24) <= 7\*(Aq
350
362
  .fi
351
363
  .if n \{\
352
364
  .RE
@@ -358,7 +370,7 @@ print out the number of days since the last push to each repository
358
370
  .RS 4
359
371
  .\}
360
372
  .nf
361
- git multi \-\-eval \*(Aqputs "%d days" % ((Time\&.now \- pushed_at) / 60 / 60 / 24)\*(Aq
373
+ git multi \-\-eval \*(Aqputs "%s \- %d days" % [full_name, ((Time\&.now\&.utc \- pushed_at) / 60 / 60 / 24)\&.ceil]\*(Aq
362
374
  .fi
363
375
  .if n \{\
364
376
  .RE
@@ -370,7 +382,7 @@ find all projects that have seen activity this calendar year
370
382
  .RS 4
371
383
  .\}
372
384
  .nf
373
- git multi \-\-find \*(Aqpushed_at >= Date\&.civil(Date\&.today\&.year, 1, 1)\&.to_time\*(Aq
385
+ git multi \-\-find \*(Aqpushed_at >= Date\&.civil(Date\&.today\&.year, 1, 1)\&.to_time\&.utc\*(Aq
374
386
  .fi
375
387
  .if n \{\
376
388
  .RE
@@ -382,7 +394,7 @@ print out all webhooks
382
394
  .RS 4
383
395
  .\}
384
396
  .nf
385
- git multi \-\-eval \*(Aq(hooks = client\&.hooks(project\&.full_name))\&.any? && begin print project\&.full_name ; print "\et" ; puts hooks\&.map { |hook| ["", hook\&.name, hook\&.config\&.url]\&.join("\et") } ; end\*(Aq
397
+ git multi \-\-eval \*(Aq(hooks = client\&.hooks(full_name))\&.any? && begin print full_name ; print "\et" ; puts hooks\&.map { |hook| ["", hook\&.name, hook\&.config\&.url]\&.join("\et") } ; end\*(Aq
386
398
  .fi
387
399
  .if n \{\
388
400
  .RE
@@ -394,7 +406,7 @@ print out all deploy keys
394
406
  .RS 4
395
407
  .\}
396
408
  .nf
397
- git multi \-\-eval \*(Aq(keys = client\&.list_deploy_keys(project\&.full_name))\&.any? && begin print project\&.full_name ; print "\et" ; puts keys\&.map(&:title)\&.sort\&.join("\et") ; end\*(Aq
409
+ git multi \-\-eval \*(Aq(keys = client\&.list_deploy_keys(full_name))\&.any? && begin print full_name ; print "\et" ; puts keys\&.map(&:title)\&.sort\&.join("\et") ; end\*(Aq
398
410
  .fi
399
411
  .if n \{\
400
412
  .RE
@@ -482,7 +494,7 @@ watchers_count
482
494
  .\}
483
495
  .nf
484
496
  # print out each repository\*(Aqs name and its description
485
- git multi \-\-json | jq \*(Aq\&.[] | \&.name + ": " + \&.description\*(Aq
497
+ git multi \-\-json | jq \-r \*(Aq\&.[] | \&.name + ": " + \&.description\*(Aq
486
498
  .fi
487
499
  .if n \{\
488
500
  .RE
@@ -493,7 +505,7 @@ git multi \-\-json | jq \*(Aq\&.[] | \&.name + ": " + \&.description\*(Aq
493
505
  .\}
494
506
  .nf
495
507
  # print out the name of all "forked" repositories
496
- git multi \-\-json | jq \*(Aq\&.[] | select(\&.fork == true) | \&.full_name\*(Aq
508
+ git multi \-\-json | jq \-r \*(Aq\&.[] | select(\&.fork == true) | \&.full_name\*(Aq
497
509
  .fi
498
510
  .if n \{\
499
511
  .RE
data/man/git-multi.erb CHANGED
@@ -131,7 +131,11 @@ fetch remote branches for all repos
131
131
 
132
132
  git multi fetch -p
133
133
 
134
- print out the local branch for each repo
134
+ print out the local branch for each repo (using `symbolic-ref`)
135
+
136
+ git multi symbolic-ref --quiet --short HEAD
137
+
138
+ print out the local branch for each repo (using `rev-parse`)
135
139
 
136
140
  git multi rev-parse --abbrev-ref=strict HEAD
137
141
 
@@ -165,23 +169,23 @@ find all Mongoid dependencies
165
169
 
166
170
  find all projects that have been pushed to in the last week
167
171
 
168
- git multi --find '((Time.now - pushed_at) / 60 / 60 / 24) <= 7'
172
+ git multi --find '((Time.now.utc - pushed_at) / 60 / 60 / 24) <= 7'
169
173
 
170
174
  print out the number of days since the last push to each repository
171
175
 
172
- git multi --eval 'puts "%d days" % ((Time.now - pushed_at) / 60 / 60 / 24)'
176
+ git multi --eval 'puts "%s - %d days" % [full_name, ((Time.now.utc - pushed_at) / 60 / 60 / 24).ceil]'
173
177
 
174
178
  find all projects that have seen activity this calendar year
175
179
 
176
- git multi --find 'pushed_at >= Date.civil(Date.today.year, 1, 1).to_time'
180
+ git multi --find 'pushed_at >= Date.civil(Date.today.year, 1, 1).to_time.utc'
177
181
 
178
182
  print out all webhooks
179
183
 
180
- git multi --eval '(hooks = client.hooks(project.full_name)).any? && begin print project.full_name ; print "\t" ; puts hooks.map { |hook| ["", hook.name, hook.config.url].join("\t") } ; end'
184
+ git multi --eval '(hooks = client.hooks(full_name)).any? && begin print full_name ; print "\t" ; puts hooks.map { |hook| ["", hook.name, hook.config.url].join("\t") } ; end'
181
185
 
182
186
  print out all deploy keys
183
187
 
184
- git multi --eval '(keys = client.list_deploy_keys(project.full_name)).any? && begin print project.full_name ; print "\t" ; puts keys.map(&:title).sort.join("\t") ; end'
188
+ git multi --eval '(keys = client.list_deploy_keys(full_name)).any? && begin print full_name ; print "\t" ; puts keys.map(&:title).sort.join("\t") ; end'
185
189
 
186
190
  find all organization repositories that depend on a given org repo, e.g. 'business_rules'
187
191
 
@@ -211,10 +215,10 @@ repository attributes stored in the local, binary repository cache; here
211
215
  are some examples:
212
216
 
213
217
  # print out each repository's name and its description
214
- git multi --json | jq '.[] | .name + ": " + .description'
218
+ git multi --json | jq -r '.[] | .name + ": " + .description'
215
219
 
216
220
  # print out the name of all "forked" repositories
217
- git multi --json | jq '.[] | select(.fork == true) | .full_name'
221
+ git multi --json | jq -r '.[] | select(.fork == true) | .full_name'
218
222
 
219
223
  FILES
220
224
  -----
data/man/git-multi.html CHANGED
@@ -748,7 +748,7 @@ git-multi(1) Manual Page
748
748
  <div class="sect1">
749
749
  <h2 id="_version">VERSION</h2>
750
750
  <div class="sectionbody">
751
- <div class="paragraph"><p>This is <code>v1.0.9</code> of <em>git multi</em> &#8230; hooray!</p></div>
751
+ <div class="paragraph"><p>This is <code>v1.0.10</code> of <em>git multi</em> &#8230; hooray!</p></div>
752
752
  </div>
753
753
  </div>
754
754
  <div class="sect1">
@@ -990,7 +990,12 @@ cached locally <em>(in binary format)</em> for performance and offline usage.</p
990
990
  <div class="content">
991
991
  <pre><code>git multi fetch -p</code></pre>
992
992
  </div></div>
993
- <div class="paragraph"><p>print out the local branch for each repo</p></div>
993
+ <div class="paragraph"><p>print out the local branch for each repo (using <code>symbolic-ref</code>)</p></div>
994
+ <div class="literalblock">
995
+ <div class="content">
996
+ <pre><code>git multi symbolic-ref --quiet --short HEAD</code></pre>
997
+ </div></div>
998
+ <div class="paragraph"><p>print out the local branch for each repo (using <code>rev-parse</code>)</p></div>
994
999
  <div class="literalblock">
995
1000
  <div class="content">
996
1001
  <pre><code>git multi rev-parse --abbrev-ref=strict HEAD</code></pre>
@@ -1033,27 +1038,27 @@ cached locally <em>(in binary format)</em> for performance and offline usage.</p
1033
1038
  <div class="paragraph"><p>find all projects that have been pushed to in the last week</p></div>
1034
1039
  <div class="literalblock">
1035
1040
  <div class="content">
1036
- <pre><code>git multi --find '((Time.now - pushed_at) / 60 / 60 / 24) &lt;= 7'</code></pre>
1041
+ <pre><code>git multi --find '((Time.now.utc - pushed_at) / 60 / 60 / 24) &lt;= 7'</code></pre>
1037
1042
  </div></div>
1038
1043
  <div class="paragraph"><p>print out the number of days since the last push to each repository</p></div>
1039
1044
  <div class="literalblock">
1040
1045
  <div class="content">
1041
- <pre><code>git multi --eval 'puts "%d days" % ((Time.now - pushed_at) / 60 / 60 / 24)'</code></pre>
1046
+ <pre><code>git multi --eval 'puts "%s - %d days" % [full_name, ((Time.now.utc - pushed_at) / 60 / 60 / 24).ceil]'</code></pre>
1042
1047
  </div></div>
1043
1048
  <div class="paragraph"><p>find all projects that have seen activity this calendar year</p></div>
1044
1049
  <div class="literalblock">
1045
1050
  <div class="content">
1046
- <pre><code>git multi --find 'pushed_at &gt;= Date.civil(Date.today.year, 1, 1).to_time'</code></pre>
1051
+ <pre><code>git multi --find 'pushed_at &gt;= Date.civil(Date.today.year, 1, 1).to_time.utc'</code></pre>
1047
1052
  </div></div>
1048
1053
  <div class="paragraph"><p>print out all webhooks</p></div>
1049
1054
  <div class="literalblock">
1050
1055
  <div class="content">
1051
- <pre><code>git multi --eval '(hooks = client.hooks(project.full_name)).any? &amp;&amp; begin print project.full_name ; print "\t" ; puts hooks.map { |hook| ["", hook.name, hook.config.url].join("\t") } ; end'</code></pre>
1056
+ <pre><code>git multi --eval '(hooks = client.hooks(full_name)).any? &amp;&amp; begin print full_name ; print "\t" ; puts hooks.map { |hook| ["", hook.name, hook.config.url].join("\t") } ; end'</code></pre>
1052
1057
  </div></div>
1053
1058
  <div class="paragraph"><p>print out all deploy keys</p></div>
1054
1059
  <div class="literalblock">
1055
1060
  <div class="content">
1056
- <pre><code>git multi --eval '(keys = client.list_deploy_keys(project.full_name)).any? &amp;&amp; begin print project.full_name ; print "\t" ; puts keys.map(&amp;:title).sort.join("\t") ; end'</code></pre>
1061
+ <pre><code>git multi --eval '(keys = client.list_deploy_keys(full_name)).any? &amp;&amp; begin print full_name ; print "\t" ; puts keys.map(&amp;:title).sort.join("\t") ; end'</code></pre>
1057
1062
  </div></div>
1058
1063
  <div class="paragraph"><p>find all organization repositories that depend on a given org repo, e.g. <em>business_rules</em></p></div>
1059
1064
  <div class="literalblock">
@@ -1117,12 +1122,12 @@ are some examples:</p></div>
1117
1122
  <div class="literalblock">
1118
1123
  <div class="content">
1119
1124
  <pre><code># print out each repository's name and its description
1120
- git multi --json | jq '.[] | .name + ": " + .description'</code></pre>
1125
+ git multi --json | jq -r '.[] | .name + ": " + .description'</code></pre>
1121
1126
  </div></div>
1122
1127
  <div class="literalblock">
1123
1128
  <div class="content">
1124
1129
  <pre><code># print out the name of all "forked" repositories
1125
- git multi --json | jq '.[] | select(.fork == true) | .full_name'</code></pre>
1130
+ git multi --json | jq -r '.[] | select(.fork == true) | .full_name'</code></pre>
1126
1131
  </div></div>
1127
1132
  </div>
1128
1133
  </div>
@@ -1179,7 +1184,7 @@ the <code>jq</code> command-line utility:
1179
1184
  <div id="footer">
1180
1185
  <div id="footer-text">
1181
1186
  Last updated
1182
- 2018-10-08 19:59:55 BST
1187
+ 2018-11-01 16:32:39 GMT
1183
1188
  </div>
1184
1189
  </div>
1185
1190
  </body>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-multi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit