gitwalker 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +16 -0
- data/LICENSE +22 -0
- data/README.md +2 -0
- data/Rakefile +2 -0
- data/bin/gitwalker +19 -0
- data/gitwalker.gemspec +17 -0
- data/lib/gitwalker.rb +5 -0
- data/lib/gitwalker/version.rb +3 -0
- metadata +73 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Marcello Milhomem Albuquerque
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/gitwalker
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "colorize"
|
3
|
+
|
4
|
+
GIT_BRANCH_AHEAD_REGEX = /Your branch is ahead/
|
5
|
+
GIT_NOTHING_TO_COMMIT_MESSAGE = "nothing to commit (working directory clean)"
|
6
|
+
|
7
|
+
directories = Dir.entries(".").select{ |f| f != "." and f != ".." and File.directory?(f) }
|
8
|
+
|
9
|
+
directories.each do |directory|
|
10
|
+
next unless Dir.entries(directory).include?(".git")
|
11
|
+
|
12
|
+
output_lines = Dir.chdir(directory){ %x[git status] }.split("\n")
|
13
|
+
|
14
|
+
output = directory.yellow + " "
|
15
|
+
output += "Pending push ".red if GIT_BRANCH_AHEAD_REGEX.match output_lines[1]
|
16
|
+
output += output_lines.last == GIT_NOTHING_TO_COMMIT_MESSAGE ? "Nothing to commit ".green : "Uncommited changes ".red
|
17
|
+
|
18
|
+
puts output
|
19
|
+
end
|
data/gitwalker.gemspec
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/gitwalker/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Marcello Milhomem Albuquerque"]
|
6
|
+
gem.email = ["marcello.m.albuquerque@gmail.com"]
|
7
|
+
gem.description = %q{Lists all git repositories in a master directory with the status of the repository}
|
8
|
+
gem.summary = %q{Lists all git repositories in a master directory with the status of the repository}
|
9
|
+
gem.homepage = "https://github.com/marcelloma/gitwalker"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.name = "gitwalker"
|
14
|
+
gem.require_paths = ["lib"]
|
15
|
+
gem.version = Gitwalker::VERSION
|
16
|
+
gem.add_dependency "colorize"
|
17
|
+
end
|
data/lib/gitwalker.rb
ADDED
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gitwalker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Marcello Milhomem Albuquerque
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: colorize
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Lists all git repositories in a master directory with the status of the
|
31
|
+
repository
|
32
|
+
email:
|
33
|
+
- marcello.m.albuquerque@gmail.com
|
34
|
+
executables:
|
35
|
+
- gitwalker
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- .gitignore
|
40
|
+
- Gemfile
|
41
|
+
- Gemfile.lock
|
42
|
+
- LICENSE
|
43
|
+
- README.md
|
44
|
+
- Rakefile
|
45
|
+
- bin/gitwalker
|
46
|
+
- gitwalker.gemspec
|
47
|
+
- lib/gitwalker.rb
|
48
|
+
- lib/gitwalker/version.rb
|
49
|
+
homepage: https://github.com/marcelloma/gitwalker
|
50
|
+
licenses: []
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options: []
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubyforge_project:
|
69
|
+
rubygems_version: 1.8.23
|
70
|
+
signing_key:
|
71
|
+
specification_version: 3
|
72
|
+
summary: Lists all git repositories in a master directory with the status of the repository
|
73
|
+
test_files: []
|