Skip to content

Commit

Permalink
chore: Update pact-plugin-driver to 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed May 30, 2024
1 parent e44458a commit 028cbc7
Show file tree
Hide file tree
Showing 12 changed files with 372 additions and 33 deletions.
371 changes: 354 additions & 17 deletions rust/Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ resolver = "2"

[patch.crates-io]
onig = { git = "https://github.com/rust-onig/rust-onig", default-features = false }
pact-plugin-driver = { path = "/home/ronald/Development/Projects/Pact/pact-plugins/drivers/rust/driver" }
pact_mock_server = { path = "/home/ronald/Development/Projects/Pact/pact-core-mock-server/pact_mock_server" }
8 changes: 4 additions & 4 deletions rust/pact_consumer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pact_consumer"
version = "1.2.2"
version = "1.3.0"
authors = ["Ronald Holshausen <[email protected]>", "Eric Kidd <[email protected]>"]
edition = "2021"
description = "Pact-Rust module that provides support for writing consumer pact tests"
Expand Down Expand Up @@ -29,10 +29,10 @@ futures = "0.3.30"
itertools = "0.12.1"
lazy_static = "1.4.0"
maplit = "1.0.2"
pact_matching = { version = "~1.2.2", path = "../pact_matching", default-features = false }
pact_mock_server = { version = "~1.2.6", default-features = false }
pact_matching = { version = "~1.2.3", path = "../pact_matching", default-features = false }
pact_mock_server = { version = "~1.2.8", default-features = false }
pact_models = { version = "~1.2.0", default-features = false }
pact-plugin-driver = { version = "~0.6.1", optional = true, default-features = false }
pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false }
regex = "1.10.4"
serde_json = "1.0.115"
tokio = { version = "1.37.0", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/message_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl MessageInteractionBuilder {
self.setup_core_matcher(&ct, &contents_hashmap, Some(content_matcher));
} else {
debug!("Plugin matcher, will get the plugin to provide the interaction contents");
match content_matcher.configure_interation(&ct, contents_hashmap).await {
match content_matcher.configure_interaction(&ct, contents_hashmap).await {
Ok((contents, plugin_config)) => {
if let Some(contents) = contents.first() {
self.message_contents = InteractionContents::from(contents);
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/pact_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl PactBuilder {

let mut pact = self.pact.boxed();
match result {
Ok(plugin) => pact.add_plugin(plugin.manifest.name.as_str(), plugin.manifest.version.as_str(), None)
Ok(plugin) => pact.add_plugin(plugin.manifest().name.as_str(), plugin.manifest().version.as_str(), None)
.expect("Could not add plugin to pact"),
Err(err) => panic!("Could not load plugin - {}", err)
}
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/pact_builder_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl PactBuilderAsync {
dependency_type: Default::default()
}).await;
match result {
Ok(plugin) => self.pact.add_plugin(plugin.manifest.name.as_str(), plugin.manifest.version.as_str(), None)
Ok(plugin) => self.pact.add_plugin(plugin.manifest().name.as_str(), plugin.manifest().version.as_str(), None)
.expect("Could not add plugin to pact"),
Err(err) => panic!("Could not load plugin - {}", err)
}
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/request_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl RequestBuilder {
match definition {
Value::Object(attributes) => {
let map = attributes.iter().map(|(k, v)| (k.clone(), v.clone())).collect();
match matcher.configure_interation(&content_type, map).await {
match matcher.configure_interaction(&content_type, map).await {
Ok((contents, plugin_config)) => {
debug!("Interaction contents = {:?}", contents);
debug!("Interaction plugin_config = {:?}", plugin_config);
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/response_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl ResponseBuilder {
match definition {
Value::Object(attributes) => {
let map = attributes.iter().map(|(k, v)| (k.clone(), v.clone())).collect();
match matcher.configure_interation(&content_type, map).await {
match matcher.configure_interaction(&content_type, map).await {
Ok((contents, plugin_config)) => {
debug!("Interaction contents = {:?}", contents);
debug!("Interaction plugin_config = {:?}", plugin_config);
Expand Down
2 changes: 1 addition & 1 deletion rust/pact_consumer/src/builders/sync_message_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl SyncMessageInteractionBuilder {
debug!("Content matcher is a core matcher, will use the internal implementation");
self.setup_core_matcher(Some(ct.clone()), &contents_hashmap, Some(content_matcher));
} else {
match content_matcher.configure_interation(&ct, contents_hashmap).await {
match content_matcher.configure_interaction(&ct, contents_hashmap).await {
Ok((contents, plugin_config)) => {
if let Some(interaction) = contents.iter().find(|i| i.part_name == "request") {
self.request_contents = InteractionContents::from(&interaction);
Expand Down
6 changes: 3 additions & 3 deletions rust/pact_ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ sxd-document = "0.3.2"
thiserror = "1.0.51"
tokio = { version = "1.35.1", features = ["full"] }
tokio-rustls = "0.24.1"
tracing = "0.1.40" # This needs to be the same version across all the libs (i.e. plugin driver)
tracing-core = "0.1.32" # This needs to be the same version across all the pact libs (i.e. plugin driver)
tracing = "0.1.40"
tracing-core = "0.1.32"
tracing-log = "0.2.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "tracing-log"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
uuid = { version = "1.6.1", features = ["v4"] }
zeroize = "1.7.0"

Expand Down
2 changes: 1 addition & 1 deletion rust/pact_matching/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ multer = { version = "3.0.0", features = ["all"], optional = true }
nom = "7.1.3"
onig = { version = "6.4.0", default-features = false }
pact_models = { version = "~1.2.0", default-features = false }
pact-plugin-driver = { version = "~0.6.1", optional = true, default-features = false }
pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false }
rand = "0.8.5"
reqwest = { version = "0.12.3", default-features = false, features = ["rustls-tls-native-roots", "json"] }
semver = "1.0.22"
Expand Down
4 changes: 2 additions & 2 deletions rust/pact_verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ maplit = "1.0.2"
mime = "0.3.17"
pact_matching = { version = "~1.2.2", path = "../pact_matching", default-features = false }
pact_models = { version = "~1.2.0", default-features = false }
pact-plugin-driver = { version = "~0.6.1", optional = true, default-features = false }
pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false }
regex = "1.10.4"
reqwest = { version = "0.12.3", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] }
serde = "1.0.197"
Expand All @@ -57,7 +57,7 @@ crate-type = ["cdylib", "rlib"]
quickcheck = "1.0.3"
expectest = "0.12.0"
env_logger = "0.11.3"
pact_consumer = { version = "~1.2.1", path = "../pact_consumer" }
pact_consumer = { version = "~1.3.0", path = "../pact_consumer" }
test-log = { version = "0.2.15", features = ["trace"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "tracing-log", "fmt"] }
chrono = "0.4.38"
Expand Down

0 comments on commit 028cbc7

Please sign in to comment.