Module publish

Source
Expand description

Helpers for testing cargo package / cargo publish

ยงExample

validate_upload(
    r#"
    {
      "authors": [],
      "badges": {},
      "categories": [],
      "deps": [],
      "description": "foo",
      "documentation": null,
      "features": {},
      "homepage": null,
      "keywords": [],
      "license": "MIT",
      "license_file": null,
      "links": null,
      "name": "foo",
      "readme": null,
      "readme_file": null,
      "repository": null,
      "rust_version": null,
      "vers": "0.0.1"
      }
    "#,
    "foo-0.0.1.crate",
    &["Cargo.lock", "Cargo.toml", "Cargo.toml.orig", "src/main.rs"],
);

Functionsยง

_validate_upload ๐Ÿ”’
create_index_line ๐Ÿ”’
read_le_u32 ๐Ÿ”’
read_new_post ๐Ÿ”’
split_index_features ๐Ÿ”’
validate_alt_upload
Check the cargo publish API call to the alternative test registry
validate_crate_contents
Checks the contents of a .crate file.
validate_crate_contents_ ๐Ÿ”’
validate_upload
Check the cargo publish API call
validate_upload_with_contents
Check the cargo publish API call, with file contents
write_to_index ๐Ÿ”’