code_owners 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/code_owners.rb +10 -1
- data/lib/code_owners/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24ab19a06481e09c20a3f95fea27072d53295a71fbc1bde5be7eac2e9eb35c23
|
4
|
+
data.tar.gz: a944a07f298772b8cbe20526a8e32415601a29fba24d5f8943602cfbbbe68e6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1436b88d8d02715528137180e920d55f944a9d81fd8c6f5e4795da75d45efd221818fb79c2276e73399a81378bf33491bd2183ad570a4ab9bade020020b404d
|
7
|
+
data.tar.gz: e4d28dd008b14ba0c42c04ae588f1753d90efe9fa3425b521175013f450b27f76c25d03420d18a4805a426f7fb17efb096e58ae5fb07e3a6c9b476f46d118aa4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
code_owners (1.0.
|
4
|
+
code_owners (1.0.5)
|
5
5
|
rake
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.3)
|
11
|
-
rake (12.3.
|
11
|
+
rake (12.3.2)
|
12
12
|
rspec (3.7.0)
|
13
13
|
rspec-core (~> 3.7.0)
|
14
14
|
rspec-expectations (~> 3.7.0)
|
@@ -31,4 +31,4 @@ DEPENDENCIES
|
|
31
31
|
rspec
|
32
32
|
|
33
33
|
BUNDLED WITH
|
34
|
-
1.
|
34
|
+
1.17.2
|
data/lib/code_owners.rb
CHANGED
@@ -25,9 +25,18 @@ module CodeOwners
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
def search_codeowners_file
|
29
|
+
paths = ["CODEOWNERS", "docs/CODEOWNERS", ".github/CODEOWNERS"]
|
30
|
+
for path in paths
|
31
|
+
current_file_path = File.join(current_repo_path, path)
|
32
|
+
return current_file_path if File.exist?(current_file_path)
|
33
|
+
end
|
34
|
+
abort("[ERROR] CODEOWNERS file does not exist.")
|
35
|
+
end
|
36
|
+
|
28
37
|
# read the github file and spit out a slightly formatted list of patterns and their owners
|
29
38
|
def pattern_owners
|
30
|
-
codeowner_path =
|
39
|
+
codeowner_path = search_codeowners_file
|
31
40
|
File.read(codeowner_path).split("\n").map do |line|
|
32
41
|
line.gsub(/#.*/, '').gsub(/^$/, " @").split(/\s+@/, 2)
|
33
42
|
end
|
data/lib/code_owners/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_owners
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Cheatham
|
@@ -76,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
|
-
|
80
|
-
rubygems_version: 2.7.3
|
79
|
+
rubygems_version: 3.0.1
|
81
80
|
signing_key:
|
82
81
|
specification_version: 4
|
83
82
|
summary: ".github/CODEOWNERS introspection utility gem"
|