fast_code_owners 0.0.4 → 0.0.7
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/README.md +0 -4
- data/exe/codeowners +79 -0
- data/ext/fast_code_owners/extconf.rb +4 -1
- data/ext/fast_code_owners/src/lib.rs +1 -0
- data/lib/fast_code_owners/version.rb +1 -1
- data/lib/fast_code_owners.rb +7 -1
- metadata +4 -3
- data/ext/fast_code_owners/build.rs +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4896928de769bef10c58c40770144175fb9d9ee2d76d37089d25ba7b79fc2f4d
|
4
|
+
data.tar.gz: 19e13052de5c3836a70dabdaa8b8e9694b51087250bb40c24e84d5a33f5c7b21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a555cf67ffe26833ef80e6867d2fb99a386ea02d73889218760be72ac3d8e82a4c94e0a04a2227fc8e66fd8debbe4e7601fb98dea78e6c5ef41479b1c0f00f87
|
7
|
+
data.tar.gz: c7f5c05f1780da223458f25efd3c2b293d7ddd76751c59a9e719ff4d774148c6dcca0aa66ade25ec1df05abf22c78a0c75e2136c19845b14c779b18b937b914a
|
data/README.md
CHANGED
@@ -8,10 +8,6 @@ The [codeowners-rs](https://github.com/rubyatscale/codeowners-rs) CLI is a fast
|
|
8
8
|
|
9
9
|
**fast_code_owners** provides Ruby APIs that delegate to codeowners-rs. Much of this code was lifted from [code_ownership](https://github.com/rubyatscale/code_ownership).
|
10
10
|
|
11
|
-
## Dependencies
|
12
|
-
|
13
|
-
- [Rust](https://www.rust-lang.org/tools/install) must be installed and in the PATH
|
14
|
-
|
15
11
|
## Installation
|
16
12
|
|
17
13
|
```bash
|
data/exe/codeowners
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
#!/usr/bin/env dotslash
|
2
|
+
|
3
|
+
{
|
4
|
+
"name": "codeowners",
|
5
|
+
"platforms": {
|
6
|
+
"macos-x86_64": {
|
7
|
+
"size": 4331528,
|
8
|
+
"hash": "blake3",
|
9
|
+
"digest": "32bfc7664302bbb52a3130e1207e1b50aa717ebcd03baf3bf166415c98100dde",
|
10
|
+
"format": "tar.gz",
|
11
|
+
"path": "codeowners",
|
12
|
+
"providers": [
|
13
|
+
{
|
14
|
+
"url": "https://github.com/rubyatscale/codeowners-rs/releases/download/v0.2.4/codeowners-mac.tar.gz"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"type": "github-release",
|
18
|
+
"repo": "https://github.com/rubyatscale/codeowners-rs",
|
19
|
+
"tag": "v0.2.4",
|
20
|
+
"name": "codeowners-mac.tar.gz"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
},
|
24
|
+
"macos-aarch64": {
|
25
|
+
"size": 4331528,
|
26
|
+
"hash": "blake3",
|
27
|
+
"digest": "32bfc7664302bbb52a3130e1207e1b50aa717ebcd03baf3bf166415c98100dde",
|
28
|
+
"format": "tar.gz",
|
29
|
+
"path": "codeowners",
|
30
|
+
"providers": [
|
31
|
+
{
|
32
|
+
"url": "https://github.com/rubyatscale/codeowners-rs/releases/download/v0.2.4/codeowners-mac.tar.gz"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"type": "github-release",
|
36
|
+
"repo": "https://github.com/rubyatscale/codeowners-rs",
|
37
|
+
"tag": "v0.2.4",
|
38
|
+
"name": "codeowners-mac.tar.gz"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
42
|
+
"linux-x86_64": {
|
43
|
+
"size": 18038611,
|
44
|
+
"hash": "blake3",
|
45
|
+
"digest": "e04e66621efc4c2755b4ef912f5154e9dddafc4a1651bb565fc01465f059d9be",
|
46
|
+
"format": "tar.gz",
|
47
|
+
"path": "codeowners",
|
48
|
+
"providers": [
|
49
|
+
{
|
50
|
+
"url": "https://github.com/rubyatscale/codeowners-rs/releases/download/v0.2.4/x86_64-unknown-linux-gnu.tar.gz"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"type": "github-release",
|
54
|
+
"repo": "https://github.com/rubyatscale/codeowners-rs",
|
55
|
+
"tag": "v0.2.4",
|
56
|
+
"name": "x86_64-unknown-linux-gnu.tar.gz"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
},
|
60
|
+
"linux-aarch64": {
|
61
|
+
"size": 17411182,
|
62
|
+
"hash": "blake3",
|
63
|
+
"digest": "f812a66e884e91a5b708b0c0e03149079ef07e2803f0b207a9ca6fad6fe06207",
|
64
|
+
"format": "tar.gz",
|
65
|
+
"path": "codeowners",
|
66
|
+
"providers": [
|
67
|
+
{
|
68
|
+
"url": "https://github.com/rubyatscale/codeowners-rs/releases/download/v0.2.4/aarch64-unknown-linux-gnu.tar.gz"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"type": "github-release",
|
72
|
+
"repo": "https://github.com/rubyatscale/codeowners-rs",
|
73
|
+
"tag": "v0.2.4",
|
74
|
+
"name": "aarch64-unknown-linux-gnu.tar.gz"
|
75
|
+
}
|
76
|
+
]
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
@@ -3,4 +3,7 @@
|
|
3
3
|
require "mkmf"
|
4
4
|
require "rb_sys/mkmf"
|
5
5
|
|
6
|
-
create_rust_makefile("fast_code_owners/fast_code_owners")
|
6
|
+
create_rust_makefile("fast_code_owners/fast_code_owners") do |ext|
|
7
|
+
ext.extra_cargo_args += ["--crate-type", "cdylib"]
|
8
|
+
ext.extra_cargo_args += ["--package", "fast_code_owners"]
|
9
|
+
end
|
@@ -31,6 +31,7 @@ fn for_file(file_path: String) -> Result<Option<Value>, Error> {
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
34
|
+
// Needed for tests
|
34
35
|
fn generate_and_validate() -> Result<Value, Error> {
|
35
36
|
let run_config = build_run_config();
|
36
37
|
let run_result = runner::generate_and_validate(&run_config, vec![]);
|
data/lib/fast_code_owners.rb
CHANGED
@@ -8,9 +8,15 @@ require 'sorbet-runtime'
|
|
8
8
|
require_relative 'fast_code_owners/file_path_team_cache'
|
9
9
|
require_relative 'fast_code_owners/team_finder'
|
10
10
|
require_relative 'fast_code_owners/version'
|
11
|
-
require_relative 'fast_code_owners/fast_code_owners'
|
12
11
|
require_relative 'fast_code_owners/file_path_finder'
|
13
12
|
|
13
|
+
begin
|
14
|
+
RUBY_VERSION =~ /(\d+\.\d+)/
|
15
|
+
require "fast_code_owners/#{Regexp.last_match(1)}/fast_code_owners"
|
16
|
+
rescue LoadError
|
17
|
+
require 'fast_code_owners/fast_code_owners'
|
18
|
+
end
|
19
|
+
|
14
20
|
module FastCodeOwners
|
15
21
|
module_function
|
16
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_code_owners
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perry Hertler
|
@@ -137,7 +137,8 @@ dependencies:
|
|
137
137
|
description: A ruby interface that determines file ownership for git repositories
|
138
138
|
email:
|
139
139
|
- perry.hertler@gusto.com
|
140
|
-
executables:
|
140
|
+
executables:
|
141
|
+
- codeowners
|
141
142
|
extensions:
|
142
143
|
- ext/fast_code_owners/Cargo.toml
|
143
144
|
extra_rdoc_files: []
|
@@ -8281,8 +8282,8 @@ files:
|
|
8281
8282
|
- Cargo.lock
|
8282
8283
|
- Cargo.toml
|
8283
8284
|
- README.md
|
8285
|
+
- exe/codeowners
|
8284
8286
|
- ext/fast_code_owners/Cargo.toml
|
8285
|
-
- ext/fast_code_owners/build.rs
|
8286
8287
|
- ext/fast_code_owners/extconf.rb
|
8287
8288
|
- ext/fast_code_owners/src/lib.rs
|
8288
8289
|
- ext/fast_code_owners/tests/fixtures/valid_project/config/code_ownership.yml
|
@@ -1,12 +0,0 @@
|
|
1
|
-
use std::error::Error;
|
2
|
-
|
3
|
-
fn main() -> Result<(), Box<dyn Error>> {
|
4
|
-
// Sets the correct linker flags for the Ruby C API, which makes it possible
|
5
|
-
// to run Cargo commands without requiring `rb_sys/mkmf`.
|
6
|
-
//
|
7
|
-
// This is not a requirement, but it is a convenient if you want to use
|
8
|
-
// `cargo test`, etc.
|
9
|
-
rb_sys_env::activate()?;
|
10
|
-
|
11
|
-
Ok(())
|
12
|
-
}
|