pact-ffi 0.0.3-x86_64-darwin → 0.4.22.1-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71fefc28c82e05adb2157b0a8a4c9fe33adb362fed794f6d7ffd6dc39eb8113a
4
- data.tar.gz: 3e1d31a023fe2cc6745a7a2922b8a13c77a50cc7eae287d7fbdba4f41bd2b0db
3
+ metadata.gz: f05d47a6e9dfbd53e8b185fa24533bc7dea46642276230c65c8bbc842364ffa0
4
+ data.tar.gz: 22b56d04a87e29aa37d22145511bab3e91809eda8c5090c14e9c8c31bed9c393
5
5
  SHA512:
6
- metadata.gz: f974ad1094f7dab31ece2b32aaed2bd794024795cb4b4708bb64fd765cfcccf11f9bd51185fa53c4fc782afe7faca0fcf76eaf5b6fefc7475a722a3da4634dd2
7
- data.tar.gz: 660b67d51dada505f1e9e43048ea4a5939d5c3e7377bc87a5e6c075184a8f47c9936c590b6ad06bb33939ac6ca139f6c12e33b65f19969cbab5920eb722d752a
6
+ metadata.gz: 25f0b43373edb6f08d4f986cca5aca32b8a3e4dd188602957af8ab07dd45f89e090d426b90e8cfdaab3ad558d79d1521fd60fe86967b019bea8c28164bcc9ed3
7
+ data.tar.gz: 651b878fb760f6e5bab4d0655216cb238cf951ae7aa1359fa1c853416312713ecbaca970ec51a3e41f4e3e1357fd5c51c812d7bb4cfc59d1e7308dda27186bfa
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Ruby spike gem, to show interactions with the Pact Rust FFI methods.
4
4
 
5
- Available on RubyGems - https://rubygems.org/gems/pact-ffi
5
+ Available on RubyGems - <https://rubygems.org/gems/pact-ffi>
6
6
 
7
7
  ## Installation
8
8
 
@@ -14,16 +14,12 @@ gem 'pact-ffi'
14
14
 
15
15
  And then execute:
16
16
 
17
-
18
17
  bundle
19
18
 
20
-
21
19
  Or install it yourself as:
22
-
23
20
 
24
21
  gem install pact-ffi
25
22
 
26
-
27
23
  ## Usage
28
24
 
29
25
  Simple
@@ -34,43 +30,42 @@ require 'pact/ffi'
34
30
  puts PactFfi.pactffi_version
35
31
  ```
36
32
 
37
-
38
33
  - See [`lib/pact/ffi.rb`](lib/pact/ffi.rb) for all available methods
39
34
  - See [`spec`](spec) folder to see the tests, with the library in use
40
35
  - See [`examples/area_calculator`](examples/area_calculator) folder for an example using a pact-plugin, to test the canonical area_calculator example
41
- - Test it out in your browser, with our Killercoda example! https://killercoda.com/safdotdev/course/safacoda/grpc_plugins_quick_start_ruby
42
-
36
+ - Test it out in your browser, with our Killercoda example! <https://killercoda.com/safdotdev/course/safacoda/grpc_plugins_quick_start_ruby>
43
37
 
44
38
  ## Supported Platforms
45
39
 
46
40
  - Ruby
47
- - This gem is compatible with all the rubies, and various platforms, it comes pre-packaged with the pact_ffi binary for each platform.
41
+ - This gem is compatible with all the rubies, and various platforms, it comes pre-packaged with the pact_ffi binary for each platform.
48
42
 
49
- | OS | Ruby | Architecture | Supported | Ruby Platform |
50
- | ------- | ------- | ------------ | --------- | --------- |
51
- | OSX | 2.6 - 3.2 | x86_64 | ✅ | x86_64-darwin |
52
- | OSX | 2.6 - 3.2 | aarch64 (arm)| ✅ | arm64-darwin |
53
- | Linux | 2.6 - 3.2 | x86_64 | ✅ | x86_64-linux |
54
- | Linux | 2.6 - 3.2 | aarch64 (arm)| ✅ | aarch64-linux |
55
- | Windows | 2.6 - 3.2 | x86_64 | ✅ | x64-mingw-ucrt |
43
+ | OS | Ruby | Architecture | Supported | Ruby Platform |
44
+ | ------- | ------- | ------------ | --------- | --------- |
45
+ | OSX | 2.6 - 3.3 | x86_64 | ✅ | x86_64-darwin |
46
+ | OSX | 2.6 - 3.3 | aarch64 (arm)| ✅ | arm64-darwin |
47
+ | Linux | 2.6 - 3.3 | x86_64 | ✅ | x86_64-linux |
48
+ | Linux | 2.6 - 3.3 | aarch64 (arm)| ✅ | aarch64-linux |
49
+ | Linux (musl) | 2.6 - 3.3 | x86_64 | ✅ | x86_64-linux-musl |
50
+ | Linux (musl) | 2.6 - 3.3 | aarch64 (arm)| ✅ | aarch64-linux-musl|
51
+ | Windows | 2.6 - 3.3 | x86_64 | ✅ | x64-mingw-ucrt |
56
52
 
57
53
  You can checkout the ci tests, to see all the architectures, platforms and examples tested
58
54
 
59
- - GitHub Actions https://github.com/YOU54F/pact-ruby-ffi/actions
60
- - Cirrus CI https://cirrus-ci.com/github/YOU54F/pact-ruby-ffi/main
55
+ - GitHub Actions <https://github.com/YOU54F/pact-ruby-ffi/actions>
56
+ - Cirrus CI <https://cirrus-ci.com/github/YOU54F/pact-ruby-ffi/main>
61
57
 
62
58
  _note_ - Alpine is currently not supported, but is on the list
63
59
 
64
60
  - FFI libraries for your current platform - run `./script/download-libs.sh` to download
65
61
 
66
62
  - If testing the protobuf plugin
67
- - `2.7` for protobuf/grpc example
68
- - See https://grpc.io/docs/languages/ruby/quickstart/ for steps
63
+ - `3.0` for protobuf/grpc example
64
+ - See <https://grpc.io/docs/languages/ruby/quickstart/> for steps
69
65
  - See `examples/proto-ruby/README.md` for notes
70
66
  - ruby-grpc is not currently, on m1 hardware for the `pact-protobuf-plugin` example
71
67
  - Have the pact-protobuf plugin available
72
68
  - Run `pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/latest`
73
-
74
69
 
75
70
  ## Development
76
71
 
@@ -89,3 +84,35 @@ The gem is available as open source under the terms of the [MIT License](http://
89
84
  ## Code of Conduct
90
85
 
91
86
  Everyone interacting in the PactFfi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pact-ffi/blob/master/CODE_OF_CONDUCT.md).
87
+
88
+ ## Pact Compatibility Suite
89
+
90
+ Help us implement the [Pact Compatibility Suite](https://github.com/pact-foundation/pact-compatibility-suite)
91
+
92
+ ```
93
+ compatibility-suite/pact-compatibility-suite/features
94
+ ├── V1
95
+ │ ├── http_consumer.feature
96
+ │ └── http_provider.feature
97
+ ├── V2
98
+ │ ├── http_consumer.feature
99
+ │ └── http_provider.feature
100
+ ├── V3
101
+ │ ├── generators.feature
102
+ │ ├── http_consumer.feature
103
+ │ ├── http_generators.feature
104
+ │ ├── http_matching.feature
105
+ │ ├── http_provider.feature
106
+ │ ├── matching_rules.feature
107
+ │ ├── message_consumer.feature
108
+ │ └── message_provider.feature
109
+ ├── V4
110
+ │ ├── generators.feature
111
+ │ ├── http_consumer.feature ✅
112
+ │ ├── http_provider.feature
113
+ │ ├── matching_rules.feature
114
+ │ ├── message_consumer.feature ✅
115
+ │ ├── message_provider.feature ✅
116
+ │ ├── synchronous_message_consumer.feature ✅
117
+ │ └── v4.feature ✅
118
+ ```
Binary file
@@ -1,43 +1,40 @@
1
1
  module DetectOS
2
2
  def self.windows?
3
3
  return if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['arch']).nil?
4
-
5
- puts 'detected windows'
6
4
  true
7
5
  end
8
6
 
9
7
  def self.mac_arm?
10
8
  return unless !(/darwin/ =~ RbConfig::CONFIG['arch']).nil? && !(/arm64/ =~ RbConfig::CONFIG['arch']).nil?
11
-
12
- puts 'detected macos arm'
13
9
  true
14
10
  end
15
11
 
16
12
  def self.mac?
17
13
  return unless !(/darwin/ =~ RbConfig::CONFIG['arch']).nil? && !(/x86_64/ =~ RbConfig::CONFIG['arch']).nil?
14
+ true
15
+ end
18
16
 
19
- puts 'detected macos'
17
+ def self.linux_arm_musl?
18
+ return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/aarch64/ =~ RbConfig::CONFIG['arch']).nil? && !(/musl/ =~ RbConfig::CONFIG['arch']).nil?
20
19
  true
21
20
  end
22
21
 
22
+ def self.linux_musl?
23
+ return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/x86_64/ =~ RbConfig::CONFIG['arch']).nil?&& !(/musl/ =~ RbConfig::CONFIG['arch']).nil?
24
+ true
25
+ end
23
26
  def self.linux_arm?
24
27
  return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/aarch64/ =~ RbConfig::CONFIG['arch']).nil?
25
-
26
- puts 'detected linux aarch64'
27
28
  true
28
29
  end
29
30
 
30
31
  def self.linux?
31
32
  return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/x86_64/ =~ RbConfig::CONFIG['arch']).nil?
32
-
33
- puts 'detected linux'
34
33
  true
35
34
  end
36
35
 
37
36
  def self.debug?
38
37
  return if ENV['DEBUG_TARGET'].nil?
39
-
40
- puts 'detected debug target' + ENV['DEBUG_TARGET']
41
38
  true
42
39
  end
43
40
 
@@ -50,6 +47,10 @@ module DetectOS
50
47
  File.join(__dir__, '../../ffi/macos-arm64/libpact_ffi.dylib')
51
48
  elsif mac?
52
49
  File.join(__dir__, '../../ffi/macos-x64/libpact_ffi.dylib')
50
+ elsif linux_arm_musl?
51
+ File.join(__dir__, '../../ffi/linux-arm64-musl/libpact_ffi.so')
52
+ elsif linux_musl?
53
+ File.join(__dir__, '../../ffi/linux-x64-musl/libpact_ffi.so')
53
54
  elsif linux_arm?
54
55
  File.join(__dir__, '../../ffi/linux-arm64/libpact_ffi.so')
55
56
  elsif linux?
@@ -76,4 +77,4 @@ module DetectOS
76
77
  end
77
78
  end
78
79
 
79
- puts DetectOS.get_bin_path
80
+ ENV['PACT_DEBUG'] ? (puts "Detected platform: #{RbConfig::CONFIG['arch']} \nLoad Path: #{DetectOS.get_bin_path}" ): nil
@@ -7,9 +7,10 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
- attach_function :new, :pactffi_async_message_new, %i[], :pointer
13
+ attach_function :new_async_message, :pactffi_async_message_new, %i[], :pointer
13
14
  attach_function :delete, :pactffi_async_message_delete, %i[pointer], :void
14
15
  attach_function :get_contents, :pactffi_async_message_get_contents, %i[pointer], :pointer
15
16
  attach_function :get_contents_str, :pactffi_async_message_get_contents_str, %i[pointer], :string
@@ -22,6 +23,7 @@ module PactFfi
22
23
  attach_function :get_provider_state, :pactffi_async_message_get_provider_state, %i[pointer uint32_type], :pointer
23
24
  attach_function :get_provider_state_iter, :pactffi_async_message_get_provider_state_iter, %i[pointer], :pointer
24
25
  attach_function :new, :pactffi_new_async_message, %i[uint16 string], :uint32_type
25
- attach_function :pact_interaction_as_asynchronous_message, :pactffi_pact_interaction_as_asynchronous_message, %i[pointer], :pointer
26
+ attach_function :pact_interaction_as_asynchronous_message, :pactffi_pact_interaction_as_asynchronous_message,
27
+ %i[pointer], :pointer
26
28
  end
27
29
  end
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  attach_function :pact_interaction_iter_next, :pactffi_pact_interaction_iter_next, %i[pointer], :pointer
13
14
  attach_function :pact_interaction_iter_delete, :pactffi_pact_interaction_iter_delete, %i[pointer], :void
@@ -16,7 +17,7 @@ module PactFfi
16
17
  attach_function :upon_receiving, :pactffi_upon_receiving, %i[uint32_type string], :bool
17
18
  attach_function :given, :pactffi_given, %i[uint32_type string], :bool
18
19
  attach_function :given_with_param, :pactffi_given_with_param, %i[uint32_type string], :bool
19
- attach_function :given_with_params, :pactffi_given_with_params, %i[uint32_t string string], :int32
20
+ attach_function :given_with_params, :pactffi_given_with_params, %i[uint32_type string string], :int32
20
21
  attach_function :interaction_test_name, :pactffi_interaction_test_name, %i[uint32_type string], :uint32_type
21
22
  attach_function :given_with_param, :pactffi_given_with_param, %i[uint32_type string string string], :bool
22
23
  attach_function :with_request, :pactffi_with_request, %i[uint32_type string string], :bool
@@ -30,7 +31,10 @@ module PactFfi
30
31
  attach_function :response_status, :pactffi_response_status, %i[uint32_type uint16], :bool
31
32
  attach_function :with_body, :pactffi_with_body, %i[uint32_type int32 string string], :bool
32
33
  attach_function :with_binary_file, :pactffi_with_binary_file, %i[uint32_type int32 string pointer size_t], :bool
33
- attach_function :with_multipart_file, :pactffi_with_multipart_file, %i[uint32_type int32 string string string],
34
- :pointer
34
+ attach_function :with_multipart_file, :pactffi_with_multipart_file, %i[uint32_type int32 string string string], :pointer
35
+ attach_function :set_header, :pactffi_set_header, %i[uint32_type int32 string string], :bool
36
+ attach_function :with_binary_body, :pactffi_with_binary_body, %i[uint32_type int32 string pointer size_t], :bool
37
+ attach_function :with_matching_rules, :pactffi_with_matching_rules, %i[uint32_type int32 string], :bool
38
+ attach_function :with_multipart_file_v2, :pactffi_with_multipart_file_v2, %i[uint32_type int32 string string string string], :pointer
35
39
  end
36
40
  end
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  LogLevel = Hash[
13
14
  'OFF' => 0,
@@ -19,15 +20,15 @@ module PactFfi
19
20
  ]
20
21
 
21
22
  attach_function :enable_ansi_support, :pactffi_enable_ansi_support, %i[], :void
22
- attach_function :log_message, :pactffi_log_message, %i[string string string], :void
23
+ attach_function :message, :pactffi_log_message, %i[string string string], :void
23
24
  attach_function :get_error_message, :pactffi_get_error_message, %i[string int32], :int32
24
25
  attach_function :log_to_stdout, :pactffi_log_to_stdout, %i[int32], :int32
25
26
  attach_function :log_to_stderr, :pactffi_log_to_stderr, %i[int32], :int32
26
27
  attach_function :log_to_file, :pactffi_log_to_file, %i[string int32], :int32
27
28
  attach_function :log_to_buffer, :pactffi_log_to_buffer, %i[int32], :int32
28
- attach_function :logger_init, :pactffi_logger_init, %i[], :void
29
+ attach_function :init, :pactffi_logger_init, %i[], :void
29
30
  attach_function :attach_sink, :pactffi_logger_attach_sink, %i[string int32], :int32
30
- attach_function :logger_apply, :pactffi_logger_apply, %i[], :int32
31
+ attach_function :apply, :pactffi_logger_apply, %i[], :int32
31
32
  attach_function :fetch_log_buffer, :pactffi_fetch_log_buffer, %i[string], :string
32
33
  end
33
34
  end
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  FfiSpecificationVersion = Hash[
13
14
  'SPECIFICATION_VERSION_UNKNOWN' => 0,
@@ -71,7 +72,7 @@ module PactFfi
71
72
  ]
72
73
 
73
74
  attach_function :contents_get_contents_str, :pactffi_message_contents_get_contents_str, %i[pointer], :string
74
- attach_function :contents_set_contents_str,, :pactffi_message_contents_set_contents_str, %i[pointer string string], :void
75
+ attach_function :contents_set_contents_str, :pactffi_message_contents_set_contents_str, %i[pointer string string], :void
75
76
  attach_function :contents_get_contents_length, :pactffi_message_contents_get_contents_length, %i[pointer], :size_t
76
77
  attach_function :contents_get_contents_bin, :pactffi_message_contents_get_contents_bin, %i[pointer], :pointer
77
78
  attach_function :contents_set_contents_bin, :pactffi_message_contents_set_contents_bin, %i[pointer pointer size_t string], :void
@@ -118,10 +119,11 @@ module PactFfi
118
119
  attach_function :given_with_param, :pactffi_message_given_with_param, %i[uint32_type string string string], :void
119
120
  attach_function :with_contents, :pactffi_message_with_contents, %i[uint32_type string pointer size_t], :void
120
121
  attach_function :with_metadata, :pactffi_message_with_metadata, %i[uint32_type string string], :void
121
- attach_function :rreify, :pactffi_message_reify, %i[uint32_type], :string
122
+ attach_function :reify, :pactffi_message_reify, %i[uint32_type], :string
122
123
  attach_function :write_message_pact_file, :pactffi_write_message_pact_file, %i[uint16 string bool], :int32
123
124
  attach_function :with_message_pact_metadata, :pactffi_with_message_pact_metadata, %i[uint16 string string string], :void
124
125
  attach_function :free_handle, :pactffi_free_message_pact_handle, %i[uint16], :uint32_type
125
126
  attach_function :pact_handle_get_message_iter, :pactffi_pact_handle_get_message_iter, %i[uint16], :pointer
127
+ attach_function :with_metadata_v2, :pactffi_message_with_metadata_v2, %i[uint32_type string string], :void
126
128
  end
127
129
  end
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  FfiSpecificationVersion = Hash[
13
14
  'SPECIFICATION_VERSION_UNKNOWN' => 0,
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  # /*
13
14
  # -1 A null pointer was received
@@ -31,8 +32,8 @@ module PactFfi
31
32
  'RESULT_FAILED' => 1,
32
33
  ]
33
34
 
34
- attach_function :using_plugin, :pactffi_using_plugin, %i[uint16 string string], :uint32_type
35
- attach_function :cleanup_plugins, :pactffi_cleanup_plugins, %i[uint16], :void
35
+ attach_function :using_plugin, :pactffi_using_plugin, %i[pointer string string], :uint32_type
36
+ attach_function :cleanup_plugins, :pactffi_cleanup_plugins, %i[pointer], :void
36
37
  attach_function :interaction_contents, :pactffi_interaction_contents, %i[uint32_type int32 string string],
37
38
  :uint32_type
38
39
  end
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  attach_function :new, :pactffi_sync_http_new, %i[], :pointer
13
14
  attach_function :delete, :pactffi_sync_http_delete, %i[pointer], :void
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
 
12
13
  attach_function :pact_interaction_as_synchronous_message, :pactffi_pact_interaction_as_synchronous_message, %i[pointer], :pointer
13
14
  attach_function :iter_next, :pactffi_pact_sync_message_iter_next, %i[pointer], :pointer
@@ -7,7 +7,8 @@ module PactFfi
7
7
  extend FFI::Library
8
8
  ffi_lib DetectOS.get_bin_path
9
9
 
10
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
10
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
11
+ (typedef :uint32, :uint32_type)
11
12
  FfiSpecificationVersion = Hash[
12
13
  'SPECIFICATION_VERSION_UNKNOWN' => 0,
13
14
  'SPECIFICATION_VERSION_V1' => 1,
@@ -69,6 +70,10 @@ module PactFfi
69
70
  'RESULT_FAILED' => 1,
70
71
  ]
71
72
 
73
+ attach_function :add_text_comment, :pactffi_add_text_comment, %i[uint32_type string], :bool
74
+ attach_function :set_comment, :pactffi_set_comment, %i[uint32_type string string], :bool
75
+ attach_function :set_pending, :pactffi_set_pending, %i[uint32_type bool], :bool
76
+ attach_function :set_key, :pactffi_set_key, %i[uint32_type string], :bool
72
77
  attach_function :match_message, :pactffi_match_message, %i[pointer pointer], :pointer
73
78
  attach_function :mismatches_get_iter, :pactffi_mismatches_get_iter, %i[pointer], :pointer
74
79
  attach_function :mismatches_delete, :pactffi_mismatches_delete, %i[pointer], :void
@@ -139,5 +144,7 @@ module PactFfi
139
144
  attach_function :matches_binary_value, :pactffi_matches_binary_value,
140
145
  %i[pointer pointer ulong_long pointer ulong_long uint8], :string
141
146
  attach_function :matches_json_value, :pactffi_matches_json_value, %i[pointer string string uint8], :string
147
+ attach_function :pact_handle_to_pointer, :pactffi_pact_handle_to_pointer, %i[uint16], :pointer
148
+ attach_function :handle_get_pact_spec_version, :pactffi_handle_get_pact_spec_version, %i[uint16], :int32
142
149
  end
143
150
  end
@@ -9,7 +9,8 @@ module PactFfi
9
9
  module Verifier
10
10
  extend FFI::Library
11
11
  ffi_lib DetectOS.get_bin_path
12
- DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
12
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
13
+ (typedef :uint32, :uint32_type)
13
14
 
14
15
  # /*
15
16
  # * | Error | Description |
@@ -28,11 +29,11 @@ module PactFfi
28
29
  ]
29
30
 
30
31
  attach_function :verify, :pactffi_verify, %i[string], :int32
31
- attach_function :new, :pactffi_verifier_new_for_application, %i[], :pointer
32
+ attach_function :new, :pactffi_verifier_new, %i[], :pointer
32
33
  attach_function :new_for_application, :pactffi_verifier_new_for_application, %i[string string], :pointer
33
34
  attach_function :shutdown, :pactffi_verifier_shutdown, %i[pointer], :void
34
35
  attach_function :set_provider_info, :pactffi_verifier_set_provider_info,
35
- %i[pointer string string string uint16 string], :void
36
+ %i[pointer string string string ushort string], :void
36
37
  attach_function :add_provider_transport, :pactffi_verifier_add_provider_transport,
37
38
  %i[pointer string uint16 string string], :void
38
39
  attach_function :set_filter_info, :pactffi_verifier_set_filter_info, %i[pointer string string uint8], :void
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Version
3
- VERSION = '0.4.7'
3
+ VERSION = '0.4.22.1'
4
4
  end
5
5
  end