codeowners-checker 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 +4 -4
- data/lib/codeowners/checker.rb +1 -1
- data/lib/codeowners/checker/version.rb +1 -1
- metadata +3 -5
- data/issues.md +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8746f9f4f89d25fb07b5bc71b4c39f6c9ce29642df70e8b7e1ae8b6eba2bcf1d
|
4
|
+
data.tar.gz: cc2e562c42fb371f71e3b855c545e82ffb0975cf9f24dab00a3a1221f42f8822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ce771c4b8366145f61cf8349c6f1a92b7fc3d5412a07de202df27f509718b8883517ad585eda6423c8a006cfbfddf58507b5fa0eb9fffb48b5eaa29d6c262ae
|
7
|
+
data.tar.gz: 20aad4c158197f6b4c2e6e6ed366d7c2fbf1811a0cfa19441ae0ab963d05e36e7197ff82e154d36a904bb58326c02c4b1d5cdf3e8a967294557d8625ab1d93c5
|
data/lib/codeowners/checker.rb
CHANGED
@@ -47,7 +47,7 @@ module Codeowners
|
|
47
47
|
codeowners.each_with_object(hash_of_arrays) do |line, patterns_by_owner|
|
48
48
|
next unless line.pattern?
|
49
49
|
|
50
|
-
line.owners.each { |owner| patterns_by_owner[owner] << line.pattern }
|
50
|
+
line.owners.each { |owner| patterns_by_owner[owner] << line.pattern.gsub(%r{^/}, '') }
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeowners-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jônatas Davi Paganini
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fuzzy_match
|
@@ -179,7 +179,6 @@ files:
|
|
179
179
|
- README.md
|
180
180
|
- bin/codeowners-checker
|
181
181
|
- codeowners-checker.gemspec
|
182
|
-
- issues.md
|
183
182
|
- lib/codeowners/checker.rb
|
184
183
|
- lib/codeowners/checker/array.rb
|
185
184
|
- lib/codeowners/checker/code_owners.rb
|
@@ -221,8 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
220
|
- !ruby/object:Gem::Version
|
222
221
|
version: '0'
|
223
222
|
requirements: []
|
224
|
-
|
225
|
-
rubygems_version: 2.7.6
|
223
|
+
rubygems_version: 3.0.1
|
226
224
|
signing_key:
|
227
225
|
specification_version: 4
|
228
226
|
summary: Check consistency of Github CODEOWNERS and git changes.
|
data/issues.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
problems
|
2
|
-
|
3
|
-
- linked lines groups serve to attach or dettach specific info into a chunk of text
|
4
|
-
- linked lines belong to a group and group belong to file
|
5
|
-
|
6
|
-
|
7
|
-
what we're trying to solve
|
8
|
-
|
9
|
-
1. we have a file that have a tree structure without holding the tree
|
10
|
-
CodeOwners holds the flat structure
|
11
|
-
|
12
|
-
2. we need to interpret and parse the tree structure from the file
|
13
|
-
Group holds the tree structure with LineGroupers and pure lines
|
14
|
-
|
15
|
-
3. we need to iterate over the lines to verify the file consistency
|
16
|
-
Checker do that.
|
17
|
-
|
18
|
-
3.1 we interact with user when find similar and duplicated lines
|
19
|
-
|
20
|
-
4. we need to remove a line and remove a group if the line was the last pattern
|
21
|
-
in the group.
|
22
|
-
- the Line knows how to remove them selves.
|
23
|
-
|
24
|
-
5. we need to add or change lines
|
25
|
-
- the Group knows what file it belongs and allow to insert a pattern in the
|
26
|
-
middle or in the bottom of the file
|
27
|
-
|
28
|
-
|
29
|
-
|