owners 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/example/app/models/OWNERS +3 -0
- data/example/app/models/comment.rb +1 -0
- data/lib/owners/config.rb +2 -2
- data/lib/owners/search.rb +4 -1
- data/lib/owners/version.rb +1 -1
- data/spec/owners_spec.rb +8 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c5d1368d6ed27a906ece70e3a6edf976a9b0ac
|
4
|
+
data.tar.gz: 8c1436b5ed74e1fbfcef72b046f861ba2d9bb889
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d4d45161eea9276c36647ab495ab5390d94b92a52532469094f53eead63a1f4e95010dd9ce77b0b1b27e7cc87d94cf7292818be4f705355c509167f5846e89b
|
7
|
+
data.tar.gz: 867e795bb099861807809d7248eb6224cc66a40f828fc34d0b81a0492795a16ffab4d24acfa39df9ccc3ca3827187aefc616feeff2b2a12b0d268d231b690789
|
data/Gemfile.lock
CHANGED
data/example/app/models/OWNERS
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/lib/owners/config.rb
CHANGED
@@ -5,7 +5,7 @@ module Owners
|
|
5
5
|
# @api private
|
6
6
|
class Config
|
7
7
|
def initialize(file)
|
8
|
-
@
|
8
|
+
@contents = file.read
|
9
9
|
@root = file.dirname.to_s
|
10
10
|
end
|
11
11
|
|
@@ -28,7 +28,7 @@ module Owners
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def subscriptions
|
31
|
-
@
|
31
|
+
@contents.split("\n").reject(&:empty?)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
data/lib/owners/search.rb
CHANGED
data/lib/owners/version.rb
CHANGED
data/spec/owners_spec.rb
CHANGED
@@ -52,5 +52,13 @@ RSpec.describe Owners do
|
|
52
52
|
expect(subject).to eq(["@org/blog", "@whitespace", "data@example.com"])
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
context "with multiple owners" do
|
57
|
+
let(:paths) { ["example/app/models/comment.rb"] }
|
58
|
+
|
59
|
+
it "parses owners correctly" do
|
60
|
+
expect(subject).to eq(["@duplicate", "@org/blog", "@owner", "data@example.com"])
|
61
|
+
end
|
62
|
+
end
|
55
63
|
end
|
56
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: owners
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Huber
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- example/app/controllers/users_controller.rb
|
60
60
|
- example/app/models/OWNERS
|
61
61
|
- example/app/models/blog.rb
|
62
|
+
- example/app/models/comment.rb
|
62
63
|
- example/app/models/post.rb
|
63
64
|
- example/app/models/user.rb
|
64
65
|
- lib/owners.rb
|