diff --git a/Cargo.lock b/Cargo.lock index 4c8a9c27f..4db5f5d31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,67 +390,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "cratesfyi" -version = "0.6.0" -dependencies = [ - "arc-swap", - "backtrace", - "badge", - "base64 0.12.1", - "chrono", - "comrak", - "crates-index", - "crates-index-diff", - "criterion", - "docsrs-metadata", - "dotenv", - "env_logger", - "failure", - "futures-util", - "git2", - "iron", - "kuchiki", - "log 0.4.8", - "lol_html", - "mime_guess", - "notify", - "once_cell", - "path-slash", - "postgres", - "procfs", - "prometheus", - "r2d2", - "r2d2_postgres", - "rand 0.7.3", - "regex", - "reqwest", - "router", - "rusoto_core", - "rusoto_credential", - "rusoto_s3", - "rustwide", - "sass-rs", - "schemamama", - "schemamama_postgres", - "semver", - "serde", - "serde_json", - "slug", - "staticfile", - "structopt", - "strum", - "systemstat", - "tempfile", - "tera", - "time 0.1.43", - "tokio", - "toml", - "url 2.1.1", - "walkdir", - "zstd", -] - [[package]] name = "crc32fast" version = "1.2.0" @@ -690,6 +629,67 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" +[[package]] +name = "docs-rs" +version = "0.6.0" +dependencies = [ + "arc-swap", + "backtrace", + "badge", + "base64 0.12.1", + "chrono", + "comrak", + "crates-index", + "crates-index-diff", + "criterion", + "docsrs-metadata", + "dotenv", + "env_logger", + "failure", + "futures-util", + "git2", + "iron", + "kuchiki", + "log 0.4.8", + "lol_html", + "mime_guess", + "notify", + "once_cell", + "path-slash", + "postgres", + "procfs", + "prometheus", + "r2d2", + "r2d2_postgres", + "rand 0.7.3", + "regex", + "reqwest", + "router", + "rusoto_core", + "rusoto_credential", + "rusoto_s3", + "rustwide", + "sass-rs", + "schemamama", + "schemamama_postgres", + "semver", + "serde", + "serde_json", + "slug", + "staticfile", + "structopt", + "strum", + "systemstat", + "tempfile", + "tera", + "time 0.1.43", + "tokio", + "toml", + "url 2.1.1", + "walkdir", + "zstd", +] + [[package]] name = "docsrs-metadata" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 9ad230197..b276c812f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cratesfyi" +name = "docs-rs" version = "0.6.0" authors = ["Onur Aslan ", "The Rust Project Developers"] readme = "README.md" diff --git a/src/bin/cratesfyi.rs b/src/bin/cratesfyi.rs index 7794dcf4e..542d5692b 100644 --- a/src/bin/cratesfyi.rs +++ b/src/bin/cratesfyi.rs @@ -3,9 +3,9 @@ use std::fmt::Write; use std::path::PathBuf; use std::sync::Arc; -use cratesfyi::db::{self, add_path_into_database, Pool, PoolClient}; -use cratesfyi::utils::{remove_crate_priority, set_crate_priority}; -use cratesfyi::{ +use docs_rs::db::{self, add_path_into_database, Pool, PoolClient}; +use docs_rs::utils::{remove_crate_priority, set_crate_priority}; +use docs_rs::{ BuildQueue, Config, Context, DocBuilder, Index, Metrics, RustwideBuilder, Server, Storage, }; use failure::{err_msg, Error, ResultExt}; @@ -33,7 +33,7 @@ pub fn main() { fn logger_init() { use std::io::Write; - let env = env_logger::Env::default().filter_or("DOCSRS_LOG", "cratesfyi=info"); + let env = env_logger::Env::default().filter_or("DOCSRS_LOG", "docs_rs=info"); let logger = env_logger::from_env(env) .format(|buf, record| { writeln!( @@ -61,7 +61,7 @@ enum Toggle { #[structopt( name = "cratesfyi", about = env!("CARGO_PKG_DESCRIPTION"), - version = cratesfyi::BUILD_VERSION, + version = docs_rs::BUILD_VERSION, rename_all = "kebab-case", )] enum CommandLine { @@ -125,7 +125,7 @@ impl CommandLine { log::warn!("--foreground was passed, but there is no need for it anymore"); } - cratesfyi::utils::start_daemon(&ctx, registry_watcher == Toggle::Enabled)?; + docs_rs::utils::start_daemon(&ctx, registry_watcher == Toggle::Enabled)?; } Self::Database { subcommand } => subcommand.handle_args(ctx)?, Self::Queue { subcommand } => subcommand.handle_args(ctx)?, @@ -412,7 +412,7 @@ impl DatabaseSubcommand { } Self::UpdateGithubFields => { - cratesfyi::utils::GithubUpdater::new(&*ctx.config()?, ctx.pool()?)? + docs_rs::utils::GithubUpdater::new(&*ctx.config()?, ctx.pool()?)? .update_all_crates()?; } @@ -433,7 +433,7 @@ impl DatabaseSubcommand { // FIXME: This is actually util command not database Self::UpdateReleaseActivity => { - cratesfyi::utils::update_release_activity(&mut *ctx.conn()?) + docs_rs::utils::update_release_activity(&mut *ctx.conn()?) .context("Failed to update release activity")? } @@ -448,11 +448,7 @@ impl DatabaseSubcommand { Self::Blacklist { command } => command.handle_args(ctx)?, Self::Synchronize { dry_run } => { - cratesfyi::utils::consistency::run_check( - &mut *ctx.conn()?, - &*ctx.index()?, - dry_run, - )?; + docs_rs::utils::consistency::run_check(&mut *ctx.conn()?, &*ctx.index()?, dry_run)?; } } Ok(())