git-duo 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c0f6ff616484349524e859145e9d87f9b32c64a9
4
- data.tar.gz: 7c4eb96af995b97b22f0b0a7bd79ac5c6a5e64d0
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODQ5NmE2NDZkODI5MjlhNmFjMWE1NWMzNmJkYjNlNWE0OTJiMzc1Nw==
5
+ data.tar.gz: !binary |-
6
+ Mzg4MmI1MzEwMDEyZmQxOWUxZjlkNjMwYjI5YWJmNDNjZDRjOThkMg==
5
7
  SHA512:
6
- metadata.gz: c66fb11792973114be132fd8b70998a9d8494fa23d650fa866767a8605b05f5efad3d1d1ab5d9ab4e199fddefe8b78d34590ef406c6da92fd2df247a734386b9
7
- data.tar.gz: 060e87b83139ee87e208ac22f5b072279ed0039e56fbd2dfcb826fcb060546a83ebd7cf5c4b089ec2b9c2dd7c2891ce3f574667cd01f48d82551e653a51a88a1
8
+ metadata.gz: !binary |-
9
+ NGY1YTg5OGM5NmU0MDFhYmY0Y2UxMmQ2NjAyMDg4ZGI1MGZkNTg1OWUzODdi
10
+ NGM1MGMzNGI1NmE0MDkxYTc3YjM1YmQ2YWJmOGM2NWFiODgzYWY3NjdhNDJi
11
+ NDRiZTEyNDcyNTNjODFhNGQ1Y2I5YTg0ZWUxNGJjY2FhMjc4MDI=
12
+ data.tar.gz: !binary |-
13
+ NTJkYjZiYWI4MjhmZTUwMDMwZGUyMTgxZGNiMWQyM2NkMWFhMTI5YjAwYjBi
14
+ OWU1YzYxOTdkM2I1NTI0ZmU5MDBlMjk4OWNhZGEwNGU5MTFjYzZkMWVmNDU4
15
+ ZGVmZTAyYjZhMWJjZGU1NjNkZTBmNTJjYWFmZTExMzNjMGIzNzg=
data/lib/git/duo/pair.rb CHANGED
@@ -34,7 +34,7 @@ module Git
34
34
  def base_email
35
35
  wrapper.config("git-duo.email").first ||
36
36
  guess_base_email_from_authors ||
37
- raise(Git::Duo::EmailNotImplemented)
37
+ raise(Git::Duo::EmailNotImplementedError)
38
38
  end
39
39
 
40
40
  def guess_base_email_from_authors
data/lib/git/duo/repo.rb CHANGED
@@ -22,8 +22,8 @@ module Git
22
22
  map {|a| Git::Duo::Author.import(a) }
23
23
  end
24
24
 
25
- def authors=(new_authors)
26
- @authors = new_authors
25
+ def authors= *new_authors
26
+ @authors = *new_authors
27
27
  end
28
28
 
29
29
  def committer
@@ -61,7 +61,8 @@ module Git
61
61
  end
62
62
 
63
63
  def save_authors
64
- authors.each do |author|
64
+ authors.flatten.
65
+ each do |author|
65
66
  wrapper.config "git-duo.#{author.key} '#{author}'"
66
67
  end
67
68
  end
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Duo
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -45,7 +45,7 @@ module Git::Duo
45
45
  wrapper.expects(:config).with("git-duo.email").
46
46
  returns([]).at_least_once
47
47
 
48
- assert_raises Git::Duo::EmailNotImplemented do
48
+ assert_raises Git::Duo::EmailNotImplementedError do
49
49
  Pair.new(bruce_and_edward, wrapper: wrapper).email
50
50
  end
51
51
  end
@@ -24,7 +24,7 @@ module Git::Duo
24
24
  assert_instance_of Author, repo.authors.sample
25
25
  end
26
26
 
27
- def test_importing_authors
27
+ def test_equals_equals_imports_authors
28
28
  wrapper.expects(:config).with('--get-regexp git-duo').returns(git_config).at_least_once
29
29
  wrapper.expects(:config).with("git-duo.email 'board+%names@gotham.travel'")
30
30
  wrapper.expects(:config).with("git-duo.jim 'Jim Gordon <jim@gotham.travel>'")
@@ -34,6 +34,15 @@ module Git::Duo
34
34
  repo.save
35
35
  end
36
36
 
37
+ def test_authors_equals_supports_one_author
38
+ wrapper.expects(:config).with('--get-regexp git-duo').returns(git_config).at_least_once
39
+ wrapper.expects(:config).with("git-duo.email 'board+%names@gotham.travel'")
40
+ wrapper.expects(:config).with("git-duo.bruce 'Bruce Wayne <bruce@gotham.travel>'")
41
+
42
+ repo.authors = Git::Duo::Author.import('bruce Bruce Wayne <bruce@gotham.travel>')
43
+ repo.save
44
+ end
45
+
37
46
  def test_committer
38
47
  wrapper.expects(:config).with('user.name').returns ["Bruce Wayne"]
39
48
  wrapper.expects(:config).with('user.email').returns ["bruce@gotham.travel"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Teo Ljungberg
@@ -14,70 +14,70 @@ dependencies:
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.2.0
137
+ rubygems_version: 2.1.11
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Git pairing made easy
@@ -144,3 +144,4 @@ 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: