Skip to content

Commit 31d9f57

Browse files
committed
feat: add native extension support, update rust tools, rename osx to macos
1 parent d5c2158 commit 31d9f57

File tree

11 files changed

+186
-128
lines changed

11 files changed

+186
-128
lines changed

DEVELOPING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ pact-standalone is packaged with `traveling-ruby`
1010

1111
For macOS - it will build for arm64 or x86_64 depending on your processor
1212

13-
cd osx
13+
cd macos
1414
rake stash_conflicting_paths
1515
rake --trace
1616
rake unstash_conflicting_paths
1717

1818
For macOS x86_64 on an m1 machine
1919

2020
sudo softwareupdate --install-rosetta --agree-to-license
21-
cd osx
21+
cd macos
2222
rake stash_conflicting_paths
2323
arch -x86_64 rake --trace
2424
rake unstash_conflicting_paths
@@ -80,8 +80,8 @@ Build only selected platforms
8080

8181
bundle exec rake package:linux:arm64
8282
bundle exec rake package:linux:x64
83-
bundle exec rake package:osx:arm64
84-
bundle exec rake package:osx:x64
83+
bundle exec rake package:macos:arm64
84+
bundle exec rake package:macos:x64
8585
bundle exec rake package:windows:x64
8686
bundle exec rake package:windows:x86
8787

@@ -99,12 +99,12 @@ Build only selected platforms
9999
# download_runtime(TRAVELING_RUBY_VERSION, "linux-arm64")
100100
end
101101

102-
file "build/traveling-ruby-#{TRAVELING_RUBY_VERSION}-osx-x86_64.tar.gz" do
103-
# download_runtime(TRAVELING_RUBY_VERSION, "osx-x86_64")
102+
file "build/traveling-ruby-#{TRAVELING_RUBY_VERSION}-macos-x86_64.tar.gz" do
103+
# download_runtime(TRAVELING_RUBY_VERSION, "macos-x86_64")
104104
end
105105

106-
file "build/traveling-ruby-#{TRAVELING_RUBY_VERSION}-osx-arm64.tar.gz" do
107-
# download_runtime(TRAVELING_RUBY_VERSION, "osx-arm64")
106+
file "build/traveling-ruby-#{TRAVELING_RUBY_VERSION}-macos-arm64.tar.gz" do
107+
# download_runtime(TRAVELING_RUBY_VERSION, "macos-arm64")
108108
end
109109

110110
file "build/traveling-ruby-#{TRAVELING_RUBY_VERSION}-windows-x86_64.tar.gz" do
@@ -130,8 +130,8 @@ Build only selected platforms
130130

131131
| OS | Ruby | Architecture | Supported |
132132
| -------| ------- | ------------ | --------- |
133-
| OSX | 3.3.9 | x86_64 ||
134-
| OSX | 3.3.9 | aarch64 (arm)||
133+
| macos | 3.3.9 | x86_64 ||
134+
| macos | 3.3.9 | aarch64 (arm)||
135135
| Linux | 3.3.9 | x86_64 ||
136136
| Linux | 3.3.9 | aarch64 (arm)||
137137
| Windows| 3.3.9 | x86_64 ||

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Binaries will be extracted into `pact/bin`:
2929
├── pact (central entry point to all binaries)
3030
├── pact-broker
3131
├── pactflow
32-
├── pact_mock_server_cli
32+
├── pact-mock-server
3333
├── pact-stub-server
34-
├── pact_verifier_cli
35-
├── pact-plugin-cli
34+
├── pact-verifier-cli
35+
├── pact-plugin
3636
├── pact-message (legacy)
3737
├── pact-mock-service (legacy)
3838
├── pact-provider-verifier (legacy)
@@ -54,7 +54,7 @@ Please append `.exe` to any of the provided rust based binaries
5454
eg.
5555

5656
```ps1
57-
.\pact\bin\pact_mock_server_cli.exe
57+
.\pact\bin\pact-mock-server.exe
5858
```
5959

6060
## Installation

install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ case $(uname -sm) in
4545
;;
4646
'Darwin arm64')
4747
if [ "$MAJOR_PACT_CLI_VERSION" -lt 2 ]; then
48-
os='osx'
48+
os='macos'
4949
else
50-
os='osx-arm64'
50+
os='macos-arm64'
5151
fi
5252
;;
5353
'Darwin x86' | 'Darwin x86_64')
5454
if [ "$MAJOR_PACT_CLI_VERSION" -lt 2 ]; then
55-
os='osx'
55+
os='macos'
5656
else
57-
os='osx-x86_64'
57+
os='macos-x86_64'
5858
fi
5959
;;
6060
"Windows"* | "MINGW64"*)
@@ -74,7 +74,7 @@ case $os in
7474
'windows'* | 'win32')
7575
filename="pact-${PACT_CLI_VERSION#v}-${os}.zip"
7676
;;
77-
'osx'* | 'linux'*)
77+
'macos'* | 'linux'*)
7878
filename="pact-${PACT_CLI_VERSION#v}-${os}.tar.gz"
7979
;;
8080
esac
@@ -87,7 +87,7 @@ case $os in
8787
'windows'* | 'win32')
8888
(unzip "${filename}" && echo unarchived "${filename}") || (echo "Sorry, you'll need to unarchived the pact-standalone manually." && exit 1)
8989
;;
90-
'osx'* | 'linux'*)
90+
'macos'* | 'linux'*)
9191
(tar xzf "${filename}" && echo unarchived "${filename}") || (echo "Sorry, you'll need to unarchived the pact-standalone manually." && exit 1)
9292
;;
9393
esac

packaging/Gemfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ gem "pact-message", "0.11.1"
55
gem "pact-mock_service", "3.12.4"
66
gem "pact-provider-verifier", "1.39.1"
77
gem "pact_broker-client", "1.77.0"
8-
gem "webrick", "1.9.1"
9-
# see https://stdgems.org/ for versions to lock to
10-
# we require gem locking for gems with native extensions
11-
# due to lack of windows support
12-
gem "json", "2.7.2"
13-
gem "bigdecimal", "3.1.5"
14-
gem "fiddle", "1.1.2"
15-
gem "io-console", "0.7.1"
8+
gem "webrick", "1.9.2"
9+
# locked to native extensions supported by traveling-ruby
10+
# https://github.com/trubygems/traveling-ruby/releases/tag/rel-20251122
11+
gem "json", "2.16.0"
12+
gem "bigdecimal", "3.3.1"
13+
gem "fiddle", "1.1.8"
14+
gem "io-console", "0.8.1"

packaging/Gemfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GEM
33
specs:
44
awesome_print (1.9.2)
55
base64 (0.3.0)
6-
bigdecimal (3.1.5)
6+
bigdecimal (3.3.1)
77
csv (3.3.5)
88
diff-lcs (1.6.2)
99
dig_rb (1.0.1)
@@ -17,14 +17,14 @@ GEM
1717
net-http (~> 0.5)
1818
faraday-retry (2.4.0)
1919
faraday (~> 2.0)
20-
fiddle (1.1.2)
20+
fiddle (1.1.8)
2121
find_a_port (1.0.1)
2222
httparty (0.24.0)
2323
csv
2424
mini_mime (>= 1.0.0)
2525
multi_xml (>= 0.5.2)
26-
io-console (0.7.1)
27-
json (2.7.2)
26+
io-console (0.8.1)
27+
json (2.16.0)
2828
jsonpath (1.1.5)
2929
multi_json
3030
logger (1.7.0)
@@ -138,7 +138,7 @@ GEM
138138
readline
139139
sync
140140
uri (1.1.1)
141-
webrick (1.9.1)
141+
webrick (1.9.2)
142142
zeitwerk (2.7.4)
143143

144144
PLATFORMS
@@ -158,16 +158,16 @@ PLATFORMS
158158
x86_64-linux
159159

160160
DEPENDENCIES
161-
bigdecimal (= 3.1.5)
162-
fiddle (= 1.1.2)
163-
io-console (= 0.7.1)
164-
json (= 2.7.2)
161+
bigdecimal (= 3.3.1)
162+
fiddle (= 1.1.8)
163+
io-console (= 0.8.1)
164+
json (= 2.16.0)
165165
pact (= 1.67.3)
166166
pact-message (= 0.11.1)
167167
pact-mock_service (= 3.12.4)
168168
pact-provider-verifier (= 1.39.1)
169169
pact_broker-client (= 1.77.0)
170-
webrick (= 1.9.1)
170+
webrick (= 1.9.2)
171171

172172
BUNDLED WITH
173-
2.5.18
173+
2.5.22

packaging/README.md.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Binaries will be extracted into `pact/bin`:
2929
├── pact (central entry point to all binaries)
3030
├── pact-broker
3131
├── pactflow
32-
├── pact_mock_server_cli
32+
├── pact-mock-server
3333
├── pact-stub-server
34-
├── pact_verifier_cli
35-
├── pact-plugin-cli
34+
├── pact-verifier-cli
35+
├── pact-plugin
3636
├── pact-message (legacy)
3737
├── pact-mock-service (legacy)
3838
├── pact-provider-verifier (legacy)
@@ -54,7 +54,7 @@ Please append `.exe` to any of the provided rust based binaries
5454
eg.
5555

5656
```ps1
57-
.\pact\bin\pact_mock_server_cli.exe
57+
.\pact\bin\pact-mock-server.exe
5858
```
5959

6060
## Installation

packaging/RELEASE_NOTES.md.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-standalone/mas
1515
#### x86_64
1616

1717
```
18-
curl -LO https://github.com/pact-foundation/pact-standalone/releases/download/<TAG_NAME>/pact-<PACKAGE_VERSION>-osx-x86_64.tar.gz
19-
tar xzf pact-<PACKAGE_VERSION>-osx-x86_64.tar.gz
18+
curl -LO https://github.com/pact-foundation/pact-standalone/releases/download/<TAG_NAME>/pact-<PACKAGE_VERSION>-macos-x86_64.tar.gz
19+
tar xzf pact-<PACKAGE_VERSION>-macos-x86_64.tar.gz
2020
```
2121

2222
#### arm64
2323

2424
```
25-
curl -LO https://github.com/pact-foundation/pact-standalone/releases/download/<TAG_NAME>/pact-<PACKAGE_VERSION>-osx-arm64.tar.gz
26-
tar xzf pact-<PACKAGE_VERSION>-osx-arm64.tar.gz
25+
curl -LO https://github.com/pact-foundation/pact-standalone/releases/download/<TAG_NAME>/pact-<PACKAGE_VERSION>-macos-arm64.tar.gz
26+
tar xzf pact-<PACKAGE_VERSION>-macos-arm64.tar.gz
2727
```
2828

2929
### Linux

packaging/pact.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@
4545
PactBroker::Client::CLI::Broker.start
4646
when 'plugin'
4747
ARGV.shift
48-
output = `#{File.expand_path("../../bin/pact-plugin-cli", __dir__)} #{ARGV.join(" ")}`
48+
output = `#{File.expand_path("../../bin/pact-plugin", __dir__)} #{ARGV.join(" ")}`
4949
exit_status = $?.exitstatus
5050
puts output
5151
exit(exit_status)
5252
when 'verifier'
5353
ARGV.shift
54-
output = `#{File.expand_path("../../bin/pact_verifier_cli", __dir__)} #{ARGV.join(" ")}`
54+
output = `#{File.expand_path("../../bin/pact-verifier", __dir__)} #{ARGV.join(" ")}`
5555
exit_status = $?.exitstatus
5656
puts output
5757
exit(exit_status)
5858
when 'mock-server'
5959
ARGV.shift
60-
IO.popen([File.expand_path("../../bin/pact_mock_server_cli", __dir__), *ARGV], err: [:child, :out]) do |io|
60+
IO.popen([File.expand_path("../../bin/pact-mock-server", __dir__), *ARGV], err: [:child, :out]) do |io|
6161
while (line = io.gets)
6262
$stdout.write(line)
6363
end

script/test.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ FILE_EXT=${FILE_EXT:-}
1010
if [ "$BINARY_OS" == "" ] || [ "$BINARY_ARCH" == "" ] ; then
1111
case ${detected_os} in
1212
'Darwin arm64')
13-
BINARY_OS=osx
13+
BINARY_OS=macos
1414
BINARY_ARCH=arm64
1515
;;
1616
'Darwin x86' | 'Darwin x86_64' | "Darwin"*)
17-
BINARY_OS=osx
17+
BINARY_OS=macos
1818
BINARY_ARCH=x86_64
1919
;;
2020
"Linux aarch64"* | "Linux arm64"*)
@@ -47,18 +47,18 @@ tools=(
4747
pact-provider-verifier
4848
pact-stub-service
4949
pactflow
50-
pact-plugin-cli
50+
pact-plugin
5151
pact-stub-server
52-
pact_verifier_cli
53-
pact_mock_server_cli
52+
pact-verifier-cli
53+
pact-mock-server
5454
)
5555

5656
test_cmd=""
5757
for tool in ${tools[@]}; do
5858
echo testing $tool
5959
if [ "$BINARY_OS" = "windows" ] ; then FILE_EXT=.bat; fi
60-
if [ "$BINARY_OS" = "windows" ] && ([ "$tool" = "pact-plugin-cli" ] || [ "$tool" = "pact-stub-server" ] || [ "$tool" = "pact_verifier_cli" ] || [ "$tool" = "pact_mock_server_cli" ]) ; then FILE_EXT=.exe ; fi
61-
if [ "$tool" = "pact_verifier_cli" ] || [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
60+
if [ "$BINARY_OS" = "windows" ] && ([ "$tool" = "pact-plugin" ] || [ "$tool" = "pact-stub-server" ] || [ "$tool" = "pact-verifier-cli" ] || [ "$tool" = "pact-mock-server" ]) ; then FILE_EXT=.exe ; fi
61+
if [ "$tool" = "pact-verifier-cli" ] || [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
6262
echo executing ${tool}${FILE_EXT}
6363
${PATH_TO_BIN}${tool}${FILE_EXT} ${test_cmd};
6464
done

script/unpack-and-test.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ FILE_EXT=${FILE_EXT:-}
1010
if [ "$BINARY_OS" == "" ] || [ "$BINARY_ARCH" == "" ] ; then
1111
case ${detected_os} in
1212
'Darwin arm64')
13-
BINARY_OS=osx
13+
BINARY_OS=macos
1414
BINARY_ARCH=arm64
1515
;;
1616
'Darwin x86' | 'Darwin x86_64' | "Darwin"*)
17-
BINARY_OS=osx
17+
BINARY_OS=macos
1818
BINARY_ARCH=x86_64
1919
;;
2020
"Linux aarch64"* | "Linux arm64"*)
@@ -56,18 +56,18 @@ tools=(
5656
pact-provider-verifier
5757
pact-stub-service
5858
pactflow
59-
pact-plugin-cli
59+
pact-plugin
6060
pact-stub-server
61-
pact_verifier_cli
62-
pact_mock_server_cli
61+
pact-verifier-cli
62+
pact-mock-server
6363
)
6464

6565
test_cmd=""
6666
for tool in ${tools[@]}; do
6767
echo testing $tool
6868
if [ "$BINARY_OS" = "windows" ] ; then FILE_EXT=.bat; fi
69-
if [ "$BINARY_OS" = "windows" ] && ([ "$tool" = "pact-plugin-cli" ] || [ "$tool" = "pact-stub-server" ] || [ "$tool" = "pact_verifier_cli" ] || [ "$tool" = "pact_mock_server_cli" ]) ; then FILE_EXT=.exe ; fi
70-
if [ "$tool" = "pact_verifier_cli" ] || [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
69+
if [ "$BINARY_OS" = "windows" ] && ([ "$tool" = "pact-plugin" ] || [ "$tool" = "pact-stub-server" ] || [ "$tool" = "pact-verifier-cli" ] || [ "$tool" = "pact-mock-server" ]) ; then FILE_EXT=.exe ; fi
70+
if [ "$tool" = "pact-verifier-cli" ] || [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
7171
echo executing ${tool}${FILE_EXT}
7272
${PATH_TO_BIN}${tool}${FILE_EXT} ${test_cmd};
7373
done

0 commit comments

Comments
 (0)