radicle: Add Version to User Agent
The main motivation behind this change is to get just a little telemetry information from nodes on the network, namely the version of Radicle they are running.
This is achieved by rewriting impl Default for UserAgent which now
uses the version information provided by the build script also used
in other crates.
Also, a new configuration option node.userAgent is added, which
allows users to override the user agent if they so please, or set
the value null, which will in turn send the user agent
/radicle/, which is not really helpful, and the default prior to
this commit.
Creations of UserAgent in the whole workspace is cleaned up. In
order to do that UserAgent::test is introduced.
15 files changed
+184
-43
48551cde
→
22b2871f
modified CHANGELOG.md
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/examples/rad-config.md
@@ -203,6 +203,17 @@ $ rad config schema
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -329,6 +340,17 @@ $ rad config schema
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/tests/util/environment.rs
@@ -6,7 +6,7 @@ use radicle::crypto::ssh::{Keystore, keystore::MemorySigner};
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -161,7 +161,7 @@ impl Environment {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/lib.rs
@@ -19,15 +19,11 @@ pub mod tests;
|
|
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -40,12 +36,6 @@ pub const VERSION: Version = Version {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
modified crates/radicle-node/src/runtime.rs
@@ -3,6 +3,7 @@ pub mod thread;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -197,7 +198,7 @@ impl Runtime {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/test/gossip.rs
@@ -1,5 +1,3 @@
| - | |
| - | |
|
|
|
|
|
@@ -34,7 +32,7 @@ pub fn messages(count: usize, now: LocalTime, delta: LocalDuration) -> Vec<Messa
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/test/peer.rs
@@ -320,7 +320,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/service/gossip.rs
@@ -1,21 +1,11 @@
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -24,7 +14,9 @@ pub fn node(config: &Config, timestamp: Timestamp) -> NodeAnnouncement {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/service/message.rs
@@ -1,3 +1,4 @@
| + | |
|
|
|
|
|
@@ -142,7 +143,9 @@ impl wire::Decode for NodeAnnouncement {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -683,7 +686,6 @@ impl qcheck::Arbitrary for ZeroBytes {
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -784,12 +786,12 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
added crates/radicle/build.rs
@@ -0,0 +1 @@
| + | |
|
modified crates/radicle/src/node.rs
@@ -220,18 +220,56 @@ impl PartialOrd for SyncStatus {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -247,7 +285,7 @@ impl FromStr for UserAgent {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1502,6 +1540,7 @@ mod test {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle/src/node/config.rs
@@ -8,8 +8,8 @@ use localtime::LocalDuration;
|
|
|
|
|
|
| - | |
|
|
| + | |
|
|
|
|
|
@@ -530,6 +530,12 @@ impl Fetch {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -603,6 +609,7 @@ impl Config {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -652,6 +659,15 @@ impl Config {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -781,7 +797,7 @@ wrapper!(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -974,4 +990,56 @@ mod test {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
modified crates/radicle/src/profile.rs
@@ -28,9 +28,7 @@ use crate::crypto::ssh::agent::Agent;
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -257,7 +255,8 @@ impl Profile {
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/serde_ext.rs
@@ -56,3 +56,15 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified crates/radicle/src/test/arbitrary.rs
@@ -276,7 +276,12 @@ impl Arbitrary for Timestamp {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|