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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 334ed769bcf2938a93223b52d97ce68da4facf0d
4
- data.tar.gz: 8b6272a505c246e2b5adeba24c095c997db92938
3
+ metadata.gz: 35b30a370fc3eed420ab7c87edde586defa46824
4
+ data.tar.gz: f109937687adf8431fb2626e6eef823b5ab60987
5
5
  SHA512:
6
- metadata.gz: a5d4f2352701c68369b8bd245a02c346460b2e5a4403b9e6d4ccb395a8c315a3017351c9e7642cee42528bfd7f3a1ba8a372c5a37569d18cd5cdaf9b615ac3d2
7
- data.tar.gz: 2983b9120e5a5d1114f7c8b84f113f060fada5469213e99656f63fd87cd3b8dc836c679f882194f16f3657f3e55d06e4179dc74518557218e4dd73201875a2dc
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
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Duo
3
- VERSION = "1.2.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -8,20 +8,24 @@ module Git::Duo
8
8
  end
9
9
  attr_reader :collection
10
10
 
11
- def test_where_with_existing_keys
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 test_where_with_nonexisting_keys_returns_empty_array
16
- assert_empty collection.where(omg: 0)
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 test_where_returns_the_result_of_the_valid_query
20
- refute_empty collection.where(key: 'alfred', omg: 0)
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 test_where_returns_empty_array_with_an_empty_search
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.2.0
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-01 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler