Avoid hard-coding "radicle.xyz" in Rust code
This patch does three things:
- Justifies the changes in
CONTRIBUTING.md - Removes a few occurrences of the domain name, and makes the more complex case of fixtures easier in the future.
- Allows defining the default URL for Radicle Explorer at compile-time.
- Adds a Git hook that will fail if people commit to files which contain “radicle.xyz” or “radicle.zulipchat.com”. Note that it does not make that impossible, it just adds another step to make people stop and think.
8 files changed
+114
-69
2127782b
→
9b7529ba
modified CONTRIBUTING.md
@@ -180,6 +180,25 @@ for the reader:
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/terminal/patch.rs
@@ -489,7 +489,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/explorer.rs
@@ -80,7 +80,7 @@ impl std::fmt::Display for ExplorerUrl {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -89,7 +89,8 @@ pub struct Explorer(String);
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/profile.rs
@@ -784,7 +784,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -800,8 +800,8 @@ mod test {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/storage/git.rs
@@ -1093,7 +1093,8 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/test/arbitrary.rs
@@ -298,7 +298,7 @@ impl Arbitrary for Address {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/test/fixtures.rs
@@ -15,6 +15,12 @@ use crate::storage::refs::SignedRefs;
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -94,15 +100,14 @@ pub fn repository<P: AsRef<Path>>(path: P) -> (git2::Repository, git2::Oid) {
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -130,12 +135,8 @@ pub fn repository<P: AsRef<Path>>(path: P) -> (git2::Repository, git2::Oid) {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -153,12 +154,8 @@ pub fn tag(name: &str, message: &str, commit: git2::Oid, repo: &git2::Repository
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified flake.nix
@@ -168,54 +168,81 @@
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|