girc 0.0.1 → 0.0.2
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.
- data/lib/girc.rb +11 -5
- data/lib/girc/version.rb +1 -1
- metadata +2 -2
data/lib/girc.rb
CHANGED
@@ -27,13 +27,19 @@ module Girc
|
|
27
27
|
files
|
28
28
|
end
|
29
29
|
|
30
|
-
# return
|
31
|
-
def
|
30
|
+
# return config list as a hash
|
31
|
+
def config
|
32
|
+
h = Hash.new
|
32
33
|
`#{@git} config --list`.split("\n").each do |line|
|
33
|
-
|
34
|
-
|
34
|
+
key, value = line.split("=")
|
35
|
+
h[key] = value
|
35
36
|
end
|
36
|
-
|
37
|
+
h
|
38
|
+
end
|
39
|
+
|
40
|
+
# return the value of user.name in configuration
|
41
|
+
def me
|
42
|
+
config["user.name"] || "?"
|
37
43
|
end
|
38
44
|
|
39
45
|
# all branches include remote branches
|
data/lib/girc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: girc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Girc is a ruby console handler for git commands.
|
15
15
|
email: huangw@pe-po.com
|