git-duo 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git/duo/cli.rb +1 -1
- data/lib/git/duo/version.rb +1 -1
- data/test/git/duo/author_collection_test.rb +11 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b30a370fc3eed420ab7c87edde586defa46824
|
4
|
+
data.tar.gz: f109937687adf8431fb2626e6eef823b5ab60987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d92c5d12b61c21dd034613de5878739e7d3cef29149de49055522d246e38528bd7afc1ad28a0a5924cf86df3ccce068ecbb459c674e48275dcd36f77ffb756c0
|
7
|
+
data.tar.gz: e3189107ead1043efb8a1ccd96819275fab79395c47fc7a7e6d58501459eec38b9648d50992aa2432bf7730f98098c2a93fd55ddaed8c43ae642c0e3936ad25a
|
data/lib/git/duo/cli.rb
CHANGED
@@ -39,7 +39,7 @@ module Git
|
|
39
39
|
author = AuthorCollection.new(current_repo.authors).
|
40
40
|
where(key: key).first
|
41
41
|
abort "`#{key}` can't be found, see -h on how to add new authors" unless author
|
42
|
-
Author.new(key: key, name: author.name, email: author.email)
|
42
|
+
Author.new(key: author.key, name: author.name, email: author.email)
|
43
43
|
end
|
44
44
|
pair = Pair.new authors
|
45
45
|
pair.save
|
data/lib/git/duo/version.rb
CHANGED
@@ -8,20 +8,24 @@ module Git::Duo
|
|
8
8
|
end
|
9
9
|
attr_reader :collection
|
10
10
|
|
11
|
-
def
|
11
|
+
def test_where
|
12
|
+
refute_predicate collection.where(key: 'alfred'), :empty?
|
12
13
|
assert_instance_of Author, collection.where(key: 'alfred').first
|
13
14
|
end
|
14
15
|
|
15
|
-
def
|
16
|
-
|
16
|
+
def test_where_partial_match
|
17
|
+
search = collection.where(key: 'alf')
|
18
|
+
result = search.first
|
19
|
+
|
20
|
+
refute_predicate search, :empty?
|
21
|
+
assert_equal "Alfred Pennyworth", result.name
|
17
22
|
end
|
18
23
|
|
19
|
-
def
|
20
|
-
|
21
|
-
refute_empty collection.where(omg: 0, key: 'alfred')
|
24
|
+
def test_where_with_nonexisting_keys
|
25
|
+
assert_empty collection.where(omg: 0)
|
22
26
|
end
|
23
27
|
|
24
|
-
def
|
28
|
+
def test_where_with_no_given_query
|
25
29
|
assert_empty collection.where
|
26
30
|
end
|
27
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.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-10-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|