gitmore 0.3.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.org +65 -0
- data/bin/console +2 -0
- data/exe/git-branches +3 -2
- data/exe/git-checkouts +2 -1
- data/exe/git-diffs +1 -1
- data/exe/git-fetches +1 -1
- data/exe/git-gems +1 -1
- data/exe/git-pulls +1 -1
- data/exe/git-statuses +1 -1
- data/exe/git-versions +1 -1
- data/lib/gitmore.rb +38 -36
- data/lib/gitmore/helpers.rb +3 -0
- data/lib/{helpers → gitmore/helpers}/branch_helper.rb +0 -0
- data/lib/{helpers → gitmore/helpers}/ruby_helper.rb +0 -0
- data/lib/gitmore/utils.rb +6 -0
- data/lib/{branch_matcher.rb → gitmore/utils/branch_matcher.rb} +0 -6
- data/lib/{branches.rb → gitmore/utils/branches.rb} +0 -0
- data/lib/{repositories.rb → gitmore/utils/repositories.rb} +4 -0
- data/lib/{statustician.rb → gitmore/utils/statustician.rb} +0 -0
- data/lib/gitmore/version.rb +1 -1
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51b345feba69b6c47a6ed425ca53d2e65696a833e1b14b9de21e62f6328002fc
|
4
|
+
data.tar.gz: 482e79ece97515165c0b90d32e575f0da4f52377922acf84dcedf2df4189c2e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10fd42d6a534ba209e4f0e95032d97589349a04600187e1ee1cbd0fab63432782d3ead6ede39899666844a143c1081e4bbcc6c7b23cb8c48ee03051a7b68e4f8
|
7
|
+
data.tar.gz: c1325385834d21fc26451f3c2058788dffededa626cbbf10406abc7dce44864e4067fa157727a66c6d090e2d8fab11a5266a007ac4e6a8f9caa1e13a82f78012
|
data/Gemfile.lock
CHANGED
data/README.org
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
* Gitmore
|
2
|
+
|
3
|
+
Get more out of git! This library provides extra git commands that make
|
4
|
+
handling multiple repositories at one time much easier. Let's say you
|
5
|
+
have a microservice architecture, organized locally as multiple git
|
6
|
+
repositories in a single directory. The feature you are currently working
|
7
|
+
on requires changes in a handful of them. You have created branches by the
|
8
|
+
same name in the associated repositories. You have finished your work and
|
9
|
+
need to switch back to master for the entire system. Instead of trying to
|
10
|
+
remember the 5 (or was it 6?) different services you made changes in...
|
11
|
+
|
12
|
+
Try ~git branches feature/my-cool-feature~ to print out all repos in the current
|
13
|
+
directory that are checked out to the branch.
|
14
|
+
|
15
|
+
#+BEGIN_SRC text
|
16
|
+
my-cool-service-repo
|
17
|
+
bug/thing-was-broken
|
18
|
+
feature/cool-new-thing
|
19
|
+
* feature/my-cool-feature
|
20
|
+
some-other-branch
|
21
|
+
|
22
|
+
another-cool-service-repo
|
23
|
+
some-branch
|
24
|
+
some-other-branch
|
25
|
+
* feature/my-cool-feature
|
26
|
+
#+END_SRC
|
27
|
+
|
28
|
+
Other gitmore commands to try:
|
29
|
+
|
30
|
+
~git checkouts <branch-name>~ (default: master) - Check out all branches that have a branch
|
31
|
+
by the given name. Warns and prints unstashed changes when applicable, does not check out branch
|
32
|
+
on that repo.
|
33
|
+
|
34
|
+
~git diffs~ - Print diffs on all repos in current directory
|
35
|
+
|
36
|
+
~git fetches~ - Run ~git fetch~ on all repos in current directory
|
37
|
+
|
38
|
+
~git pulls~ - Pulls changes on all repos in current directory
|
39
|
+
|
40
|
+
~git gems~ - Print names of repos that are ruby gem projects
|
41
|
+
|
42
|
+
~git logf~ - Alias for ~git log --name-status --graph~
|
43
|
+
|
44
|
+
~git rollback~ - Alias for ~git reset HEAD~1~
|
45
|
+
|
46
|
+
~git save <name>~ - Alias for ~git stash save <name>~
|
47
|
+
|
48
|
+
~git sstash <filename>~ - Stash a single file
|
49
|
+
|
50
|
+
~git statuses~ - Print ~git status~ for each repo in directory
|
51
|
+
|
52
|
+
~git versions ruby~ - Print version of ruby being used on each repo in the
|
53
|
+
current directory containing ~.ruby-version~
|
54
|
+
|
55
|
+
More features documentation forthcoming! I whipped these up when working
|
56
|
+
on a project with at least 30 repositories that I found I needed an easier
|
57
|
+
way to manage. Much work is yet to be done, so please create an issue
|
58
|
+
for problems, suggestions, or feature requests. And of course, feel free
|
59
|
+
to contribute! Fork, play and create a pull request!
|
60
|
+
|
61
|
+
* Install
|
62
|
+
|
63
|
+
~gem install gitmore~
|
64
|
+
|
65
|
+
|
data/bin/console
CHANGED
data/exe/git-branches
CHANGED
data/exe/git-checkouts
CHANGED
data/exe/git-diffs
CHANGED
data/exe/git-fetches
CHANGED
data/exe/git-gems
CHANGED
data/exe/git-pulls
CHANGED
data/exe/git-statuses
CHANGED
data/exe/git-versions
CHANGED
data/lib/gitmore.rb
CHANGED
@@ -1,49 +1,51 @@
|
|
1
1
|
require 'gitmore/version'
|
2
|
-
|
3
|
-
require 'helpers/branch_helper.rb'
|
4
|
-
require 'helpers/ruby_helper.rb'
|
5
|
-
require 'branch_matcher.rb'
|
6
|
-
require 'statustician.rb'
|
2
|
+
require 'gitmore/utils'
|
7
3
|
|
8
4
|
module Gitmore
|
9
5
|
class Error < StandardError; end
|
10
|
-
def self.branches(branch_string, option=nil)
|
11
|
-
repositories = Gitmore::BranchMatcher.new(branch_string, option)
|
12
|
-
repositories.branches
|
13
|
-
end
|
14
6
|
|
15
|
-
|
16
|
-
|
17
|
-
repositories.checkout
|
18
|
-
end
|
7
|
+
class Matcher
|
8
|
+
attr_reader :branch_string, :option
|
19
9
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
10
|
+
def initialize(branch_string=nil, option=nil)
|
11
|
+
@branch_string = branch_string
|
12
|
+
@option = option
|
13
|
+
end
|
24
14
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
15
|
+
def branches
|
16
|
+
repositories.branches
|
17
|
+
end
|
29
18
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
19
|
+
def checkouts
|
20
|
+
repositories.checkout
|
21
|
+
end
|
34
22
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
23
|
+
def statuses
|
24
|
+
repositories.status
|
25
|
+
end
|
39
26
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
27
|
+
def diffs
|
28
|
+
repositories.diffs
|
29
|
+
end
|
30
|
+
|
31
|
+
def gems
|
32
|
+
repositories.gems
|
33
|
+
end
|
34
|
+
|
35
|
+
def versions(language)
|
36
|
+
repositories.versions(language)
|
37
|
+
end
|
38
|
+
|
39
|
+
def fetches
|
40
|
+
repositories.fetches
|
41
|
+
end
|
42
|
+
|
43
|
+
def pulls
|
44
|
+
repositories.pulls
|
45
|
+
end
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
-
|
47
|
+
def repositories
|
48
|
+
Gitmore::Repositories.get_for(branch_string, option)
|
49
|
+
end
|
48
50
|
end
|
49
51
|
end
|
File without changes
|
File without changes
|
@@ -1,9 +1,3 @@
|
|
1
|
-
require_relative 'helpers/branch_helper.rb'
|
2
|
-
require_relative 'helpers/ruby_helper.rb'
|
3
|
-
require_relative 'repositories.rb'
|
4
|
-
require_relative 'branches.rb'
|
5
|
-
require_relative 'statustician.rb'
|
6
|
-
|
7
1
|
module Gitmore
|
8
2
|
class BranchMatcher
|
9
3
|
attr_accessor :matcher, :option, :repositories
|
File without changes
|
File without changes
|
data/lib/gitmore/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitmore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- son1112
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- Gemfile
|
108
108
|
- Gemfile.lock
|
109
109
|
- LICENSE.txt
|
110
|
+
- README.org
|
110
111
|
- Rakefile
|
111
112
|
- bin/console
|
112
113
|
- bin/setup
|
@@ -123,14 +124,16 @@ files:
|
|
123
124
|
- exe/git-statuses
|
124
125
|
- exe/git-versions
|
125
126
|
- gitmore.gemspec
|
126
|
-
- lib/branch_matcher.rb
|
127
|
-
- lib/branches.rb
|
128
127
|
- lib/gitmore.rb
|
128
|
+
- lib/gitmore/helpers.rb
|
129
|
+
- lib/gitmore/helpers/branch_helper.rb
|
130
|
+
- lib/gitmore/helpers/ruby_helper.rb
|
131
|
+
- lib/gitmore/utils.rb
|
132
|
+
- lib/gitmore/utils/branch_matcher.rb
|
133
|
+
- lib/gitmore/utils/branches.rb
|
134
|
+
- lib/gitmore/utils/repositories.rb
|
135
|
+
- lib/gitmore/utils/statustician.rb
|
129
136
|
- lib/gitmore/version.rb
|
130
|
-
- lib/helpers/branch_helper.rb
|
131
|
-
- lib/helpers/ruby_helper.rb
|
132
|
-
- lib/repositories.rb
|
133
|
-
- lib/statustician.rb
|
134
137
|
homepage: https://github.com/son1112/gitmore
|
135
138
|
licenses:
|
136
139
|
- MIT
|