git_guts 0.1.0
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 +15 -0
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/bin/bash-bin +5 -0
- data/bin/git-about +19 -0
- data/bin/git-autocommit +19 -0
- data/bin/git-fireworks +5 -0
- data/bin/git-guts +19 -0
- data/bin/git-inception +19 -0
- data/bin/git-map +19 -0
- data/bin/git-multipush +19 -0
- data/bin/git-music +5 -0
- data/bin/git-open +19 -0
- data/bin/git-quote +19 -0
- data/bin/git-server +19 -0
- data/bin/git-test +19 -0
- data/bin/git-welcome +19 -0
- data/bin/ruby-bin +19 -0
- data/bin/scripts/git-about.rb +12 -0
- data/bin/scripts/git-autocommit.rb +3 -0
- data/bin/scripts/git-fireworks +158 -0
- data/bin/scripts/git-guts.rb +28 -0
- data/bin/scripts/git-inception.rb +3 -0
- data/bin/scripts/git-map.rb +3 -0
- data/bin/scripts/git-multipush.rb +3 -0
- data/bin/scripts/git-music +4 -0
- data/bin/scripts/git-open.rb +4 -0
- data/bin/scripts/git-quote.rb +13 -0
- data/bin/scripts/git-server.rb +3 -0
- data/bin/scripts/git-test.rb +3 -0
- data/bin/scripts/git-welcome.rb +61 -0
- data/bin/support/africa-fullmap.gif +0 -0
- data/bin/support/africa-map.gif +0 -0
- data/bin/support/inception.mp3 +0 -0
- data/git_guts.gemspec +43 -0
- data/lib/extensions/string.rb +31 -0
- data/lib/git_guts/about.rb +20 -0
- data/lib/git_guts/autocommit.rb +28 -0
- data/lib/git_guts/guts.rb +11 -0
- data/lib/git_guts/inception.rb +14 -0
- data/lib/git_guts/map.rb +19 -0
- data/lib/git_guts/multi_push.rb +24 -0
- data/lib/git_guts/open.rb +21 -0
- data/lib/git_guts/quote.rb +20 -0
- data/lib/git_guts/server.rb +33 -0
- data/lib/git_guts/test.rb +15 -0
- data/lib/git_guts/version.rb +3 -0
- data/lib/git_guts/welcome.rb +12 -0
- data/lib/git_guts.rb +4 -0
- data/lib/git_server/.gitignore +2 -0
- data/lib/git_server/Gemfile +9 -0
- data/lib/git_server/README.md +1 -0
- data/lib/git_server/Rakefile +4 -0
- data/lib/git_server/config.ru +4 -0
- data/lib/git_server/lib/git_server.rb +62 -0
- data/lib/git_server/lib/git_server_app.rb +38 -0
- data/lib/git_server/lib/version.rb +3 -0
- data/lib/git_server/log/.gitignore +1 -0
- data/lib/git_server/public/css/app.css +184 -0
- data/lib/git_server/public/css/details.css +54 -0
- data/lib/git_server/public/css/fonts.css +12 -0
- data/lib/git_server/public/css/pre.css +11 -0
- data/lib/git_server/public/images/.gitignore +0 -0
- data/lib/git_server/public/images/arrow.png +0 -0
- data/lib/git_server/public/images/cat.png +0 -0
- data/lib/git_server/public/images/diff.png +0 -0
- data/lib/git_server/public/images/loader.gif +0 -0
- data/lib/git_server/public/images/pipe.png +0 -0
- data/lib/git_server/public/images/reset.png +0 -0
- data/lib/git_server/public/js/.gitignore +0 -0
- data/lib/git_server/public/js/app.js +129 -0
- data/lib/git_server/public/js/jquery-2.0-min.js +6 -0
- data/lib/git_server/views/404.haml +4 -0
- data/lib/git_server/views/blob.haml +26 -0
- data/lib/git_server/views/commit.haml +17 -0
- data/lib/git_server/views/commit_summary.haml +19 -0
- data/lib/git_server/views/diff.haml +21 -0
- data/lib/git_server/views/diff_file.haml +19 -0
- data/lib/git_server/views/diff_summary.haml +3 -0
- data/lib/git_server/views/index.haml +25 -0
- data/lib/git_server/views/layout.haml +10 -0
- data/lib/git_server/views/tree.haml +19 -0
- data/lib/guard/git.rb +22 -0
- data/lib/thor/git_group.rb +12 -0
- metadata +285 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
OWVjOTk1NzE0NmFlZjZiNzIyMGUzNWIxOGYwZWIxZTJlZGE3OGY5ZQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
NGZkNDQxNGE1ZTkyODUzYmVhOTQ4ZjZlMzIxN2RhOGFhYTM3ODZiNA==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
ZDZiZDdjZTM2OWFhNjY0ZmYyY2EyOTJmZjI3NDFkODUxYjBlOGUxNTc5MWY4
|
|
10
|
+
Y2VkNjAyOWVhZTZkYTU2Y2QyY2RhMTJiZmFjNzIyMWI1ZDY2YTJkYzY3NzNm
|
|
11
|
+
MmQ1YmMwM2U1MDVlYjc1MWFiZDJjZWQ5NGU3YzJkMTdmOWVmZWM=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
OGVmYzg4MjFmZDBkZTRjNzdlNWM2NGI4NzM4YTc0NjlmNGMwZmRiOGI3Mjk5
|
|
14
|
+
MjU2YTEyODJiMzIxMDQ0ZTRmYTdmNWZlY2YxNDUxZmQ5MTE1NWM1YWRiODUz
|
|
15
|
+
MGQ1MDEzNTg0NzE1MmZmYWNmY2Q5MGMxYzNjODRkZTU0OWFhMTc=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2013 Shadab Ahmed
|
|
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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# GitGuts
|
|
2
|
+
|
|
3
|
+
TODO: Write a gem description
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
gem 'git_guts'
|
|
10
|
+
|
|
11
|
+
And then execute:
|
|
12
|
+
|
|
13
|
+
$ bundle
|
|
14
|
+
|
|
15
|
+
Or install it yourself as:
|
|
16
|
+
|
|
17
|
+
$ gem install git_guts
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
TODO: Write usage instructions here
|
|
22
|
+
|
|
23
|
+
## Contributing
|
|
24
|
+
|
|
25
|
+
1. Fork it
|
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/bash-bin
ADDED
data/bin/git-about
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-autocommit
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-fireworks
ADDED
data/bin/git-guts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-inception
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-map
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-multipush
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-music
ADDED
data/bin/git-open
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-quote
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-server
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-test
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/git-welcome
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
data/bin/ruby-bin
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
DIR = File.expand_path('../', __FILE__)
|
|
2
|
+
begin
|
|
3
|
+
RUBY_BIN = File.read("#{DIR}/RUBY_BIN_PATH").chomp
|
|
4
|
+
rescue
|
|
5
|
+
puts <<-MSG
|
|
6
|
+
|
|
7
|
+
Looks like you haven't specified which ruby to use.
|
|
8
|
+
|
|
9
|
+
Please run this command manually:
|
|
10
|
+
|
|
11
|
+
which ruby > #{DIR}/RUBY_BIN_PATH
|
|
12
|
+
|
|
13
|
+
MSG
|
|
14
|
+
|
|
15
|
+
exit
|
|
16
|
+
end
|
|
17
|
+
SCRIPT_NAME = File.basename(__FILE__)
|
|
18
|
+
ARGV.insert(0, "#{DIR}/scripts/#{SCRIPT_NAME}.rb")
|
|
19
|
+
exec RUBY_BIN, *ARGV
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Shamelessly stole this from http://www.linuxjournal.com/content/fireworks-command-line
|
|
4
|
+
|
|
5
|
+
rows=$(tput lines)
|
|
6
|
+
cols=$(tput cols)
|
|
7
|
+
colors=(red green blue purple cyan yellow brown)
|
|
8
|
+
lock_file=
|
|
9
|
+
lock_file_base=/tmp/$(basename $0 .sh)
|
|
10
|
+
|
|
11
|
+
multiple=0
|
|
12
|
+
if [[ "$1" ]]; then
|
|
13
|
+
nsingle=$1
|
|
14
|
+
shift
|
|
15
|
+
else
|
|
16
|
+
nsingle=10
|
|
17
|
+
fi
|
|
18
|
+
if [[ "$1" ]]; then
|
|
19
|
+
nmultiple=$1
|
|
20
|
+
shift
|
|
21
|
+
if [[ $nmultiple -gt 8 ]]; then nmultiple=8; fi
|
|
22
|
+
else
|
|
23
|
+
nmultiple=6
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function colorstr()
|
|
28
|
+
{
|
|
29
|
+
local row=$1
|
|
30
|
+
local col=$2
|
|
31
|
+
local color=$3
|
|
32
|
+
local v
|
|
33
|
+
case "$color" in
|
|
34
|
+
red) v=31;;
|
|
35
|
+
green) v=34;;
|
|
36
|
+
blue) v=32;;
|
|
37
|
+
purple) v=35;;
|
|
38
|
+
cyan) v=36;;
|
|
39
|
+
yellow) v=33;;
|
|
40
|
+
brown) v=33;;
|
|
41
|
+
white) v=37;;
|
|
42
|
+
*) v=;;
|
|
43
|
+
esac
|
|
44
|
+
shift 3
|
|
45
|
+
|
|
46
|
+
if [[ $multiple -ne 0 ]]; then
|
|
47
|
+
touch $lock_file
|
|
48
|
+
while [[ $(ls $lock_file_base.* 2>/dev/null | head -n 1) != $lock_file ]]
|
|
49
|
+
do
|
|
50
|
+
sleep 0.01
|
|
51
|
+
done
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
tput cup $row $col
|
|
55
|
+
echo -n -e "\033["$v"m"
|
|
56
|
+
set -f
|
|
57
|
+
echo -n $*
|
|
58
|
+
set +f
|
|
59
|
+
if [[ $multiple -ne 0 ]]; then
|
|
60
|
+
rm -f $lock_file
|
|
61
|
+
fi
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function center_colorstr()
|
|
65
|
+
{
|
|
66
|
+
local row=$1
|
|
67
|
+
local color=$2
|
|
68
|
+
shift 2
|
|
69
|
+
local s="$*"
|
|
70
|
+
local slen=${#s}
|
|
71
|
+
colorstr $row $(((cols / 2) - (slen / 2))) $color "$s"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function fireworks()
|
|
75
|
+
{
|
|
76
|
+
local row=$((rows - 1))
|
|
77
|
+
local col=$(((RANDOM % (cols / 2)) + (cols / 4)))
|
|
78
|
+
local height=$((RANDOM % rows - 2))
|
|
79
|
+
local slant
|
|
80
|
+
local h
|
|
81
|
+
local color1=${colors[$((RANDOM % ${#colors[*]}))]}
|
|
82
|
+
local color2=${colors[$((RANDOM % ${#colors[*]}))]}
|
|
83
|
+
local color3=${colors[$((RANDOM % ${#colors[*]}))]}
|
|
84
|
+
while [[ $color1 == $color2 || $color1 == $color3 || $color2 == $color3 ]]
|
|
85
|
+
do
|
|
86
|
+
color2=${colors[$((RANDOM % ${#colors[*]}))]}
|
|
87
|
+
color3=${colors[$((RANDOM % ${#colors[*]}))]}
|
|
88
|
+
done
|
|
89
|
+
|
|
90
|
+
case $((RANDOM % 4)) in
|
|
91
|
+
0) slant=-2;;
|
|
92
|
+
1) slant=-1;;
|
|
93
|
+
2) slant=1;;
|
|
94
|
+
3) slant=2;;
|
|
95
|
+
esac
|
|
96
|
+
|
|
97
|
+
if [[ $height -gt 5 ]]; then
|
|
98
|
+
h=$height
|
|
99
|
+
|
|
100
|
+
while [[ $h -gt 0 ]]
|
|
101
|
+
do
|
|
102
|
+
colorstr $row $col $color1 '.'
|
|
103
|
+
let row--
|
|
104
|
+
if [[ $((col + slant)) -ge $((cols - 3)) || $((col + slant)) -le 2 ]]; then break; fi
|
|
105
|
+
let col+=slant
|
|
106
|
+
let h--
|
|
107
|
+
sleep 0.02
|
|
108
|
+
done
|
|
109
|
+
|
|
110
|
+
if [[ $((col + slant)) -lt $((cols - 3)) && $((col + slant)) -gt 2 ]]; then
|
|
111
|
+
|
|
112
|
+
h=$((height / 5))
|
|
113
|
+
|
|
114
|
+
while [[ $h -gt 0 ]]
|
|
115
|
+
do
|
|
116
|
+
colorstr $row $col $color2 '.'
|
|
117
|
+
let row++
|
|
118
|
+
if [[ $((col + slant)) -ge $((cols - 3)) || $((col + slant)) -le 2 ]]; then break; fi
|
|
119
|
+
let col+=slant
|
|
120
|
+
let h--
|
|
121
|
+
sleep 0.02
|
|
122
|
+
done
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
colorstr $((row)) $((col - 1)) $color3 '***'
|
|
126
|
+
colorstr $((row - 1)) $((col)) $color3 '*'
|
|
127
|
+
colorstr $((row + 1)) $((col)) $color3 '*'
|
|
128
|
+
fi
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
for i in $(seq 1 $nsingle)
|
|
132
|
+
do
|
|
133
|
+
clear
|
|
134
|
+
fireworks
|
|
135
|
+
sleep 0.3
|
|
136
|
+
done
|
|
137
|
+
|
|
138
|
+
clear
|
|
139
|
+
|
|
140
|
+
pids=
|
|
141
|
+
for i in $(seq 1 $nmultiple)
|
|
142
|
+
do
|
|
143
|
+
let multiple++
|
|
144
|
+
lock_file=$lock_file_base.$i
|
|
145
|
+
fireworks &
|
|
146
|
+
pids="$pids $!"
|
|
147
|
+
done
|
|
148
|
+
|
|
149
|
+
trap "kill -9 $pids 2>/dev/null" EXIT
|
|
150
|
+
|
|
151
|
+
wait $pids
|
|
152
|
+
sleep 1
|
|
153
|
+
|
|
154
|
+
read -p "Thank You!"
|
|
155
|
+
clear
|
|
156
|
+
echo
|
|
157
|
+
|
|
158
|
+
echo -n -e "\033[m"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#! /usr/bin/env rvm 1.9 do ruby
|
|
2
|
+
require 'git_guts'
|
|
3
|
+
require 'git_guts/guts'
|
|
4
|
+
GitGuts::Guts.start
|
|
5
|
+
__END__
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
_ _ ___ ___ ___ / / ____ _ ___ _ _ _ _ ___ ____ ____ _ _ / ____ _ _ ____ ___ ____ ___ ____ _ _ _ _ ____ ___ / ____ _ ___ ____ _ _ ___ ____
|
|
14
|
+
|__| | | |__] . / / | __ | | |__| | | |__] | | | |\/| / [__ |__| |__| | \ |__| |__] |__| |__| |\/| |___ | \ / | __ | | | __ | | | [__
|
|
15
|
+
| | | | | ./ / |__] | | | | |__| |__] .|___ |__| | | / ___] | | | | |__/ | | |__] | | | | | | |___ |__/ / |__] | | ___ |__] |__| | ___]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|