Skip to content

Commit

Permalink
style: format .toml files
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Sep 15, 2023
1 parent 8757fe2 commit 18f32d4
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 112 deletions.
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"rust-lang.rust-analyzer"
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@
"-W",
"clippy::pedantic",
],
"evenBetterToml.formatter.allowedBlankLines": 1,
"evenBetterToml.formatter.columnWidth": 130,
"evenBetterToml.formatter.trailingNewline": true,
"evenBetterToml.formatter.reorderKeys": true,
"evenBetterToml.formatter.reorderArrays": true,
}
78 changes: 31 additions & 47 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,89 +14,73 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true


[workspace.package]
authors = [
"Nautilus Cyberneering <[email protected]>, Mick van Dijke <[email protected]>",
]
authors = ["Nautilus Cyberneering <[email protected]>, Mick van Dijke <[email protected]>"]
categories = ["network-programming", "web-programming"]
description = "A feature rich BitTorrent tracker."
documentation = "https://docs.rs/crate/torrust-tracker/"
edition = "2021"
homepage = "https://torrust.com/"
keywords = ["bittorrent", "tracker", "file-sharing", "peer-to-peer", "torrent"]
keywords = ["bittorrent", "file-sharing", "peer-to-peer", "torrent", "tracker"]
license-file = "COPYRIGHT"
publish = true
repository = "https://github.com/torrust/torrust-tracker"
rust-version = "1.72"
version = "3.0.0-alpha.6"


[dependencies]
tokio = { version = "1.29", features = [
"rt-multi-thread",
"net",
"sync",
"macros",
"signal",
] }
serde = { version = "1.0", features = ["derive"] }
serde_bencode = "^0.2"
serde_json = "1.0"
serde_with = "3.2"
percent-encoding = "2.2"
aquatic_udp_protocol = "0.8"
async-trait = "0.1"
axum = "0.6"
axum-client-ip = "0.4"
axum-server = { version = "0.5", features = ["tls-rustls"] }
binascii = "0.1"
lazy_static = "1.4"
openssl = { version = "0.10", features = ["vendored"] }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
config = "0.13"
log = { version = "0.4", features = ["release_max_level_info"] }
derive_more = "0.99"
fern = "0.6"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
futures = "0.3"
hyper = "0.14"
lazy_static = "1.4"
log = { version = "0.4", features = ["release_max_level_info"] }
multimap = "0.9"
openssl = { version = "0.10", features = ["vendored"] }
percent-encoding = "2.2"
r2d2 = "0.8"
r2d2_mysql = "24.0"
r2d2_sqlite = { version = "0.22", features = ["bundled"] }
rand = "0.8"
derive_more = "0.99"
serde = { version = "1.0", features = ["derive"] }
serde_bencode = "^0.2"
serde_json = "1.0"
serde_with = "3.2"
thiserror = "1.0"
futures = "0.3"
async-trait = "0.1"
aquatic_udp_protocol = "0.8"
uuid = { version = "1", features = ["v4"] }
axum = "0.6"
axum-server = { version = "0.5", features = ["tls-rustls"] }
axum-client-ip = "0.4"
tower-http = { version = "0.4", features = ["compression-full"] }
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.6", path = "contrib/bencode" }
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "packages/primitives" }
tokio = { version = "1.29", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
torrust-tracker-configuration = { version = "3.0.0-alpha.6", path = "packages/configuration" }
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.6", path = "contrib/bencode" }
torrust-tracker-located-error = { version = "3.0.0-alpha.6", path = "packages/located-error" }
multimap = "0.9"
hyper = "0.14"
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "packages/primitives" }
tower-http = { version = "0.4", features = ["compression-full"] }
uuid = { version = "1", features = ["v4"] }

[dev-dependencies]
local-ip-address = "0.5"
mockall = "0.11"
reqwest = { version = "0.11.18", features = ["json"] }
serde_urlencoded = "0.7"
serde_repr = "0.1"
serde_bytes = "0.11"
local-ip-address = "0.5"
serde_repr = "0.1"
serde_urlencoded = "0.7"
torrust-tracker-test-helpers = { version = "3.0.0-alpha.6", path = "packages/test-helpers" }

[workspace]
members = [
"contrib/bencode",
"packages/configuration",
"packages/primitives",
"packages/test-helpers",
"packages/located-error",
]
members = ["contrib/bencode", "packages/configuration", "packages/located-error", "packages/primitives", "packages/test-helpers"]

[profile.dev]
debug = 1
opt-level = 1
lto = "thin"
opt-level = 1

[profile.release]
debug = 1
opt-level = 3
lto = "fat"
opt-level = 3
13 changes: 5 additions & 8 deletions contrib/bencode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
[package]
name = "torrust-tracker-contrib-bencode"
description = "(contrib) Efficient decoding and encoding for bencode."
keywords = ["library", "contrib", "bencode"]
keywords = ["bencode", "contrib", "library"]
name = "torrust-tracker-contrib-bencode"
readme = "README.md"

authors = [
"Nautilus Cyberneering <[email protected]>, Andrew <[email protected]>",
]
repository = "https://github.com/torrust/bittorrent-infrastructure-project"
authors = ["Nautilus Cyberneering <[email protected]>, Andrew <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/torrust/bittorrent-infrastructure-project"

documentation.workspace = true
edition.workspace = true
Expand All @@ -17,7 +15,6 @@ publish.workspace = true
rust-version.workspace = true
version.workspace = true


[dependencies]
error-chain = "0.12"

Expand All @@ -29,5 +26,5 @@ name = "test"
path = "test/mod.rs"

[[bench]]
name = "bencode_benchmark"
harness = false
name = "bencode_benchmark"
13 changes: 6 additions & 7 deletions packages/configuration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "torrust-tracker-configuration"
description = "A library to provide configuration to the Torrust Tracker."
keywords = ["library", "config", "settings"]
keywords = ["config", "library", "settings"]
name = "torrust-tracker-configuration"
readme = "README.md"

authors.workspace = true
Expand All @@ -14,16 +14,15 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true


[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_with = "3.2"
config = "0.13"
toml = "0.8"
log = { version = "0.4", features = ["release_max_level_info"] }
serde = { version = "1.0", features = ["derive"] }
serde_with = "3.2"
thiserror = "1.0"
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "../primitives" }
toml = "0.8"
torrust-tracker-located-error = { version = "3.0.0-alpha.6", path = "../located-error" }
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "../primitives" }

[dev-dependencies]
uuid = { version = "1", features = ["v4"] }
5 changes: 2 additions & 3 deletions packages/located-error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "torrust-tracker-located-error"
description = "A library to provide error decorator with the location and the source of the original error."
keywords = ["library", "helper", "errors"]
keywords = ["errors", "helper", "library"]
name = "torrust-tracker-located-error"
readme = "README.md"

authors.workspace = true
Expand All @@ -14,7 +14,6 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true


[dependencies]
log = { version = "0.4", features = ["release_max_level_info"] }

Expand Down
7 changes: 3 additions & 4 deletions packages/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "torrust-tracker-primitives"
description = "A library with the primitive types shared by the Torrust tracker packages."
keywords = ["library", "api", "primitives"]
keywords = ["api", "library", "primitives"]
name = "torrust-tracker-primitives"
readme = "README.md"

authors.workspace = true
Expand All @@ -14,7 +14,6 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true


[dependencies]
serde = { version = "1.0", features = ["derive"] }
derive_more = "0.99"
serde = { version = "1.0", features = ["derive"] }
4 changes: 2 additions & 2 deletions packages/test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "torrust-tracker-test-helpers"
description = "A library providing helpers for testing the Torrust tracker."
keywords = ["library", "helper", "testing"]
keywords = ["helper", "library", "testing"]
name = "torrust-tracker-test-helpers"
readme = "README.md"

authors.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
max_width = 130
imports_granularity = "Module"
group_imports = "StdExternalCrate"
imports_granularity = "Module"
max_width = 130
25 changes: 12 additions & 13 deletions share/default/config/tracker.container.mysql.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
log_level = "info"
mode = "public"
announce_interval = 120
db_driver = "MySQL"
db_path = "mysql://db_user:db_user_secret_password@mysql:3306/torrust_tracker"
announce_interval = 120
external_ip = "0.0.0.0"
inactive_peer_cleanup_interval = 600
log_level = "info"
max_peer_timeout = 900
min_announce_interval = 120
mode = "public"
on_reverse_proxy = false
external_ip = "0.0.0.0"
tracker_usage_statistics = true
persistent_torrent_completed_stat = false
max_peer_timeout = 900
inactive_peer_cleanup_interval = 600
remove_peerless_torrents = true
tracker_usage_statistics = true

[[udp_trackers]]
enabled = false
bind_address = "0.0.0.0:6969"
enabled = false

[[http_trackers]]
enabled = false
bind_address = "0.0.0.0:7070"
ssl_enabled = false
enabled = false
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

[http_api]
enabled = true
bind_address = "0.0.0.0:1212"
ssl_enabled = false
enabled = true
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"


# Please override the admin token setting the
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
# environmental variable!
Expand Down
25 changes: 12 additions & 13 deletions share/default/config/tracker.container.sqlite3.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
log_level = "info"
mode = "public"
announce_interval = 120
db_driver = "Sqlite3"
db_path = "/var/lib/torrust/tracker/database/sqlite3.db"
announce_interval = 120
external_ip = "0.0.0.0"
inactive_peer_cleanup_interval = 600
log_level = "info"
max_peer_timeout = 900
min_announce_interval = 120
mode = "public"
on_reverse_proxy = false
external_ip = "0.0.0.0"
tracker_usage_statistics = true
persistent_torrent_completed_stat = false
max_peer_timeout = 900
inactive_peer_cleanup_interval = 600
remove_peerless_torrents = true
tracker_usage_statistics = true

[[udp_trackers]]
enabled = false
bind_address = "0.0.0.0:6969"
enabled = false

[[http_trackers]]
enabled = false
bind_address = "0.0.0.0:7070"
ssl_enabled = false
enabled = false
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

[http_api]
enabled = true
bind_address = "0.0.0.0:1212"
ssl_enabled = false
enabled = true
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"


# Please override the admin token setting the
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
# environmental variable!
Expand Down
Loading

0 comments on commit 18f32d4

Please sign in to comment.