multipull 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +29 -0
- data/exe/multipull +6 -0
- data/lib/multipull/command.rb +48 -0
- data/lib/multipull/terminal_color.rb +17 -0
- data/lib/multipull/version.rb +5 -0
- data/lib/multipull.rb +7 -0
- metadata +50 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d5b0438e618d1ba1be329f027bb3bb449763a7f76f517b956f052608ffc62610
|
4
|
+
data.tar.gz: 272f5c45b26d43d9d8e366d3ba4c3bb43300eb219a13215aba382c3f1406f12a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f9a218a785d6bf9165f642fbc57f43485a1c49f44d3b00f52a9a908cdec5c208b466138bdce9c0d3377d4ba2f9a36b8527fd79df0898d663605d95f8ea6822fa
|
7
|
+
data.tar.gz: 0f5b6075aa72ba0ab1dcb6d51ee84a7c885f0bda10098631cbcc426d2b37e9bf6c467d1094368c096442212c6ba96e55e45ccc9a397cf7973d012ecbc899b44a
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# multipull
|
2
|
+
|
3
|
+
Ruby implementation of multipull
|
4
|
+
|
5
|
+
## installation
|
6
|
+
|
7
|
+
```sh
|
8
|
+
gem install multipull
|
9
|
+
```
|
10
|
+
|
11
|
+
## What is this?
|
12
|
+
|
13
|
+
The original implementation is here.
|
14
|
+
|
15
|
+
[Git pull multiple repositories at once](https://dev.to/rmpato/git-pull-multiple-repositories-at-once-4l68) by [@rmpato](https://github.com/rmpato)
|
16
|
+
|
17
|
+
```
|
18
|
+
alias multipull="find . -mindepth 1 -maxdepth 1 -type d -print -exec git -C {} pull \;"
|
19
|
+
```
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
PR welcome.
|
24
|
+
|
25
|
+
If you would like to become an owner and take over the development, please contact me with a pull request.
|
26
|
+
|
27
|
+
## LICENSE
|
28
|
+
|
29
|
+
MIT
|
data/exe/multipull
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require_relative 'terminal_color'
|
5
|
+
|
6
|
+
module Multipull
|
7
|
+
class Command
|
8
|
+
include TerminalColor
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@dir = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
15
|
+
parse_options
|
16
|
+
main
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def parse_options
|
22
|
+
OptionParser.new do |opts|
|
23
|
+
opts.banner = 'Usage: multipull [options] [dir]'
|
24
|
+
|
25
|
+
opts.on('-v', '--version', 'Show version') do
|
26
|
+
puts VERSION
|
27
|
+
exit
|
28
|
+
end
|
29
|
+
|
30
|
+
opts.on('-h', '--help', 'Show help') do
|
31
|
+
puts opts
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
end.parse!
|
35
|
+
|
36
|
+
@dir = ARGV.shift || '.'
|
37
|
+
end
|
38
|
+
|
39
|
+
def main
|
40
|
+
Dir.chdir(@dir) do
|
41
|
+
Dir.glob('*/').each do |dir|
|
42
|
+
puts blue(bold(dir))
|
43
|
+
system("git -C #{dir} pull")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/multipull.rb
ADDED
metadata
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: multipull
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- kojix2
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Git pull multiple repositories at once
|
14
|
+
email:
|
15
|
+
- 2xijok@gmail.com
|
16
|
+
executables:
|
17
|
+
- multipull
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- README.md
|
22
|
+
- exe/multipull
|
23
|
+
- lib/multipull.rb
|
24
|
+
- lib/multipull/command.rb
|
25
|
+
- lib/multipull/terminal_color.rb
|
26
|
+
- lib/multipull/version.rb
|
27
|
+
homepage: https://github.com/kojix2/multipull
|
28
|
+
licenses:
|
29
|
+
- MIT
|
30
|
+
metadata: {}
|
31
|
+
post_install_message:
|
32
|
+
rdoc_options: []
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
requirements: []
|
46
|
+
rubygems_version: 3.3.7
|
47
|
+
signing_key:
|
48
|
+
specification_version: 4
|
49
|
+
summary: Git pull multiple repositories at once
|
50
|
+
test_files: []
|