Skip to content

cargo-edit 0.10.0 #105845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions Formula/cargo-edit.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CargoEdit < Formula
desc "Utility for managing cargo dependencies from the command-line"
homepage "https://killercup.github.io/cargo-edit/"
url "https://github.com/killercup/cargo-edit/archive/v0.9.1.tar.gz"
sha256 "bae2a59dcf6110fe0c8bf8562e58d550b2b3b3a02e89b233af5a3be12d41cdf0"
url "https://github.com/killercup/cargo-edit/archive/v0.10.0.tar.gz"
sha256 "fedc4200095d221935d4716fd8f4104e8607e5f4618c6c52580fef404e4d63b7"
license "MIT"

bottle do
Expand Down Expand Up @@ -30,20 +30,16 @@ def install
[package]
name = "demo-crate"
version = "0.1.0"
EOS

system bin/"cargo-add", "add", "clap@2", "serde"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo add was integrated into cargo 1.62.0: rust-lang/cargo#10472

system bin/"cargo-add", "add", "-D", "[email protected]"
manifest = (crate/"Cargo.toml").read

assert_match 'clap = "2"', manifest
assert_match(/serde = "\d+(?:\.\d+)+"/, manifest)
assert_match 'just = "0.8.3"', manifest
[dependencies]
clap = "2"
EOS

system bin/"cargo-rm", "rm", "serde"
manifest = (crate/"Cargo.toml").read
system bin/"cargo-set-version", "set-version", "0.2.0"
assert_match 'version = "0.2.0"', (crate/"Cargo.toml").read

refute_match(/serde/, manifest)
system bin/"cargo-rm", "rm", "clap"
refute_match(/clap/, (crate/"Cargo.toml").read)
end
end
end