git-multi 1.0.4 → 1.0.5

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: 0340c0b46c0dd30d412c7d464b7711449ef2a2b041c0cd5895f674252580d40d
4
- data.tar.gz: 557a9f1f15b6548856b983cca3769e75864030fb183efb0363121bd0de98d1c7
3
+ metadata.gz: 5662c60b6650e56066d055e7864327c792b31ef2bbb8d963e46ba86f31992707
4
+ data.tar.gz: 486067d955e4a13f7e09ce5db09793df17bd03858e0ceec46092a2e002857f21
5
5
  SHA512:
6
- metadata.gz: 5b252d77f45fb68e3e0fee7bb7d018ed55482cf4ef1aa5596a8936d7096819d7e97e3246fa88fb041f4f4ef27effecf42052b28f21669d6e6e09ab3c3224ba40
7
- data.tar.gz: 495fe401b67a606740f87f5d57cf63e7e1366e8dfcc17e17b419438723fa5a8f0238a8fdafd54c200abb45e7c1cb272397d707148450880393157ef20c430f99
6
+ metadata.gz: 2263f8291a3fff25abc42a61502d84a8c525e4c1acca473b7a8040149b088541003234aba3755e4264106cf67c503bf4d5829bcd7a607921cda468f1ec1f139b
7
+ data.tar.gz: 570f5804de61968cc585506e127a48f14064cf22ab416e31b2fc291b4de131f8cee7dfa23f70446066a3b9de2588e7c62fdb4ca2eabddef847b6d911f2ad11f0
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # rubocop:disable Style/HashSyntax
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
  def gemspec
@@ -21,29 +23,31 @@ Rake::TestTask.new(:test) do |t|
21
23
  t.test_files = FileList['test/**/*_test.rb']
22
24
  end
23
25
 
24
- # rubocop:disable Style/HashSyntax
25
-
26
26
  task :default => :test
27
27
 
28
- task :documentation => 'man/git-multi.txt'
29
-
30
28
  require 'git/multi'
31
29
 
32
- def query_args
30
+ git_workarea = File.join(Git::Multi::WORKAREA, 'git', 'git')
31
+ documentation = File.join(git_workarea, 'Documentation')
32
+ git_asciidoc = File.join(documentation, 'git-multi.txt')
33
33
 
34
- client = Git::Hub.send(:client) # Octokit GitHub API client
35
- repo = client.repo('git/git') # random GitHub repository
34
+ require 'erb'
36
35
 
37
- # instead of maintaining a list of valid query args in the help-
38
- # file, we determine it at runtime... less is more, and all that
39
- repo.fields.sort.each_slice(3).map { |foo, bar, qux|
40
- format('%-20s %-20s %-20s', foo, bar, qux).rstrip
41
- }.join("\n ")
42
- end
36
+ file 'man/git-multi.erb' => 'lib/git/multi/version.rb' # version changes
43
37
 
44
- file 'man/git-multi.txt' => 'man/git-multi.erb' do |task|
45
- require 'erb'
38
+ file git_asciidoc => 'man/git-multi.erb' do |task|
46
39
  File.write(task.name, ERB.new(File.read(task.source)).result)
47
40
  end
48
41
 
42
+ task :documentation => git_asciidoc do
43
+ Dir.chdir(documentation) do
44
+ # use git's documentation approach and build system
45
+ %x{ make git-multi.1 git-multi.html }
46
+ FileUtils.cp 'git-multi.1', Git::Multi::MAN_PAGE
47
+ FileUtils.cp 'git-multi.html', Git::Multi::HTML_PAGE
48
+ end
49
+ end
50
+
51
+ Rake::Task['build'].enhance([:documentation])
52
+
49
53
  # rubocop:enable Style/HashSyntax
data/lib/git/hub.rb CHANGED
@@ -59,6 +59,18 @@ module Git
59
59
  end
60
60
  end
61
61
 
62
+ # pick a (semi-)random repo from GitHub
63
+
64
+ def repository_fields
65
+ client.repo('git/git').fields
66
+ end
67
+
68
+ def query_args
69
+ repository_fields.sort.each_slice(3).map { |foo, bar, qux|
70
+ format('%-20s %-20s %-20s', foo, bar, qux).rstrip
71
+ }.join("\n ")
72
+ end
73
+
62
74
  #
63
75
  # https://developer.github.com/v3/repos/#list-user-repositories
64
76
  #
@@ -5,7 +5,7 @@ require 'psych'
5
5
  module Git
6
6
  module Multi
7
7
  NAME = 'git-multi'
8
- VERSION = '1.0.4'
8
+ VERSION = '1.0.5'
9
9
 
10
10
  LONG_VERSION = "%s v%s (%s v%s, %s v%s, %s v%s)" % [
11
11
  NAME,
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: 09/21/2018
5
+ .\" Date: 09/22/2018
6
6
  .\" Manual: Git Manual
7
7
  .\" Source: Git 2.19.0.216.g2d3b1c576.dirty
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "GIT\-MULTI" "1" "09/21/2018" "Git 2\&.19\&.0\&.216\&.g2d3b1c" "Git Manual"
10
+ .TH "GIT\-MULTI" "1" "09/22/2018" "Git 2\&.19\&.0\&.216\&.g2d3b1c" "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\&.3\fR of \fIgit multi\fR \&... hooray!
34
+ This is \fBv1\&.0\&.5\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:
data/man/git-multi.erb CHANGED
@@ -200,7 +200,7 @@ QUERY ARGUMENTS
200
200
 
201
201
  The following is a list of valid arguments for the `git multi --query` option:
202
202
 
203
- <%= query_args %>
203
+ <%= Git::Hub::query_args %>
204
204
 
205
205
  JQ INTEGRATION
206
206
  --------------
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.3</code> of <em>git multi</em> &#8230; hooray!</p></div>
751
+ <div class="paragraph"><p>This is <code>v1.0.5</code> of <em>git multi</em> &#8230; hooray!</p></div>
752
752
  </div>
753
753
  </div>
754
754
  <div class="sect1">
@@ -1179,7 +1179,7 @@ the <code>jq</code> command-line utility:
1179
1179
  <div id="footer">
1180
1180
  <div id="footer-text">
1181
1181
  Last updated
1182
- 2018-09-21 17:15:51 BST
1182
+ 2018-09-22 08:14:58 BST
1183
1183
  </div>
1184
1184
  </div>
1185
1185
  </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.4
4
+ version: 1.0.5
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-09-21 00:00:00.000000000 Z
11
+ date: 2018-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit