git_explorer 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +21 -27
- data/lib/git_explorer.rb +3 -4
- data/lib/gitexplorer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50b2d8701738f9df86cb4f46116b13acdaab252b
|
4
|
+
data.tar.gz: 769c62496ef053a69a9a9a446c3350d71abaadb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03346d5a722f9c410b078452cd9d98c1b63fc1bac70283bb7143657ee72898ae3858bd9ed201ea992547b3cacc657f0b68edf6a6e19bbb039dd018e558b2eaac
|
7
|
+
data.tar.gz: 9294ad5a09a04eefcbe5f918e42e42fd366998658e717462549c4c339448f0ce47378729fb202a9dbdc79f223bbd4f559aeae52fbac4ff352728014158645a6c
|
data/README.md
CHANGED
@@ -1,41 +1,35 @@
|
|
1
|
-
#
|
1
|
+
# GitExplorer
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
GitExplorer comes from the necessity of get the status of all my local repositories. This tool will scan all your projects searching for git repositories and extract the project name, status and files unstaged.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
7
|
+
Linux:
|
10
8
|
|
11
|
-
```
|
12
|
-
gem
|
9
|
+
```sh
|
10
|
+
~$ gem install git_explorer
|
13
11
|
```
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install gitexplorer
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
13
|
+
## Usage example
|
26
14
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
15
|
+
Start explore with:
|
16
|
+
```bash
|
17
|
+
~$ git-explore <root_path>
|
18
|
+
```
|
32
19
|
|
33
|
-
|
20
|
+
All your git repositories from <root_path> will be scanned and the output will be similar to:
|
21
|
+
```
|
22
|
+
project <project_name> is up_to_date on branch master -> []
|
23
|
+
project <project_name> is up_to_date on branch master -> []
|
24
|
+
project <project_name> is not_staged on branch -> ["<file_name>", "<file_name>", "<file_name>"]
|
25
|
+
```
|
34
26
|
|
35
|
-
|
27
|
+
## Release History
|
36
28
|
|
29
|
+
* 0.1.0
|
30
|
+
* Work in progress.
|
37
31
|
|
38
|
-
##
|
32
|
+
## Meta
|
39
33
|
|
40
|
-
|
34
|
+
Alex Rocha - [about.me](http://about.me/alex.rochas)
|
41
35
|
|
data/lib/git_explorer.rb
CHANGED
@@ -26,14 +26,13 @@ module GitExplorer
|
|
26
26
|
class Explorer < Thor
|
27
27
|
include Thor::Actions
|
28
28
|
|
29
|
-
# TODO receive root path by parameter
|
30
29
|
# TODO refactor and extract maps to lambdas
|
31
30
|
desc "use for explore recursively directories and show actual status of git repositories", "gitx explore ."
|
32
|
-
def explore(root_dir)
|
33
|
-
run("find #{root_dir} -type f -name .gitignore", config={:capture=>true})
|
31
|
+
def explore(root_dir="./")
|
32
|
+
run("find #{root_dir} -type f -name .gitignore", config={:capture=>true, :verbose=>false})
|
34
33
|
.split("\n")
|
35
34
|
.map{|file| file.gsub(/\.gitignore/,'')}
|
36
|
-
.map{|dir| run("basename `git -C #{dir} rev-parse --show-toplevel`; git -C #{dir} status", config={:capture=>true})}
|
35
|
+
.map{|dir| run("basename `git -C #{dir} rev-parse --show-toplevel`; git -C #{dir} status", config={:capture=>true, :verbose=>false})}
|
37
36
|
.map{|status| status >> GitExplorer::extract_status}
|
38
37
|
.map{|status| say "project #{status.project_name} is #{status.status} on branch #{status.branch} -> #{status.files}"}
|
39
38
|
end
|
data/lib/gitexplorer/version.rb
CHANGED