git_tree 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbe9b3cc4ea586c939cc994ddf433fe11a3ae801ebb4d414d26203969272e35e
4
- data.tar.gz: a73a4c53e64d9cf8c3a9ac9f82cca966a469585a39c8d2df19f62d99d5d6bc9b
3
+ metadata.gz: 4f2b29b124bbe5716b420d6a24042e6082d611d5e4fbadcc4668881e6ca58919
4
+ data.tar.gz: 07ad131942b0d6192ad3adba9d25779747f6687a1d65dc6a6066f898d8ad8be7
5
5
  SHA512:
6
- metadata.gz: 28bffd85905de74df607377f3db64588d1697ef7acbaace6ddc5ca410d6ba71aca2aaa293f1620fac87d9175618f2068ccd759080e4a803fc56ff57aa798c8d4
7
- data.tar.gz: 963acbcdac77069745e6cc009b653fdb779e6f97e192d5bd937efb0c6bb9e4dfbb34d8796a00c48108e655239b41322baaa5f4751652f0f228cde1aec939cf76
6
+ metadata.gz: 1aa0222f18b6346b0634c0bf5f6415801e278905c492b7be4b1820844e19edbb036189e60e7bdbb94235153f98f2af9262b5e0c02e6141b0d4bc6135db8256e4
7
+ data.tar.gz: cf9d7a7b7b7fded9402dfffd33f263327d29dcf190248af9d4e5b9ca75bf0be6f67df148b87770323149eccc318328b7d17e4b00b619ab9f5cc676f609733aa0
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-md
3
3
  - rubocop-performance
4
4
  - rubocop-rake
@@ -29,6 +29,9 @@ Layout/HashAlignment:
29
29
  Layout/InitialIndentation:
30
30
  Exclude:
31
31
  - README.md
32
+ - CHANGELOG.md
33
+ - Gemfile*
34
+ - git_tree.gemspec
32
35
 
33
36
  Layout/LineLength:
34
37
  Max: 150
@@ -40,6 +43,9 @@ Lint/RedundantCopDisableDirective:
40
43
  Exclude:
41
44
  - git_tree.gemspec
42
45
 
46
+ Lint/RedundantDirGlobSort:
47
+ Enabled: false
48
+
43
49
  Metrics/AbcSize:
44
50
  Max: 45
45
51
 
@@ -47,6 +53,7 @@ Metrics/BlockLength:
47
53
  Exclude:
48
54
  - git_tree.gemspec
49
55
  - spec/**/*
56
+ Max: 35
50
57
 
51
58
  Metrics/ClassLength:
52
59
  Exclude:
@@ -64,16 +71,26 @@ Metrics/PerceivedComplexity:
64
71
  Naming/FileName:
65
72
  Exclude:
66
73
  - Rakefile
74
+ - CHANGELOG.md
75
+ - README.md
76
+ - Gemfile*
77
+ - exe/*
67
78
 
68
79
  RSpec/ExampleLength:
69
80
  Max: 20
70
81
 
71
- RSpec/FilePath:
72
- Enabled: false
73
-
74
82
  RSpec/MultipleExpectations:
75
83
  Max: 15
76
84
 
85
+ RSpec/MultipleMemoizedHelpers:
86
+ Enabled: false
87
+
88
+ RSpec/SpecFilePathFormat:
89
+ IgnoreMethods: true
90
+
91
+ RSpec/SubjectStub:
92
+ Enabled: false
93
+
77
94
  Style/CommandLiteral:
78
95
  Enabled: false
79
96
 
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # Change Log
2
2
 
3
- ## 0.3.1 (in progress)
4
3
 
5
- * Added spec.platform to `.gemspec` because `RubyGems.org` now requires it
4
+ ## 1.0.0 / 2025-10-03
5
+
6
+ * Made the file search breadth-first instead of depth-first,
7
+ greatly increasing performance.
8
+ * Added `git-update` and `git-commitAll` commands.
9
+ * Renamed `git-tree-replicate`, `git-tree-evars` and `git-tree-exec` to
10
+ `git-replicate`, `git-evars` and `git-exec`.
11
+ * Added spec.platform to `.gemspec` because `RubyGems.org` now requires it.
6
12
 
7
13
 
8
14
  ## 0.3.0 / 2023-06-01
data/README.md CHANGED
@@ -1,71 +1,161 @@
1
1
  # `Git_tree` [![Gem Version](https://badge.fury.io/rb/git_tree.svg)](https://badge.fury.io/rb/git_tree)
2
2
 
3
- This Ruby gem installs 3 commands that scan a git directory tree;
4
- 2 of the commands write out scripts and the third executes an arbitrary bash command for each repository.
3
+ This Ruby gem installs commands that walk a git directory tree and act on each repository.
5
4
  Directories containing a file called `.ignore` are ignored.
5
+ Ignoring a directory means all subdirectories are also ignored.
6
+ Multiple threads are used to dramatically boost performance.
6
7
 
7
- - The `git-tree-replicate` command writes a script that clones the repos in the tree,
8
- and adds any defined remotes.
9
- - Any git repos that have already been cloned into the target directory tree are skipped.
10
- This means you can rerun `git-tree-replicate` as many times as you want, without ill effects.
11
- - All remotes in each repo are replicated.
8
+ - The `git-commitAll` command commits and pushes all changes to each repository in the tree.
9
+ Repositories in a detached `HEAD` state are skipped.
12
10
 
13
- - The `git-tree-evars` command writes a script that defines environment variables pointing to git repos.
11
+ - The `git-evars` command writes a script that defines environment variables pointing to each git repository.
14
12
 
15
- - The `git-tree-exec` command executes an arbitrary bash command for each repository.
13
+ - The `git-exec` command executes an arbitrary bash command for each repository.
16
14
 
15
+ - The `git-replicate` command writes a script that clones the repos in the tree,
16
+ and adds any defined remotes.
17
17
 
18
- ## Usage
19
-
20
- All commands require one environment variable reference to be passed to them.
21
- Enclose the name of the environment variable within single quotes,
22
- which will prevent the shell from expanding it before invoking the command.
18
+ - Any git repos that have already been cloned into the target directory tree are skipped.
19
+ This means you can rerun `git-replicate` as many times as you want, without ill effects.
23
20
 
21
+ - All remotes in each repo are replicated.
24
22
 
25
- ## `git-tree-replicate` Usage
23
+ - The `git-update` command updates each repository in the tree.
26
24
 
27
- The following creates a script in the current directory called `work.sh`,
28
- that replicates the desired portions of the directory tree of git repos pointed to by `$work`:
25
+ You can list them by using the `gem specification` command, like this:
29
26
 
30
27
  ```shell
31
- $ git-tree-replicate '$work' > work.sh
28
+ $ gem specification git_tree executables
29
+ ---
30
+ - git-commitAll
31
+ - git-evars
32
+ - git-exec
33
+ - git-replicate
34
+ - git-update
32
35
  ```
33
36
 
34
- The generated environment variables will all be relative to the
35
- path pointed to by the expanded environment variable that you provided.
36
- You will understand what this means once you look at the generated script.
37
+ ## Installation
37
38
 
38
- When `git-tree-replicate` completes,
39
- edit the generated script to suit, then
40
- copy it to the target machine and run it.
41
- The following example copies the script to `machine2` and runs it:
39
+ Type the following at a shell prompt on the machine you are copying the git tree from,
40
+ and on the machine that you are copying the git tree to:
42
41
 
43
42
  ```shell
44
- $ scp work.sh machine2:
43
+ $ yes | sudo apt install cmake libgit2-dev libssh2-1-dev pkg-config
45
44
 
46
- $ ssh machine2 work.sh
45
+ $ gem install git_tree
47
46
  ```
48
47
 
48
+ To register the new commands, either log out and log back in, or open a new console.
49
49
 
50
- ### Generated Script from `git-tree-replicate`
50
+ ## Use Cases
51
51
 
52
- Following is a sample of one section, which is repeated for every git repo that is processed:
53
- You can edit them to suit.
52
+ ### Dependent Gem Maintenance
53
+
54
+ One of my directory trees holds Jekyll plugins, packaged as 25 gems.
55
+ They depend on one another, and must be built in a particular order.
56
+ Sometimes an operation must be performed on all of the plugins, and then rebuild them all.
57
+
58
+ Most operations do not require that the projects be processed in any particular order, however
59
+ the build process must be invoked on the dependencies first.
60
+ It is quite tedious to do this 25 times, over and over.
61
+
62
+ Several years ago I wrote a bash script to perform this task, but as its requirements became more complex,
63
+ the bash script proved difficult to maintain. This use case is now fulfilled by the `git-exec` command
64
+ provided by the `git_tree` gem.
65
+ See below for further details.
66
+
67
+ ### Replicating Trees of Git Repositories
68
+
69
+ Whenever I set up an operating system for a new development computer,
70
+ one of the tedious tasks that must be performed is to replicate
71
+ the directory trees of Git repositories.
72
+
73
+ It is a bad idea to attempt to copy an entire Git repository between computers,
74
+ because the `.git` directories within them can quite large.
75
+ So large, in fact, that it might much more time to copy than re-cloning.
76
+
77
+ The reason is that copying the entire Git repository actually means copying the same information twice:
78
+ first the `.git` hidden directory, complete with all the history for the project,
79
+ and then again for the files in the currently checked out branch.
80
+ Git repos store the entire development history of the project in their `.git` directories,
81
+ so as they accumulate history they eventually become much larger than the
82
+ code that is checked out at any given time.
83
+
84
+ One morning I found myself facing the boring task of doing this manually once again.
85
+ Instead, I wrote a bash script that scanned a Git directory tree and
86
+ wrote out another bash script that clones the repos in the tree.
87
+ Any additional remote references are replicated.
88
+
89
+ Two years later, I decided to add new features to the script.
90
+ Bash is great for short scripts,
91
+ but it is not conducive to debugging or structured programming.
92
+ I rewrote the bash script in Ruby, using the `rugged` gem.
93
+ Much better!
94
+
95
+ Two years after that I used Google Gemini Code Assist to rewrite it again in Ruby,
96
+ this time as a multithreaded program.
97
+ Performance is now lightning-fast for most use cases.
98
+ I was also able to use the same core logic for several of the individual
99
+ Git-related scripts I had written over the years.
100
+ The result is this Ruby gem.
101
+
102
+ This use case is fulfilled by the
103
+ `git-replicate`
104
+ and `git-evars` commands
105
+ provided by this gem.
106
+
107
+
108
+ ## Usage
109
+
110
+ ### Single- And Multi-Threading
111
+
112
+ All of these commands are inherently multi-threaded.
113
+ They consume up to 75% of the threads that your CPU can provide.
114
+ You may notice that your computer's fan gets louder when your run these commands on large numbers of Git repositories.
115
+
116
+ For builds and other sequential tasks, however, parallelism is inappropriate.
117
+ Instead, it is necessary to build components in the proper order.
118
+ Doing all the work on a single thread is a straightforward way of ensuring proper task ordering.
119
+
120
+ Use the `-s/--serial` option when the order that Git projects are processed matters.
121
+ All of the commands support this option.
122
+ Execution will take much longer that without the option,
123
+ because performing most tasks take longer to perform in sequence than performing them in parallel.
124
+ Exceptions include old sayings like “Nine women cannot have a baby in one month.”
125
+ For those exceptions, use the `-s/--serial` option.
126
+
127
+ ### `git-commitAll`
128
+
129
+ ```text
130
+ git-commitAll - Recursively commits and pushes changes in all git repositories under the specified DIRECTORY roots.
131
+ If no directories are given, uses default environment variables ('sites', 'sitesUbuntu', 'work') as roots.
132
+ Skips directories containing a .ignore file.
133
+ Repositories in a detached HEAD state are skipped.
134
+
135
+ Options:
136
+ -h, --help Show this help message and exit.
137
+ -m, --message MESSAGE Use the given string as the commit message.
138
+ (default: "-")
139
+ -q, --quiet Suppress normal output, only show errors.
140
+ -s, --serial Run tasks serially in a single thread in the order specified.
141
+ -v, --verbose Increase verbosity. Can be used multiple times (e.g., -v, -vv).
142
+ ```
54
143
 
55
144
  ```shell
56
- if [ ! -d "sinatra/sinatras-skeleton/.git" ]; then
57
- mkdir -p 'sinatra'
58
- pushd 'sinatra' > /dev/null
59
- git clone git@github.com:mslinn/sinatras-skeleton.git
60
- git remote add upstream 'https://github.com/simonneutert/sinatras-skeleton.git'
61
- popd > /dev/null
62
- fi
145
+ $ git commitAll
146
+ Processing $sites $sitesUbuntu $work
147
+ Initializing 18 worker threads...
148
+
149
+ All work is complete.
63
150
  ```
64
151
 
65
- ## `git-tree-evars` Usage
66
152
 
67
- The `git-tree-evars` command should be run on the target computer.
68
- The command requires only one parameter:
153
+ ### `git-evars`
154
+
155
+ The `git-evars` command writes a script that defines environment variables pointing to each git repository.
156
+ This command should be run on the target computer.
157
+
158
+ Only one parameter is required:
69
159
  an environment variable reference, pointing to the top-level directory to replicate.
70
160
  The environment variable reference must be contained within single quotes to prevent expansion by the shell.
71
161
 
@@ -73,24 +163,34 @@ The following appends to any script in the `$work` directory called `.evars`.
73
163
  The script defines environment variables that point to each git repos pointed to by `$work`:
74
164
 
75
165
  ```shell
76
- $ git-tree-evars '$work' >> $work/.evars
166
+ $ git-evars '$work' >> $work/.evars
77
167
  ```
78
168
 
79
169
 
80
- ### Generated Script from `git-tree-evars`
170
+ #### Generated Script from `git-evars`
81
171
 
82
172
  Following is a sample of environment variable definitions.
83
- You are expected to edit it to suit.
173
+ The `-z`/`--zowee` option generates intermediate environment variable definitions,
174
+ making them much easier to work with.
84
175
 
85
176
  ```shell
86
- export work=/mnt/c/work
87
- export ancientWarmth=$work/ancientWarmth/ancientWarmth
88
- export ancientWarmthBackend=$work/ancientWarmth/ancientWarmthBackend
89
- export braintreeTutorial=$work/ancientWarmth/braintreeTutorial
90
- export survey_analytics=$work/ancientWarmth/survey-analytics
91
- export survey_creator=$work/ancientWarmth/survey-creator
92
- export django=$work/django/django
93
- export frobshop=$work/django/frobshop
177
+ $ git-evars -z '$sites'
178
+ export mnt=/mnt
179
+ export c=$mnt/c
180
+ export _6of26=$sites/6of26
181
+ export computers=$sites/computers.mslinn.com
182
+ export ebooks=$sites/ebooks
183
+ export expert=$sites/expert
184
+ export fonts=$sites/fonts
185
+ export intranet=$sites/intranet.ancientwarmth.com
186
+ export intranet_mslinn=$sites/intranet.mslinn.com
187
+ export jekyllTemplate=$sites/jekyllTemplate
188
+ export lyrics=$sites/lyrics
189
+ export metamusic=$sites/metamusic
190
+ export music=$sites/music.mslinn.com
191
+ export photos=$sites/photos
192
+ export supportingLiterature=$sites/supportingLiterature
193
+ export www=$sites/www.scalacourses.com
94
194
  ```
95
195
 
96
196
  The environment variable definitions are meant to be saved into a file that is `source`d upon boot.
@@ -112,26 +212,29 @@ $ cd $my_project
112
212
  ```
113
213
 
114
214
 
115
- ## `git-tree-exec` Usage
215
+ ### `git-exec` Usage
116
216
 
117
- The `git-tree-exec` command can be run on any computer.
217
+ The `git-exec` command can be run on any computer.
118
218
  The command requires two parameters.
119
219
  The first parameter indicates the directory or directories to process.
120
220
  3 forms are accepted:
121
221
 
122
222
  1. A directory name, which may be relative or absolute.
223
+
123
224
  2. An environment variable reference,
124
225
  which must be contained within single quotes to prevent expansion by the shell.
226
+
125
227
  3. A list of directory names, which may be relative or absolute, and may contain environment variables.
126
228
 
127
- ### Example 1
229
+
230
+ #### Example 1
128
231
 
129
232
  For all subdirectories of current directory,
130
233
  update `Gemfile.lock` and install a local copy of the gem:
131
234
 
132
235
  ```shell
133
- $ git-tree-exec '
134
- $jekyll_plugin_logger
236
+ $ git-exec \
237
+ '$jekyll_plugin_logger
135
238
  $jekyll_draft
136
239
  $jekyll_plugin_support
137
240
  $jekyll_all_collections
@@ -142,16 +245,16 @@ $ git-tree-exec '
142
245
  $jekyll_outline
143
246
  $jekyll_plugin_template
144
247
  $jekyll_pre
145
- $jekyll_quote
146
- ' 'bundle && bundle update && rake install'
248
+ $jekyll_quote'
249
+ 'bundle && bundle update && rake install'
147
250
  ```
148
251
 
149
- ### Example 2
252
+ #### Example 2
150
253
 
151
254
  This example shows how to display the version of projects that
152
255
  create gems under the directory pointed to by `$my_plugins`.
153
256
 
154
- An executable script is required on the `PATH`, so `git-tree-exec`
257
+ An executable script is required on the `PATH`, so `git-exec`
155
258
  can invoke it as it loops through the subdirectories.
156
259
  I call this script `version`, and it is written in `bash`,
157
260
  although the language used is not significant:
@@ -161,12 +264,12 @@ although the language used is not significant:
161
264
 
162
265
  x="$( ls lib/**/version.rb 2> /dev/null )"
163
266
  if [ -f "$x" ]; then
164
- v="$(
267
+ v="$( \
165
268
  cat "$x" | \
166
269
  grep '=' | \
167
270
  sed -e s/.freeze// | \
168
- tr -d 'VERSION =\"' | \
169
- tr -d \'
271
+ tr -d 'VERSION ="' | \
272
+ tr -d \
170
273
  )"
171
274
  echo "$(basename $PWD) v$v"
172
275
  fi
@@ -175,7 +278,7 @@ fi
175
278
  Call it like this:
176
279
 
177
280
  ```shell
178
- $ git-tree-exec '$my_plugins' version
281
+ $ git-exec '$my_plugins' version
179
282
  jekyll_all_collections v0.3.3
180
283
  jekyll_archive_create v1.0.2
181
284
  jekyll_archive_display v1.0.1
@@ -207,13 +310,13 @@ jekyll_sort_natural v1.0.0
207
310
  jekyll_time_since v0.1.3
208
311
  ```
209
312
 
210
- ### Example 3
313
+ #### Example 3
211
314
 
212
315
  List the projects under the directory pointed to by `$my_plugins`
213
316
  that have a `demo/` subdirectory:
214
317
 
215
318
  ```shell
216
- $ git-tree-exec '$my_plugins' \
319
+ $ git-exec '$my_plugins' \
217
320
  'if [ -d demo ]; then realpath demo; fi'
218
321
  /mnt/c/work/jekyll/my_plugins/jekyll-hello/demo
219
322
  /mnt/c/work/jekyll/my_plugins/jekyll_all_collections/demo
@@ -234,25 +337,57 @@ $ git-tree-exec '$my_plugins' \
234
337
  /mnt/c/work/jekyll/my_plugins/jekyll_time_since/demo
235
338
  ```
236
339
 
340
+ ### `git-replicate` Usage
237
341
 
238
- ## Installation
342
+ This command generates a shell script to replicate a tree of git repositories.
343
+ ROOTS can be directory names or environment variable references (e.g., '$work').
344
+ Multiple roots can be specified in a single quoted string.
239
345
 
240
- Type the following at a shell prompt on the machine you are copying the git tree from,
241
- and on the machine that you are copying the git tree to:
346
+ ```shell
347
+ $ git-replicate '$work' > work.sh # Replicate repos under $work
348
+ $ git-replicate '$work $sites' > replicate.sh # Replicate repos under $work and $sites
349
+ ```
350
+
351
+ The generated environment variables will all be relative to the
352
+ path pointed to by the expanded environment variable that you provided.
353
+ You will understand what this means once you look at the generated script.
354
+
355
+ When `git-replicate` completes,
356
+ edit the generated script to suit, then
357
+ copy it to the target machine and run it.
358
+ The following example copies the script to `machine2` and runs it:
242
359
 
243
360
  ```shell
244
- $ yes | sudo apt install cmake libgit2-dev libssh2-1-dev pkg-config
361
+ $ scp work.sh machine2:
245
362
 
246
- $ gem install git_tree
363
+ $ ssh machine2 work.sh
247
364
  ```
248
365
 
249
- To register the new commands, either log out and log back in, or open a new console.
366
+
367
+ #### Generated Script from `git-replicate`
368
+
369
+ Following is a sample of one section, which is repeated for every git repo that is processed:
370
+ You can edit them to suit.
371
+
372
+ ```shell
373
+ if [ ! -d "sinatra/sinatras-skeleton/.git" ]; then
374
+ mkdir -p 'sinatra'
375
+ pushd 'sinatra' > /dev/null
376
+ git clone git@github.com:mslinn/sinatras-skeleton.git
377
+ git remote add upstream 'https://github.com/simonneutert/sinatras-skeleton.git'
378
+ popd > /dev/null
379
+ fi
380
+ ```
381
+
382
+ ### `git-update`
383
+
384
+ The `git-update` command updates each repository in the tree.
250
385
 
251
386
 
252
387
  ## Additional Information
253
388
 
254
389
  More information is available on
255
- [Mike Slinn’s website](https://www.mslinn.com/git/1100-git-tree.html)
390
+ [Mike Slinns website](https://www.mslinn.com/git/1100-git-tree.html).
256
391
 
257
392
 
258
393
  ## Development
@@ -269,9 +404,7 @@ You can run `bin/console` for an interactive prompt that will allow you to exper
269
404
 
270
405
  ```shell
271
406
  $ bin/console
272
- irb(main):001:0> GitTree.command_replicate 'demo'
273
-
274
- irb(main):002:0> GitTree.command_evars 'demo'
407
+ irb(main):001:0> GitTree::ReplicateCommand.new('$work').run
275
408
  ```
276
409
 
277
410
 
@@ -289,12 +422,14 @@ Examine the newly built gem:
289
422
  $ gem info git_tree
290
423
 
291
424
  *** LOCAL GEMS ***
292
- git_tree (0.2.0)
425
+
426
+ git_tree (0.3.0)
293
427
  Author: Mike Slinn
294
- Homepage:
295
- https://github.com/mslinn/git_tree_replicate
428
+ Homepage: https://www.mslinn.com/git/1100-git-tree.html
296
429
  License: MIT
297
- Installed at: /home/mslinn/.gems
430
+ Installed at: /home/mslinn/.rbenv/versions/3.4.6/lib/ruby/gems/3.4.0
431
+
432
+ Installs five commands that walk a git directory tree and perform tasks.
298
433
  ```
299
434
 
300
435
 
@@ -325,4 +460,10 @@ To release a new version:
325
460
 
326
461
  ## License
327
462
 
328
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
463
+ The gem is available as open source under the terms of the
464
+ [MIT License](https://opensource.org/licenses/MIT).
465
+
466
+ ## Additional Information
467
+
468
+ More information is available on
469
+ [Mike Slinn’s website](https://www.mslinn.com/git/1100-git-tree.html)
data/exe/git-commitAll ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/commands/git_commit_all'
data/exe/git-evars ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/commands/git_evars'
data/exe/git-exec ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/commands/git_exec'
data/exe/git-replicate ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/commands/git_replicate'
data/exe/git-update ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/commands/git_update'
data/git_tree.gemspec CHANGED
@@ -4,22 +4,26 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
4
4
  github = 'https://github.com/mslinn/git_tree'
5
5
 
6
6
  spec.authors = ['Mike Slinn']
7
- spec.bindir = 'bindir'
7
+ spec.bindir = 'exe'
8
8
  spec.description = <<~END_OF_DESC
9
- Installs 3 commands that process a git directory tree.
9
+ Installs 5 commands that process a git directory tree.
10
10
  Directories containing a file called .ignore are ignored.
11
11
 
12
- The git-tree-replicate command writes a script that clones the repos in the tree,
13
- and adds any defined remotes.
12
+ The git-commitAll command commits all changes to each repository in the tree.
13
+
14
+ The git-evars command writes a script that defines environment variables pointing to git repos.
14
15
 
15
- The git-tree-evars command writes a script that defines environment variables pointing to git repos.
16
+ The git-exec command executes a bash expression on children of a directory, or a list of directories.
17
+
18
+ The git-replicate command writes a script that clones the repos in the tree,
19
+ and adds any defined remotes.
16
20
 
17
- The git-tree-exec command executes a bash expression on children of a directory, or a list of directories.
21
+ The git-update command updates each repository in the tree.
18
22
  END_OF_DESC
19
23
  spec.email = ['mslinn@mslinn.com']
20
- spec.executables = %w[git-tree-exec git-tree-evars git-tree-replicate]
24
+ spec.executables = %w[git-commitAll git-evars git-exec git-replicate git-update]
21
25
  spec.files = Dir[
22
- '{bindir,lib}/**/*',
26
+ '{exe,lib}/**/*',
23
27
  '.rubocop.yml',
24
28
  'LICENSE.*',
25
29
  'Rakefile',
@@ -42,10 +46,11 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
42
46
  Thanks for installing #{spec.name}!
43
47
 
44
48
  END_MESSAGE
45
- spec.required_ruby_version = '>= 2.6.0'
46
- spec.summary = 'Installs two commands that scan a git directory tree and write out scripts for replication.'
49
+ spec.required_ruby_version = '>= 3.2.0'
50
+ spec.summary = 'Installs five commands that walk a git directory tree and perform tasks.'
47
51
  spec.version = GitUrlsVersion::VERSION
48
52
 
53
+ spec.add_dependency 'gem_support'
49
54
  spec.add_dependency 'rainbow'
50
55
  spec.add_dependency 'rugged'
51
56
  end