Skip to content

Commit

Permalink
Update root crate name
Browse files Browse the repository at this point in the history
cratesfyi -> docs-rs

I did not change the name of the binary because of @jyn514's concerns
about having to change all the scripts in production to use the new
name.
  • Loading branch information
camelid authored and Joshua Nelson committed Sep 10, 2020
1 parent 50e3852 commit 52e1245
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 75 deletions.
122 changes: 61 additions & 61 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cratesfyi"
name = "docs-rs"
version = "0.6.0"
authors = ["Onur Aslan <[email protected]>", "The Rust Project Developers"]
readme = "README.md"
Expand Down
22 changes: 9 additions & 13 deletions src/bin/cratesfyi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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!(
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)?,
Expand Down Expand Up @@ -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()?;
}

Expand All @@ -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")?
}

Expand All @@ -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(())
Expand Down

0 comments on commit 52e1245

Please sign in to comment.