ppgit 0.1.0 → 0.2.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.
- data/CHANGELOG +2 -0
- data/README.markdown +6 -0
- data/VERSION +1 -1
- data/bin/git-pp +39 -0
- data/lib/ppgit/usage.txt +6 -1
- data/ppgit.gemspec +3 -3
- metadata +6 -4
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -10,9 +10,15 @@ Quick Usage :
|
|
10
10
|
|
11
11
|
$ ppgit john andy
|
12
12
|
$ ppgit john andy andy_john@acme.com
|
13
|
+
|
13
14
|
$ ppgit clear
|
14
15
|
$ ppgit --email_root *@acme.com
|
15
16
|
|
17
|
+
remark : 'ppgit' is a synonym of 'git pp' => you can write
|
18
|
+
|
19
|
+
$ git pp john andy
|
20
|
+
$ git pp clear
|
21
|
+
|
16
22
|
|
17
23
|
Usage :
|
18
24
|
-------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/bin/git-pp
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
2
|
+
|
3
|
+
$: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib' ))
|
4
|
+
require 'ppgit/utils'
|
5
|
+
|
6
|
+
if 0 == ARGV.length
|
7
|
+
puts usage_message()
|
8
|
+
else
|
9
|
+
# for testing, we pass an explicit - temporary - config file.
|
10
|
+
file_part = argv_value_of('--file')
|
11
|
+
file_part &&= "--file #{file_part}"
|
12
|
+
PPGIT_FILE_PART = file_part
|
13
|
+
|
14
|
+
if emailroot = argv_value_of('--email_root')
|
15
|
+
set_git_value 'ppgit.emailroot' , emailroot
|
16
|
+
end
|
17
|
+
|
18
|
+
if ARGV == %w(clear)
|
19
|
+
restore_git_value :from => 'user-before-ppgit.name' , :to => 'user.name'
|
20
|
+
restore_git_value :from => 'user-before-ppgit.email', :to => 'user.email'
|
21
|
+
`git config #{file_part} --remove-section user-before-ppgit`
|
22
|
+
|
23
|
+
elsif [2,3].include?(ARGV.length)
|
24
|
+
|
25
|
+
backup_git_value :from => 'user.name' , :to => 'user-before-ppgit.name'
|
26
|
+
backup_git_value :from => 'user.email', :to => 'user-before-ppgit.email'
|
27
|
+
|
28
|
+
two_users = [ARGV[0], ARGV[1]]
|
29
|
+
pair_user = two_users.sort.join('_')
|
30
|
+
|
31
|
+
pair_email = ARGV[2]
|
32
|
+
pair_email ||= email_from_email_root_and_user(pair_user)
|
33
|
+
|
34
|
+
set_git_value 'user.name' , pair_user
|
35
|
+
if pair_email
|
36
|
+
set_git_value 'user.email' , pair_email
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/ppgit/usage.txt
CHANGED
@@ -6,11 +6,16 @@ ppgit : quickly update ~/.gitconfig for pair-programming sessions.
|
|
6
6
|
|
7
7
|
Quick Usage:
|
8
8
|
|
9
|
-
$ ppgit john andy
|
10
9
|
$ ppgit john andy andy_john@acme.com
|
11
10
|
$ ppgit clear
|
11
|
+
|
12
12
|
$ ppgit --email_root *@acme.com
|
13
|
+
$ ppgit john andy
|
14
|
+
|
15
|
+
remark : 'ppgit' is a synonym of 'git pp' => you can write
|
13
16
|
|
17
|
+
$ git pp john andy
|
18
|
+
$ git pp clear
|
14
19
|
|
15
20
|
Usage:
|
16
21
|
|
data/ppgit.gemspec
CHANGED
@@ -5,15 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ppgit}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Alain Ravet"]
|
12
12
|
s.date = %q{2010-07-21}
|
13
|
-
s.default_executable = %q{ppgit}
|
14
13
|
s.description = %q{git users' pairs switcher}
|
15
14
|
s.email = %q{alain.ravet+git@gmail.com}
|
16
|
-
s.executables = ["ppgit"]
|
15
|
+
s.executables = ["git-pp", "ppgit"]
|
17
16
|
s.extra_rdoc_files = [
|
18
17
|
"LICENSE",
|
19
18
|
"README.markdown"
|
@@ -26,6 +25,7 @@ Gem::Specification.new do |s|
|
|
26
25
|
"README.markdown",
|
27
26
|
"Rakefile",
|
28
27
|
"VERSION",
|
28
|
+
"bin/git-pp",
|
29
29
|
"bin/ppgit",
|
30
30
|
"lib/ppgit.rb",
|
31
31
|
"lib/ppgit/usage.txt",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ppgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alain Ravet
|
@@ -16,7 +16,7 @@ bindir: bin
|
|
16
16
|
cert_chain: []
|
17
17
|
|
18
18
|
date: 2010-07-21 00:00:00 +02:00
|
19
|
-
default_executable:
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rspec
|
@@ -37,6 +37,7 @@ dependencies:
|
|
37
37
|
description: git users' pairs switcher
|
38
38
|
email: alain.ravet+git@gmail.com
|
39
39
|
executables:
|
40
|
+
- git-pp
|
40
41
|
- ppgit
|
41
42
|
extensions: []
|
42
43
|
|
@@ -51,6 +52,7 @@ files:
|
|
51
52
|
- README.markdown
|
52
53
|
- Rakefile
|
53
54
|
- VERSION
|
55
|
+
- bin/git-pp
|
54
56
|
- bin/ppgit
|
55
57
|
- lib/ppgit.rb
|
56
58
|
- lib/ppgit/usage.txt
|