code_owners 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bddfbbd4ec9f5016192c995b8660325dae24b9aa
4
- data.tar.gz: f04bbd2618f16253fba02cd8a40c8ba1483d7a66
2
+ SHA256:
3
+ metadata.gz: f5e06c6fbdfd8cead1030d3d76b302885321095972e7fcab54d1ba887f1fceb0
4
+ data.tar.gz: 54438d6312527c987d98f181f6242777badf72dad7b7561c39d3bc491dae5f2b
5
5
  SHA512:
6
- metadata.gz: df7b7005d293e25b5ae35d32d450c69a2c2cafd51294dc7292eb0814a67f5126673b7511860d824d9db724145f33e6c15172cc052068d7fd79f76515df666e23
7
- data.tar.gz: b51c33cb99006e79035e30dec7cfd5546bbd8188e48fd9dea8d47dc97b8cb58724348ce444d6bdffc1723be4d9d352ddbbce70c95e4d1c8f425d0e623617fc91
6
+ metadata.gz: 05ba4fbc4d3c3613b458b30a7370c832622ffc1ffee7cb4f2cefb408277a167cde5c5204a2fa53f2584b3a62c01abddce662a1ada86d22c30c97612fd53359ab
7
+ data.tar.gz: dfbd672e42dcd6944cfd3a9f246a8fd4e813cf77eeedf2b3bba7c1d38e58919335833c5ca49b1c8a45a61cec14da580b2fcabc4d1f2eeaf587da42f0a60bb692
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code_owners (1.0.3)
4
+ code_owners (1.0.4)
5
5
  rake
6
6
 
7
7
  GEM
@@ -27,7 +27,6 @@ module CodeOwners
27
27
 
28
28
  # read the github file and spit out a slightly formatted list of patterns and their owners
29
29
  def pattern_owners
30
- current_repo_path = `git rev-parse --show-toplevel`.strip
31
30
  codeowner_path = File.join(current_repo_path, ".github/CODEOWNERS")
32
31
  File.read(codeowner_path).split("\n").map do |line|
33
32
  line.gsub(/#.*/, '').gsub(/^$/, " @").split(/\s+@/, 2)
@@ -47,7 +46,7 @@ module CodeOwners
47
46
  Tempfile.open('codeowner_patterns') do |file|
48
47
  file.write(patterns.join("\n"))
49
48
  file.rewind
50
- `git ls-files | xargs -- git -c \"core.excludesfile=#{file.path}\" check-ignore --no-index -v -n`
49
+ `cd #{current_repo_path} && git ls-files | xargs -- git -c \"core.excludesfile=#{file.path}\" check-ignore --no-index -v -n`
51
50
  end
52
51
  end
53
52
 
@@ -60,5 +59,9 @@ module CodeOwners
60
59
  input.encode!(Encoding::UTF_8, Encoding::UTF_16)
61
60
  input
62
61
  end
62
+
63
+ def current_repo_path
64
+ `git rev-parse --show-toplevel`.strip
65
+ end
63
66
  end
64
67
  end
@@ -1,3 +1,3 @@
1
1
  module CodeOwners
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Cheatham
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.5.1
80
+ rubygems_version: 2.7.3
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: ".github/CODEOWNERS introspection utility gem"