Skip to content
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

chore: v0.7.1 #424

Merged
merged 11 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
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 Cargo.lock

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

8 changes: 4 additions & 4 deletions cargo-shuttle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-shuttle"
version = "0.7.0"
version = "0.7.1"
edition = "2021"
license = "Apache-2.0"
description = "A cargo command for the shuttle platform (https://www.shuttle.rs/)"
Expand Down Expand Up @@ -43,15 +43,15 @@ uuid = { version = "1.1.2", features = ["v4"] }
webbrowser = "0.7.1"

[dependencies.shuttle-common]
version = "0.7.0"
version = "0.7.1"
path = "../common"

[dependencies.shuttle-secrets]
version = "0.7.0"
version = "0.7.1"
path = "../resources/secrets"

[dependencies.shuttle-service]
version = "0.7.0"
version = "0.7.1"
path = "../service"
features = ["loader"]

Expand Down
2 changes: 1 addition & 1 deletion cargo-shuttle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $ cargo shuttle init --rocket my-rocket-app

This should generate the following dependency in `Cargo.toml`:
```toml
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
```

The following boilerplate code should be generated into `src/lib.rs`:
Expand Down
2 changes: 1 addition & 1 deletion cargo-shuttle/tests/integration/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async fn warp_hello_world() {
.await
.unwrap();

assert_eq!(request_text, "Hello, World");
assert_eq!(request_text, "Hello, World!");
}

#[tokio::test(flavor = "multi_thread")]
Expand Down
2 changes: 1 addition & 1 deletion codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-codegen"
version = "0.7.0"
version = "0.7.1"
edition = "2021"
license = "Apache-2.0"
description = "Proc-macro code generator for the shuttle.rs service"
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-common"
version = "0.7.0"
version = "0.7.1"
edition = "2021"
license = "Apache-2.0"
description = "Common library for the shuttle platform (https://www.shuttle.rs/)"
Expand Down
8 changes: 4 additions & 4 deletions deployer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-deployer"
version = "0.7.0"
version = "0.7.1"
edition = "2021"
description = "Service with instances created per project for handling the compilation, loading, and execution of Shuttle services"

Expand Down Expand Up @@ -42,15 +42,15 @@ tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
uuid = { version = "1.1.2", features = ["v4"] }

[dependencies.shuttle-common]
version = "0.7.0"
version = "0.7.1"
path = "../common"

[dependencies.shuttle-proto]
version = "0.7.0"
version = "0.7.1"
path = "../proto"

[dependencies.shuttle-service]
version = "0.7.0"
version = "0.7.1"
path = "../service"
features = ["loader"]

Expand Down
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/bind-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.0"
shuttle-service = "0.7.1"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/main-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.0"
shuttle-service = "0.7.1"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/self-stop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.0"
shuttle-service = "0.7.1"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/sleep-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ crate-type = ["cdylib"]

[dependencies]
tokio = { version = "1.0", features = ["time"]}
shuttle-service = "0.7.0"
shuttle-service = "0.7.1"
30 changes: 14 additions & 16 deletions e2e/tests/integration/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl Services {

run.env("CARGO_HOME", CARGO_HOME.path());
run.args(["project", "status"])
.current_dir(WORKSPACE_ROOT.join("examples").join(project_path));
.current_dir(Self::get_project_path(project_path));
let stdout = run.output().unwrap().stdout;
let stdout = String::from_utf8(stdout).unwrap();

Expand All @@ -358,9 +358,8 @@ impl Services {
panic!("timed out while waiting for deployer to be ready");
}

pub fn run_client<'s, I, P>(&self, args: I, path: P) -> Child
pub fn run_client<'s, I>(&self, args: I, project_path: &str) -> Child
where
P: AsRef<Path>,
I: IntoIterator<Item = &'s str>,
{
let mut run = Command::new(WORKSPACE_ROOT.join("target/debug/cargo-shuttle"));
Expand All @@ -371,26 +370,21 @@ impl Services {

run.env("CARGO_HOME", CARGO_HOME.path());

run.args(args).current_dir(path);
run.args(args)
.current_dir(Self::get_project_path(project_path));
spawn_and_log(&mut run, &self.target, self.color)
}

pub fn deploy(&self, project_path: &str) {
self.run_client(
["project", "new"],
WORKSPACE_ROOT.join("examples").join(project_path),
)
.wait()
.ensure_success("failed to run deploy");
self.run_client(["project", "new"], project_path)
.wait()
.ensure_success("failed to run deploy");

self.wait_deployer_ready(project_path, Duration::from_secs(120));

self.run_client(
["deploy", "--allow-dirty"],
WORKSPACE_ROOT.join("examples").join(project_path),
)
.wait()
.ensure_success("failed to run deploy");
self.run_client(["deploy", "--allow-dirty"], project_path)
.wait()
.ensure_success("failed to run deploy");
}

pub fn get(&self, sub_path: &str) -> RequestBuilder {
Expand All @@ -401,4 +395,8 @@ impl Services {
pub fn post(&self, sub_path: &str) -> RequestBuilder {
reqwest::blocking::Client::new().post(format!("http://{}/{}", self.proxy_addr, sub_path))
}

pub fn get_project_path(project_path: &str) -> PathBuf {
WORKSPACE_ROOT.join("examples").join(project_path)
}
}
7 changes: 7 additions & 0 deletions e2e/tests/integration/rocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ fn postgres_rocket() {
#[test]
fn secrets_rocket() {
let client = helpers::Services::new_docker("secrets (rocket)", Color::Red);
let project_path = helpers::Services::get_project_path("rocket/secrets");
std::fs::copy(
project_path.join("Secrets.toml.example"),
project_path.join("Secrets.toml"),
)
.unwrap();

client.deploy("rocket/secrets");
let secret_response: String = client
.get("secret")
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/integration/warp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use colored::Color;
use crossterm::style::Color;

use crate::helpers::{self, APPS_FQDN};

Expand All @@ -15,5 +15,5 @@ fn hello_world_warp() {
.text()
.unwrap();

assert_eq!(request_text, "Hello, world!");
assert_eq!(request_text, "Hello, World!");
}
2 changes: 1 addition & 1 deletion examples/axum/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"

[dependencies]
axum = "0.5"
shuttle-service = { version = "0.7.0", features = ["web-axum"] }
shuttle-service = { version = "0.7.1", features = ["web-axum"] }
sync_wrapper = "0.1"
2 changes: 1 addition & 1 deletion examples/axum/websocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ hyper = { version = "0.14", features = ["client", "http2"] }
hyper-tls = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shuttle-service = { version = "0.7.0", features = ["web-axum"] }
shuttle-service = { version = "0.7.1", features = ["web-axum"] }
sync_wrapper = "0.1"
tokio = { version = "1", features = ["full"] }
2 changes: 1 addition & 1 deletion examples/poem/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"

[dependencies]
poem = "1.3.35"
shuttle-service = { version = "0.7.0", features = ["web-poem"] }
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
4 changes: 2 additions & 2 deletions examples/poem/mongodb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ mongodb = "2.3.0"
poem = "1.3.35"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
shuttle-service = { version = "0.7.0", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.0", features = ["mongodb"] }
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.1", features = ["mongodb"] }
4 changes: 2 additions & 2 deletions examples/poem/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition = "2021"
[dependencies]
poem = "1.3.35"
serde = "1.0"
shuttle-service = { version = "0.7.0", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.0", features = ["postgres"] }
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.1", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
2 changes: 1 addition & 1 deletion examples/rocket/authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jsonwebtoken = { version = "8", default-features = false }
lazy_static = "1.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
2 changes: 1 addition & 1 deletion examples/rocket/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"

[dependencies]
rocket = "0.5.0-rc.2"
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
4 changes: 2 additions & 2 deletions examples/rocket/persist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
rocket = { version = "0.5.0-rc.1", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
shuttle-persist = "0.7.0"
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-persist = "0.7.1"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
4 changes: 2 additions & 2 deletions examples/rocket/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition = "2021"
[dependencies]
rocket = { version = "0.5.0-rc.1", features = ["json"] }
serde = "1.0"
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.0", features = ["postgres"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.1", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
4 changes: 2 additions & 2 deletions examples/rocket/secrets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
anyhow = "1.0.62"
rocket = { version = "0.5.0-rc.1", features = ["json"] }
shuttle-secrets = "0.7.0"
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-secrets = "0.7.1"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
4 changes: 2 additions & 2 deletions examples/rocket/url-shortener/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
nanoid = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
serde = "1.0"
shuttle-service = { version = "0.7.0", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.0", features = ["postgres"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.1", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
url = "2.2"
2 changes: 1 addition & 1 deletion examples/salvo/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"

[dependencies]
salvo = "0.34.3"
shuttle-service = { version = "0.7.0", features = ["web-salvo"] }
shuttle-service = { version = "0.7.1", features = ["web-salvo"] }
4 changes: 2 additions & 2 deletions examples/serenity/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition = "2021"
[dependencies]
anyhow = "1.0.62"
serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] }
shuttle-secrets = "0.7.0"
shuttle-service = { version = "0.7.0", features = ["bot-serenity"] }
shuttle-secrets = "0.7.1"
shuttle-service = { version = "0.7.1", features = ["bot-serenity"] }
tracing = "0.1.35"
Loading