code_owners 1.0.4 → 1.0.5

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
  SHA256:
3
- metadata.gz: f5e06c6fbdfd8cead1030d3d76b302885321095972e7fcab54d1ba887f1fceb0
4
- data.tar.gz: 54438d6312527c987d98f181f6242777badf72dad7b7561c39d3bc491dae5f2b
3
+ metadata.gz: 24ab19a06481e09c20a3f95fea27072d53295a71fbc1bde5be7eac2e9eb35c23
4
+ data.tar.gz: a944a07f298772b8cbe20526a8e32415601a29fba24d5f8943602cfbbbe68e6a
5
5
  SHA512:
6
- metadata.gz: 05ba4fbc4d3c3613b458b30a7370c832622ffc1ffee7cb4f2cefb408277a167cde5c5204a2fa53f2584b3a62c01abddce662a1ada86d22c30c97612fd53359ab
7
- data.tar.gz: dfbd672e42dcd6944cfd3a9f246a8fd4e813cf77eeedf2b3bba7c1d38e58919335833c5ca49b1c8a45a61cec14da580b2fcabc4d1f2eeaf587da42f0a60bb692
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)
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.1)
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.16.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 = File.join(current_repo_path, ".github/CODEOWNERS")
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
@@ -1,3 +1,3 @@
1
1
  module CodeOwners
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
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
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
- rubyforge_project:
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"