git-duo 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +5 -0
- data/lib/git/duo/author_collection.rb +2 -2
- data/lib/git/duo/exceptions.rb +1 -1
- data/lib/git/duo/pair.rb +7 -3
- data/lib/git/duo/repo.rb +3 -4
- data/lib/git/duo/version.rb +1 -1
- data/test/git/duo/pair_test.rb +11 -0
- data/test/test_helper.rb +2 -2
- metadata +18 -19
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Mzg4MmI1MzEwMDEyZmQxOWUxZjlkNjMwYjI5YWJmNDNjZDRjOThkMg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86abf0bd1edfba03e11c350784f8b92ea1c7ab69
|
4
|
+
data.tar.gz: 36b61939aaa264bc3521746b121f21f47379372d
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NGM1MGMzNGI1NmE0MDkxYTc3YjM1YmQ2YWJmOGM2NWFiODgzYWY3NjdhNDJi
|
11
|
-
NDRiZTEyNDcyNTNjODFhNGQ1Y2I5YTg0ZWUxNGJjY2FhMjc4MDI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NTJkYjZiYWI4MjhmZTUwMDMwZGUyMTgxZGNiMWQyM2NkMWFhMTI5YjAwYjBi
|
14
|
-
OWU1YzYxOTdkM2I1NTI0ZmU5MDBlMjk4OWNhZGEwNGU5MTFjYzZkMWVmNDU4
|
15
|
-
ZGVmZTAyYjZhMWJjZGU1NjNkZTBmNTJjYWFmZTExMzNjMGIzNzg=
|
6
|
+
metadata.gz: c5248b53243083ea48abbd4bc044cf986c889888a22c1dd21b98904d4244e00cb4274dcfb92cd7e2126896d85ab322a5a8f233b954d0fbbf140d6c22132699d9
|
7
|
+
data.tar.gz: 2d8a47d0e96058056e93a87e5468cdc0f44d7698c0d4d984c36b2af76acfd5d6216f0ef45dabfa79a5964c0805918379ac89117d2a1f09a49674c6bad4943894
|
data/README.md
CHANGED
@@ -37,6 +37,11 @@ $ git duo alfred bruce jim
|
|
37
37
|
Alfred Pennyworth + Bruce Wayne + Jim Gordon <dev+alfred+bruce+jim@gotham.travel>
|
38
38
|
```
|
39
39
|
|
40
|
+
```bash
|
41
|
+
$ git duo alfred
|
42
|
+
Alfred Pennyworth <alfred@gotham.travel>
|
43
|
+
```
|
44
|
+
|
40
45
|
```bash
|
41
46
|
$ git duo --list
|
42
47
|
Bruce Wayne <bruce@gotham.travel>
|
data/lib/git/duo/exceptions.rb
CHANGED
data/lib/git/duo/pair.rb
CHANGED
@@ -16,7 +16,11 @@ module Git
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def email
|
19
|
-
|
19
|
+
if authors.size > 1
|
20
|
+
base_email.gsub "%names", authors.map(&:key).join(?+)
|
21
|
+
else
|
22
|
+
authors.first.email
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
def to_s
|
@@ -38,9 +42,9 @@ module Git
|
|
38
42
|
end
|
39
43
|
|
40
44
|
def guess_base_email_from_authors
|
41
|
-
domains = authors.map
|
45
|
+
domains = authors.map {|author|
|
42
46
|
author.email.split(?@).last
|
43
|
-
|
47
|
+
}.uniq
|
44
48
|
|
45
49
|
"dev+%names@#{domains.first}" if domains.size == 1
|
46
50
|
end
|
data/lib/git/duo/repo.rb
CHANGED
@@ -61,10 +61,9 @@ module Git
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def save_authors
|
64
|
-
authors.
|
65
|
-
|
66
|
-
wrapper.config "git-duo.#{author.key} '#{author}'"
|
67
|
-
end
|
64
|
+
authors.
|
65
|
+
flatten.
|
66
|
+
each {|author| wrapper.config "git-duo.#{author.key} '#{author}'" }
|
68
67
|
end
|
69
68
|
|
70
69
|
def save_email
|
data/lib/git/duo/version.rb
CHANGED
data/test/git/duo/pair_test.rb
CHANGED
@@ -20,6 +20,17 @@ module Git::Duo
|
|
20
20
|
assert_equal expected_email, pair.email
|
21
21
|
end
|
22
22
|
|
23
|
+
def test_pair_supports_one_single_author
|
24
|
+
author = alfred_and_bruce.first
|
25
|
+
pair = Pair.new [author], wrapper: wrapper
|
26
|
+
|
27
|
+
expected_name = "Alfred Pennyworth"
|
28
|
+
expected_email = "alfred@gotham.travel"
|
29
|
+
|
30
|
+
assert_equal expected_name, pair.name
|
31
|
+
assert_equal expected_email, pair.email
|
32
|
+
end
|
33
|
+
|
23
34
|
def test_name
|
24
35
|
expected = 'Alfred Pennyworth + Bruce Wayne'
|
25
36
|
assert_equal expected, pair.name
|
data/test/test_helper.rb
CHANGED
@@ -6,8 +6,8 @@ require 'git/duo'
|
|
6
6
|
|
7
7
|
def alfred_and_bruce
|
8
8
|
[
|
9
|
-
Git::Duo::Author.import('
|
10
|
-
Git::Duo::Author.import('
|
9
|
+
Git::Duo::Author.import('alfred Alfred Pennyworth <alfred@gotham.travel>'),
|
10
|
+
Git::Duo::Author.import('bruce Bruce Wayne <bruce@gotham.travel>')
|
11
11
|
]
|
12
12
|
end
|
13
13
|
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Teo Ljungberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: A git porcelain for duo programming. Changes git-config's user.name and
|
@@ -90,9 +90,9 @@ executables:
|
|
90
90
|
extensions: []
|
91
91
|
extra_rdoc_files: []
|
92
92
|
files:
|
93
|
-
- .autotest
|
94
|
-
- .gitignore
|
95
|
-
- .travis.yml
|
93
|
+
- ".autotest"
|
94
|
+
- ".gitignore"
|
95
|
+
- ".travis.yml"
|
96
96
|
- Gemfile
|
97
97
|
- LICENSE.txt
|
98
98
|
- README.md
|
@@ -124,17 +124,17 @@ require_paths:
|
|
124
124
|
- lib
|
125
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.2.0
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Git pairing made easy
|
@@ -144,4 +144,3 @@ test_files:
|
|
144
144
|
- test/git/duo/pair_test.rb
|
145
145
|
- test/git/duo/repo_test.rb
|
146
146
|
- test/test_helper.rb
|
147
|
-
has_rdoc:
|