git-show-branches-all 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.bundle/config +3 -0
- data/.gitignore +4 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +32 -0
- data/bin/autospec +16 -0
- data/bin/git-show-branches-all +8 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/rspec +16 -0
- data/git-show-branches-all.gemspec +27 -0
- data/lib/git-show-branches-all.rb +1 -0
- data/lib/git-show-branches-all/application.rb +43 -0
- data/lib/git-show-branches-all/version.rb +3 -0
- metadata +118 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4fa9216d5a8777312d63390e415861dd2951b199
|
4
|
+
data.tar.gz: 38f715dce04fdd8f2846507660dc703bfe541230
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 521734d01959671e57fec5966b401f11f8d62870bf3ca271509a8e626debea98fad8d01e9eb4f454706d3595009ba3622543fc0dbe016894419dff6aa7ed493f
|
7
|
+
data.tar.gz: 2536ac3b1d25416b0a979c129dbb5122e9659ea419c07a81e8f74953f1db6b06fdf604b1921eb2c0162974ea0669991d16f491f1b7d56e002ced40d5b521fa6b
|
data/.bundle/config
ADDED
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
git-show-branches-all (0.0.1)
|
5
|
+
colorize
|
6
|
+
fileutils
|
7
|
+
parallel
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
colorize (0.6.0)
|
13
|
+
diff-lcs (1.1.3)
|
14
|
+
fileutils (0.7)
|
15
|
+
rmagick (>= 2.13.1)
|
16
|
+
parallel (0.9.2)
|
17
|
+
rmagick (2.13.2)
|
18
|
+
rspec (2.5.0)
|
19
|
+
rspec-core (~> 2.5.0)
|
20
|
+
rspec-expectations (~> 2.5.0)
|
21
|
+
rspec-mocks (~> 2.5.0)
|
22
|
+
rspec-core (2.5.2)
|
23
|
+
rspec-expectations (2.5.0)
|
24
|
+
diff-lcs (~> 1.1.2)
|
25
|
+
rspec-mocks (2.5.0)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
git-show-branches-all!
|
32
|
+
rspec (~> 2.5.0)
|
data/bin/autospec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'autospec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'autospec')
|
data/bin/htmldiff
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'htmldiff' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('diff-lcs', 'htmldiff')
|
data/bin/ldiff
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'ldiff' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('diff-lcs', 'ldiff')
|
data/bin/rspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "git-show-branches-all/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "git-show-branches-all"
|
7
|
+
s.version = Git_show_branches_all::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.license = 'FreeForAll'
|
10
|
+
s.date = Time.now
|
11
|
+
s.authors = ["Azul"]
|
12
|
+
s.email = ["don-spam-me@outhere.com"]
|
13
|
+
s.homepage = ""
|
14
|
+
s.summary = %q{Show all existing branches in a set of directorys}
|
15
|
+
s.description = %q{A sample gem. It doesn't do a whole lot, but it's still useful.}
|
16
|
+
|
17
|
+
s.add_dependency "colorize"
|
18
|
+
s.add_dependency "fileutils"
|
19
|
+
s.add_dependency "parallel"
|
20
|
+
s.executables = ("git-show-branches-all")
|
21
|
+
s.add_development_dependency "rspec", "~>2.5.0"
|
22
|
+
|
23
|
+
s.files = `git ls-files`.split("\n")
|
24
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
25
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
26
|
+
s.require_paths = ["lib"]
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'git-show-branches-all/application'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rest_client'
|
3
|
+
require 'json'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'colorize'
|
6
|
+
|
7
|
+
if ARGV.count != 2
|
8
|
+
puts "Usage: <-gd gitrootdir> "
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
count=0
|
13
|
+
ARGV.each do |option|
|
14
|
+
case option
|
15
|
+
when "-h"
|
16
|
+
puts "Usage: <-gd gitrootdir>"
|
17
|
+
puts "where (gitrootdir) is the base directory containing the git repositories"
|
18
|
+
exit 1
|
19
|
+
when "-gd"
|
20
|
+
@my_git_rootdir=ARGV[count+1]
|
21
|
+
end
|
22
|
+
count=count+1
|
23
|
+
end
|
24
|
+
|
25
|
+
def print_and_flush(str)
|
26
|
+
print str
|
27
|
+
$stdout.flush
|
28
|
+
end
|
29
|
+
|
30
|
+
Dir.foreach(@my_git_rootdir) do |entry| #PROJECT level dir
|
31
|
+
next if entry == '.' or entry == '..'
|
32
|
+
gitdir="#{ @my_git_rootdir + '/' + entry}" #git repo level dirs
|
33
|
+
next if File.file?(gitdir)
|
34
|
+
other_branches=Array.new
|
35
|
+
other_branches=%x[ cd #{gitdir} && git branch | grep -v "*" 2>/dev/null ].gsub(' ','').split("\n")
|
36
|
+
active_branches=%x[ cd #{gitdir} && git rev-parse --symbolic-full-name --abbrev-ref HEAD 2>/dev/null ].gsub(' ','').chomp
|
37
|
+
print_and_flush "[#{active_branches.red}]"
|
38
|
+
other_branches.each do |b|
|
39
|
+
print_and_flush ",(#{b.gsub(' ','').gsub('\n','').chomp.green })"
|
40
|
+
end
|
41
|
+
print_and_flush " => #{gitdir.gsub(@my_git_rootdir.to_s,'')}\n"
|
42
|
+
end
|
43
|
+
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: git-show-branches-all
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Azul
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colorize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fileutils
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: parallel
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.5.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.5.0
|
69
|
+
description: A sample gem. It doesn't do a whole lot, but it's still useful.
|
70
|
+
email:
|
71
|
+
- don-spam-me@outhere.com
|
72
|
+
executables:
|
73
|
+
- autospec
|
74
|
+
- git-show-branches-all
|
75
|
+
- htmldiff
|
76
|
+
- ldiff
|
77
|
+
- rspec
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- .bundle/config
|
82
|
+
- .gitignore
|
83
|
+
- Gemfile
|
84
|
+
- Gemfile.lock
|
85
|
+
- bin/autospec
|
86
|
+
- bin/git-show-branches-all
|
87
|
+
- bin/htmldiff
|
88
|
+
- bin/ldiff
|
89
|
+
- bin/rspec
|
90
|
+
- git-show-branches-all.gemspec
|
91
|
+
- lib/git-show-branches-all.rb
|
92
|
+
- lib/git-show-branches-all/application.rb
|
93
|
+
- lib/git-show-branches-all/version.rb
|
94
|
+
homepage: ''
|
95
|
+
licenses:
|
96
|
+
- FreeForAll
|
97
|
+
metadata: {}
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 2.0.14
|
115
|
+
signing_key:
|
116
|
+
specification_version: 4
|
117
|
+
summary: Show all existing branches in a set of directorys
|
118
|
+
test_files: []
|