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

Docs/jvm doc sync #354

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
27 changes: 22 additions & 5 deletions scripts/sync/pact_jvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,27 @@
require_relative 'support'

SOURCE_REPO = 'pact-foundation/pact-jvm'
DESTINATION_DIR = relative_path_to('docs/implementation_guides/jvm')
TRANSFORM_PATH = -> (path) {
DESTINATION_DIR_V4_6_X = relative_path_to('docs/implementation_guides/jvm')
DESTINATION_DIR_V4_5_X = relative_path_to('docs/implementation_guides/jvm/v4.5.x')
DESTINATION_DIR_V4_1_X = relative_path_to('docs/implementation_guides/jvm/v4.1.x')
TRANSFORM_PATH_V4_6_X = -> (path) {
# Rename README.md file, but not the top level README
File.join(DESTINATION_DIR, path.downcase.gsub('/readme.md', '.md'))
File.join(DESTINATION_DIR_V4_6_X, path.downcase.gsub('/readme.md', '.md'))
}
TRANSFORM_PATH_V4_5_X = -> (path) {
# Rename README.md file, but not the top level README
File.join(DESTINATION_DIR_V4_5_X, path.downcase.gsub('/readme.md', '.md'))
}
TRANSFORM_PATH_V4_1_X = -> (path) {
# Rename README.md file, but not the top level README
File.join(DESTINATION_DIR_V4_1_X, path.downcase.gsub('/readme.md', '.md'))
}
INCLUDE = [
->(path) { path.end_with?('.md') }
]
IGNORE = [
->(path) { path.include?('tests_suits') },
->(path) { path.start_with?('core/', '.github/', 'pact-publish/', 'pact-specification-test/', 'provider/scalasupport/', 'ReleaseProcess.md') }
->(path) { path.start_with?('core/', '.github/', 'pact-publish/', 'pact-specification-test/', 'provider/scalasupport/', 'provider/scalatest/', 'provider/specs2/', 'ReleaseProcess.md') }
]
CUSTOM_ACTIONS = [
[->(path) { path != 'CHANGELOG.md'}, ->(md_file_contents) { md_file_contents.extract_title } ],
Expand All @@ -30,8 +40,15 @@
md_file_contents.remove_lines_including(' - Merge branch ')
md_file_contents.remove_lines_including(' - Merge pull request ')
md_file_contents.remove_lines_including(' - bump version ')
md_file_contents.remove_lines_including('<String>')
md_file_contents.find_and_replace(/^# /, '## ')
}],
# can be removed once https://github.com/pact-foundation/pact-jvm/pull/1832/files is merged
["provider/maven/README.md", -> (md_file_contents) {
md_file_contents.remove_lines_including('<TYPE>.<SUBTYPE>=text')
}]
]

sync(SOURCE_REPO, INCLUDE, IGNORE, TRANSFORM_PATH, CUSTOM_ACTIONS)
sync(SOURCE_REPO, INCLUDE, IGNORE, TRANSFORM_PATH_V4_6_X, CUSTOM_ACTIONS)
sync(SOURCE_REPO, INCLUDE, IGNORE, TRANSFORM_PATH_V4_5_X, CUSTOM_ACTIONS, 'v4.5.x')
sync(SOURCE_REPO, INCLUDE, IGNORE, TRANSFORM_PATH_V4_1_X, CUSTOM_ACTIONS, 'v4.1.x')
32 changes: 30 additions & 2 deletions website/docs/implementation_guides/jvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,39 @@ title: Overview

[Pact JVM](https://github.com/pact-foundation/pact-jvm) is currently compliant to Pact Specification Version [4.0](https://github.com/pact-foundation/pact-specification/tree/version-4).

Head to the [README](jvm/readme) to get started with Pact on the JVM \(Java, Scala, Clojure etc.\).
Head to the [README](jvm/readme) to get started with Pact on the JVM \(Java, Scala, Clojure etc.\) which tracks the latest version of Pact-JVM.

For older supported versions,

see

- [v4.5.x README](jvm/v4.5.x/readme)
- [v4.1.x README](jvm/v4.1.x/readme)

For a Scala specific implementation, there is [Scala-Pact](scala) from the folks at ITV. This is Pact Specification Version [2.0](https://github.com/pact-foundation/pact-specification/tree/version-2) compliant and supports SBT and ScalaTest.

## Getting Started Guide

This [workshop](https://github.com/pact-foundation/pact-workshop-jvm-spring) walks you through an example problem from start to finish, exploring most concepts that Pact supports. It takes approximately 2 hours to complete.
We have two workshops that walk you through an example problem from start to finish, exploring most concepts that Pact supports. It takes approximately 2 hours to complete.

- [Pact JVM + Gradle + Springboot + JUnit5 workshop](https://github.com/pact-foundation/pact-workshop-jvm-spring)
- [Pact JVM + Maven + Springboot + JUnit5 workshop](https://github.com/pact-foundation/pact-workshop-Maven-Springboot-JUnit5)

For example consumer & provider projects, see the [PactFlow examples](https://docs.pactflow.io/docs/examples)

- HTTP
- [Consumer](https://github.com/pactflow/example-consumer-java-junit)
- [Provider](https://github.com/pactflow/example-provider-springboot)
- GraphQL
- [Consumer](https://github.com/pactflow/example-consumer-java-graphql)
- [Provider](https://github.com/pactflow/pactflow-example-provider-java-graphql)
- XML / SOAP
- [Consumer](https://github.com/pactflow/example-consumer-java-soap)
- [Provider](https://github.com/pactflow/example-provider-java-soap)
- Kafka
- [Consumer](https://github.com/pactflow/example-consumer-java-kafka)
- [Provider](https://github.com/pactflow/example-provider-java-kafka)
- Plugins
- [gRPC](https://github.com/pact-foundation/pact-plugins/tree/main/examples/gRPC)
- [Protobuf](https://github.com/pact-foundation/pact-plugins/tree/main/examples/protobuf)
- [CSV](https://github.com/pact-foundation/pact-plugins/tree/main/examples/csv)
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Changelog
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/CHANGELOG.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/CHANGELOG.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

## 4.6.14 - Bugfix Release

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/compatibility-suite.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Compatability Suite
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/compatibility-suite/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/compatibility-suite/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

This is the implementation of the [Pact Compatability Suite](https://github.com/pact-foundation/pact-compatibility-suite) implemented with Cucumber JVM.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: pact-compatibility-suite
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/compatibility-suite/pact-compatibility-suite/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/compatibility-suite/pact-compatibility-suite/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Set of BDD style tests to check compatibility between Pact implementations.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/consumer.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact consumer
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/consumer/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/consumer/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Pact Consumer is used by projects that are consumers of an API.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/consumer/groovy.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: pact-jvm-consumer-groovy
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/consumer/groovy/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/consumer/groovy/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Groovy DSL for Pact JVM

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/consumer/junit.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: pact-jvm-consumer-junit
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/consumer/junit/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/consumer/junit/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Provides a DSL and a base test class for use with Junit to build consumer tests.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/consumer/junit5.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: pact-jvm-consumer-junit5
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/consumer/junit5/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/consumer/junit5/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

JUnit 5 support for Pact consumer tests

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/consumer/kotlin.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Kotlin consumer DSL for Pact-JVM
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/consumer/kotlin/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/consumer/kotlin/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/contributing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Contributing
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/CONTRIBUTING.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/CONTRIBUTING.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
Expand Down
8 changes: 4 additions & 4 deletions website/docs/implementation_guides/jvm/docs/releaseprocess.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Releasing Pact-JVM
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/docs/ReleaseProcess.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/docs/ReleaseProcess.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

The Pact-JVM project releases three types of artifacts: Java JAR files to Maven Central, a Gradle plugin to plugins.gradle.org
and Pact files to pact-foundation.pact.dius.com.au.
Expand Down Expand Up @@ -233,12 +233,12 @@ Log onto [oss.sonatype.org](https://oss.sonatype.org) and select `Staging Reposi
You should see a new staging repository for `au.com.dius` listed. Select the repository and select the Close button.
This will close the repository and run all the Maven Central rules.

![close-repo.png](https://github.com/DiUS/pact-jvm/blob/master/close-repo.png?raw=true)
![close-repo.png](https://github.com/pact-foundation/pact-jvm/blob/master/close-repo.png?raw=true)

Once the repository is successfully closed (it takes a few minutes, select the refresh button to re-load ands wait for the
status to change to `closed`), select the repository again and then select the Release button.

![release-repo](https://github.com/DiUS/pact-jvm/blob/master/release-repo.png?raw=true)
![release-repo](https://github.com/pact-foundation/pact-jvm/blob/master/release-repo.png?raw=true)

## 5. Create a Github release

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: System Properties
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/docs/system-properties.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/docs/system-properties.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Theses are all the system properties used by Pact-JVM

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/pact-jvm-server.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact server
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/pact-jvm-server/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/pact-jvm-server/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->


The pact server is a stand-alone interactions recorder and verifier, aimed at clients that are non-JVM or non-Ruby based.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact provider
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

The pact provider is responsible for verifying that an API provider adheres to a number of pacts authored by its clients

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider/gradle.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Gradle plugin to verify a provider
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/gradle/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/gradle/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Gradle plugin for verifying pacts against a provider.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider/junit.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact junit runner
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/junit/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/junit/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

## Dependency

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider/junit5.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact Junit 5 Extension
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/junit5/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/junit5/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

## Dependency

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact Spring/JUnit5 Support
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/junit5spring/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/junit5spring/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

This module extends the base [Pact JUnit5 module](/implementation_guides/jvm/provider/junit5). See that for more details.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider/lein.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Leiningen plugin to verify a provider
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/lein/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/lein/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

Leiningen plugin for verifying pacts against a provider. The plugin provides a `pact-verify` task which will verify all
configured pacts against your provider.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/implementation_guides/jvm/provider/maven.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Pact Maven plugin
custom_edit_url: https://github.com/DiUS/pact-jvm/edit/master/provider/maven/README.md
custom_edit_url: https://github.com/pact-foundation/pact-jvm/edit/master/provider/maven/README.md
---
<!-- This file has been synced from the DiUS/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->
<!-- This file has been synced from the pact-foundation/pact-jvm repository. Please do not edit it directly. The URL of the source file can be found in the custom_edit_url value above -->

This is a Maven plugin for verifying pacts against a running provider, publishing pacts generated by consumer tests,
and checking if you can deploy. The sections below provide details on each of these goals.
Expand Down
13 changes: 0 additions & 13 deletions website/docs/implementation_guides/jvm/provider/scalatest.md

This file was deleted.

Loading