pact-ffi 0.4.22.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pact/ffi.rb ADDED
@@ -0,0 +1,441 @@
1
+ # require 'pact-ffi/version'
2
+ require 'ffi'
3
+ require 'pact/detect_os'
4
+
5
+ module PactFfi
6
+ extend FFI::Library
7
+ ffi_lib DetectOS.get_bin_path
8
+
9
+ # at least neccessary on x64-mingw-ucrt as uint32_type is undefined
10
+ # also neccessary on linux aarch64 it seems
11
+ # DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type) (typedef :uint32, :uint32_type)
12
+ (typedef :uint32, :uint32_type)
13
+ FfiSpecificationVersion = Hash[
14
+ 'SPECIFICATION_VERSION_UNKNOWN' => 0,
15
+ 'SPECIFICATION_VERSION_V1' => 1,
16
+ 'SPECIFICATION_VERSION_V1_1' => 2,
17
+ 'SPECIFICATION_VERSION_V2' => 3,
18
+ 'SPECIFICATION_VERSION_V3' => 4,
19
+ 'SPECIFICATION_VERSION_V4' => 5,
20
+ ]
21
+ FfiWritePactResponse = Hash[
22
+ 'SUCCESS' => 0,
23
+ 'GENERAL_PANIC' => 1,
24
+ 'UNABLE_TO_WRITE_PACT_FILE' => 2,
25
+ 'MOCK_SERVER_NOT_FOUND' => 3,
26
+ ]
27
+ FfiWriteMessagePactResponse = Hash[
28
+ 'SUCCESS' => 0,
29
+ 'UNABLE_TO_WRITE_PACT_FILE' => 1,
30
+ 'MESSAGE_HANDLE_INVALID' => 2,
31
+ 'MOCK_SERVER_NOT_FOUND' => 3,
32
+ ]
33
+ FfiConfigurePluginResponse = Hash[
34
+ 'SUCCESS' => 0,
35
+ 'GENERAL_PANIC' => 1,
36
+ 'FAILED_TO_LOAD_PLUGIN' => 2,
37
+ 'PACT_HANDLE_INVALID' => 3,
38
+ ]
39
+ FfiPluginInteractionResponse = Hash[
40
+ 'SUCCESS' => 0,
41
+ 'A_GENERAL_PANIC_WAS_CAUGHT' => 1,
42
+ 'MOCK_SERVER_HAS_ALREADY_BEEN_STARTED' => 2,
43
+ 'INTERACTION_HANDLE_IS_INVALID' => 3,
44
+ 'CONTENT_TYPE_IS_NOT_VALID' => 4,
45
+ 'CONTENTS_JSON_IS_NOT_VALID_JSON' => 5,
46
+ 'PLUGIN_RETURNED_AN_ERROR' => 6,
47
+ ]
48
+ FfiInteractionPart = Hash[
49
+ 'INTERACTION_PART_REQUEST' => 0,
50
+ 'INTERACTION_PART_RESPONSE' => 1,
51
+ ]
52
+ # /*
53
+ # -1 A null pointer was received
54
+ # -2 The pact JSON could not be parsed
55
+ # -3 The mock server could not be started
56
+ # -4 The method panicked
57
+ # -5 The address is not valid
58
+ # -6 Could not create the TLS configuration with the self-signed certificate
59
+ # */
60
+ FfiPluginCreateMockServerErrors = Hash[
61
+ 'NULL_POINTER' => -1,
62
+ 'JSON_PARSE_ERROR' => -2,
63
+ 'MOCK_SERVER_START_FAIL' => -3,
64
+ 'CORE_PANIC' => -4,
65
+ 'ADDRESS_NOT_VALID' => -5,
66
+ 'TLS_CONFIG' => -6,
67
+ ]
68
+ # /*
69
+ # * | Error | Description |
70
+ # * |-------|-------------|
71
+ # * | 1 | The verification process failed, see output for errors |
72
+ # * | 2 | A null pointer was received |
73
+ # * | 3 | The method panicked |
74
+ # * | 4 | Invalid arguments were provided to the verification process |
75
+ # */
76
+ FfiVerifyProviderResponse = Hash[
77
+ 'VERIFICATION_SUCCESSFUL' => 0,
78
+ 'VERIFICATION_FAILED' => 1,
79
+ 'NULL_POINTER_RECEIVED' => 2,
80
+ 'METHOD_PANICKED' => 3,
81
+ 'INVALID_ARGUMENTS' => 4,
82
+ ]
83
+
84
+ FfiPluginFunctionResult = Hash[
85
+ 'RESULT_OK' => 0,
86
+ 'RESULT_FAILED' => 1,
87
+ ]
88
+
89
+ FfiLogLevelFilter = Hash[
90
+ 'LOG_LEVEL_OFF' => 0,
91
+ 'LOG_LEVEL_ERROR' => 1,
92
+ 'LOG_LEVEL_WARN' => 2,
93
+ 'LOG_LEVEL_INFO' => 3,
94
+ 'LOG_LEVEL_DEBUG' => 4,
95
+ 'LOG_LEVEL_TRACE' => 5
96
+ ]
97
+ FfiLogLevel = Hash[
98
+ 'LOG_LEVEL_OFF' => 'OFF',
99
+ 'LOG_LEVEL_ERROR' => 'ERROR',
100
+ 'LOG_LEVEL_WARN' => 'WARN',
101
+ 'LOG_LEVEL_INFO' => 'INFO',
102
+ 'LOG_LEVEL_DEBUG' => 'DEBUG',
103
+ 'LOG_LEVEL_TRACE' => 'TRACE'
104
+ ]
105
+
106
+ # These bork on windows not sure they they are added in
107
+ # as part of deno-bindgen, maybe the include headers
108
+ # attach_function :malloc, %i[size_t], :pointer
109
+ # attach_function :calloc, %i[size_t size_t], :pointer
110
+ # attach_function :realloc, %i[pointer size_t], :pointer
111
+ # attach_function :free, %i[pointer], :void
112
+ # attach_function :posix_memalign, %i[pointer size_t size_t], :int32
113
+ # attach_function :abort, %i[], :void
114
+ # attach_function :getenv, %i[string], :string
115
+ # attach_function :realpath, %i[string string], :string
116
+
117
+ attach_function :version, :pactffi_version, %i[], :string
118
+ attach_function :init, :pactffi_init, %i[string], :void
119
+ attach_function :init_with_log_level, :pactffi_init_with_log_level, %i[string], :void
120
+ attach_function :enable_ansi_support, :pactffi_enable_ansi_support, %i[], :void
121
+ attach_function :log_message, :pactffi_log_message, %i[string string string], :void
122
+ attach_function :match_message, :pactffi_match_message, %i[pointer pointer], :pointer
123
+ attach_function :mismatches_get_iter, :pactffi_mismatches_get_iter, %i[pointer], :pointer
124
+ attach_function :mismatches_delete, :pactffi_mismatches_delete, %i[pointer], :void
125
+ attach_function :mismatches_iter_next, :pactffi_mismatches_iter_next, %i[pointer], :pointer
126
+ attach_function :mismatches_iter_delete, :pactffi_mismatches_iter_delete, %i[pointer], :void
127
+ attach_function :mismatch_to_json, :pactffi_mismatch_to_json, %i[pointer], :string
128
+ attach_function :mismatch_type, :pactffi_mismatch_type, %i[pointer], :string
129
+ attach_function :mismatch_summary, :pactffi_mismatch_summary, %i[pointer], :string
130
+ attach_function :mismatch_description, :pactffi_mismatch_description, %i[pointer], :string
131
+ attach_function :mismatch_ansi_description, :pactffi_mismatch_ansi_description, %i[pointer], :string
132
+ attach_function :get_error_message, :pactffi_get_error_message, %i[string int32], :int32
133
+ attach_function :log_to_stdout, :pactffi_log_to_stdout, %i[int32], :int32
134
+ attach_function :log_to_stderr, :pactffi_log_to_stderr, %i[int32], :int32
135
+ attach_function :log_to_file, :pactffi_log_to_file, %i[string int32], :int32
136
+ attach_function :log_to_buffer, :pactffi_log_to_buffer, %i[int32], :int32
137
+ attach_function :logger_init, :pactffi_logger_init, %i[], :void
138
+ attach_function :logger_attach_sink, :pactffi_logger_attach_sink, %i[string int32], :int32
139
+ attach_function :logger_apply, :pactffi_logger_apply, %i[], :int32
140
+ attach_function :fetch_log_buffer, :pactffi_fetch_log_buffer, %i[string], :string
141
+ attach_function :parse_pact_json, :pactffi_parse_pact_json, %i[string], :pointer
142
+ attach_function :pact_model_delete, :pactffi_pact_model_delete, %i[pointer], :void
143
+ attach_function :pact_model_interaction_iterator, :pactffi_pact_model_interaction_iterator, %i[pointer], :pointer
144
+ attach_function :pact_spec_version, :pactffi_pact_spec_version, %i[pointer], :int32
145
+ attach_function :pact_interaction_delete, :pactffi_pact_interaction_delete, %i[pointer], :void
146
+ attach_function :async_message_new, :pactffi_async_message_new, %i[], :pointer
147
+ attach_function :async_message_delete, :pactffi_async_message_delete, %i[pointer], :void
148
+ attach_function :async_message_get_contents, :pactffi_async_message_get_contents, %i[pointer], :pointer
149
+ attach_function :async_message_get_contents_str, :pactffi_async_message_get_contents_str, %i[pointer], :string
150
+ attach_function :async_message_set_contents_str, :pactffi_async_message_set_contents_str, %i[pointer string string],
151
+ :void
152
+ attach_function :async_message_get_contents_length, :pactffi_async_message_get_contents_length, %i[pointer], :size_t
153
+ attach_function :async_message_get_contents_bin, :pactffi_async_message_get_contents_bin, %i[pointer], :pointer
154
+ attach_function :async_message_set_contents_bin, :pactffi_async_message_set_contents_bin,
155
+ %i[pointer pointer size_t string], :void
156
+ attach_function :async_message_get_description, :pactffi_async_message_get_description, %i[pointer], :string
157
+ attach_function :async_message_set_description, :pactffi_async_message_set_description, %i[pointer string], :int32
158
+ attach_function :async_message_get_provider_state, :pactffi_async_message_get_provider_state,
159
+ %i[pointer uint32_type], :pointer
160
+ attach_function :async_message_get_provider_state_iter, :pactffi_async_message_get_provider_state_iter, %i[pointer],
161
+ :pointer
162
+ attach_function :consumer_get_name, :pactffi_consumer_get_name, %i[pointer], :string
163
+ attach_function :pact_get_consumer, :pactffi_pact_get_consumer, %i[pointer], :pointer
164
+ attach_function :pact_consumer_delete, :pactffi_pact_consumer_delete, %i[pointer], :void
165
+ attach_function :message_contents_get_contents_str, :pactffi_message_contents_get_contents_str, %i[pointer], :string
166
+ attach_function :message_contents_set_contents_str, :pactffi_message_contents_set_contents_str,
167
+ %i[pointer string string], :void
168
+ attach_function :message_contents_get_contents_length, :pactffi_message_contents_get_contents_length, %i[pointer],
169
+ :size_t
170
+ attach_function :message_contents_get_contents_bin, :pactffi_message_contents_get_contents_bin, %i[pointer], :pointer
171
+ attach_function :message_contents_set_contents_bin, :pactffi_message_contents_set_contents_bin,
172
+ %i[pointer pointer size_t string], :void
173
+ attach_function :message_contents_get_metadata_iter, :pactffi_message_contents_get_metadata_iter, %i[pointer],
174
+ :pointer
175
+ attach_function :message_contents_get_matching_rule_iter, :pactffi_message_contents_get_matching_rule_iter,
176
+ %i[pointer int32], :pointer
177
+ attach_function :request_contents_get_matching_rule_iter, :pactffi_request_contents_get_matching_rule_iter,
178
+ %i[pointer int32], :pointer
179
+ attach_function :response_contents_get_matching_rule_iter, :pactffi_response_contents_get_matching_rule_iter,
180
+ %i[pointer int32], :pointer
181
+ attach_function :message_contents_get_generators_iter, :pactffi_message_contents_get_generators_iter,
182
+ %i[pointer int32], :pointer
183
+ attach_function :request_contents_get_generators_iter, :pactffi_request_contents_get_generators_iter,
184
+ %i[pointer int32], :pointer
185
+ attach_function :response_contents_get_generators_iter, :pactffi_response_contents_get_generators_iter,
186
+ %i[pointer int32], :pointer
187
+ attach_function :parse_matcher_definition, :pactffi_parse_matcher_definition, %i[string], :pointer
188
+ attach_function :matcher_definition_error, :pactffi_matcher_definition_error, %i[pointer], :string
189
+ attach_function :matcher_definition_value, :pactffi_matcher_definition_value, %i[pointer], :string
190
+ attach_function :matcher_definition_delete, :pactffi_matcher_definition_delete, %i[pointer], :void
191
+ attach_function :matcher_definition_generator, :pactffi_matcher_definition_generator, %i[pointer], :pointer
192
+ attach_function :matcher_definition_value_type, :pactffi_matcher_definition_value_type, %i[pointer], :int32
193
+ attach_function :matching_rule_iter_delete, :pactffi_matching_rule_iter_delete, %i[pointer], :void
194
+ attach_function :matcher_definition_iter, :pactffi_matcher_definition_iter, %i[pointer], :pointer
195
+ attach_function :matching_rule_iter_next, :pactffi_matching_rule_iter_next, %i[pointer], :pointer
196
+ attach_function :matching_rule_id, :pactffi_matching_rule_id, %i[pointer], :uint16
197
+ attach_function :matching_rule_value, :pactffi_matching_rule_value, %i[pointer], :string
198
+ attach_function :matching_rule_pointer, :pactffi_matching_rule_pointer, %i[pointer], :pointer
199
+ attach_function :matching_rule_reference_name, :pactffi_matching_rule_reference_name, %i[pointer], :string
200
+ attach_function :validate_datetime, :pactffi_validate_datetime, %i[string string], :int32
201
+ attach_function :generator_to_json, :pactffi_generator_to_json, %i[pointer], :string
202
+ attach_function :generator_generate_string, :pactffi_generator_generate_string, %i[pointer string], :string
203
+ attach_function :generator_generate_integer, :pactffi_generator_generate_integer, %i[pointer string], :uint16
204
+ attach_function :generators_iter_delete, :pactffi_generators_iter_delete, %i[pointer], :void
205
+ attach_function :generators_iter_next, :pactffi_generators_iter_next, %i[pointer], :pointer
206
+ attach_function :generators_iter_pair_delete, :pactffi_generators_iter_pair_delete, %i[pointer], :void
207
+ attach_function :sync_http_new, :pactffi_sync_http_new, %i[], :pointer
208
+ attach_function :sync_http_delete, :pactffi_sync_http_delete, %i[pointer], :void
209
+ attach_function :sync_http_get_request, :pactffi_sync_http_get_request, %i[pointer], :pointer
210
+ attach_function :sync_http_get_request_contents, :pactffi_sync_http_get_request_contents, %i[pointer], :string
211
+ attach_function :sync_http_set_request_contents, :pactffi_sync_http_set_request_contents, %i[pointer string string],
212
+ :void
213
+ attach_function :sync_http_get_request_contents_length, :pactffi_sync_http_get_request_contents_length, %i[pointer],
214
+ :size_t
215
+ attach_function :sync_http_get_request_contents_bin, :pactffi_sync_http_get_request_contents_bin, %i[pointer],
216
+ :pointer
217
+ attach_function :sync_http_set_request_contents_bin, :pactffi_sync_http_set_request_contents_bin,
218
+ %i[pointer pointer size_t string], :void
219
+ attach_function :sync_http_get_response, :pactffi_sync_http_get_response, %i[pointer], :pointer
220
+ attach_function :sync_http_get_response_contents, :pactffi_sync_http_get_response_contents, %i[pointer], :string
221
+ attach_function :sync_http_set_response_contents, :pactffi_sync_http_set_response_contents,
222
+ %i[pointer string string], :void
223
+ attach_function :sync_http_get_response_contents_length, :pactffi_sync_http_get_response_contents_length,
224
+ %i[pointer], :size_t
225
+ attach_function :sync_http_get_response_contents_bin, :pactffi_sync_http_get_response_contents_bin, %i[pointer],
226
+ :pointer
227
+ attach_function :sync_http_set_response_contents_bin, :pactffi_sync_http_set_response_contents_bin,
228
+ %i[pointer pointer size_t string], :void
229
+ attach_function :sync_http_get_description, :pactffi_sync_http_get_description, %i[pointer], :string
230
+ attach_function :sync_http_set_description, :pactffi_sync_http_set_description, %i[pointer string], :int32
231
+ attach_function :sync_http_get_provider_state, :pactffi_sync_http_get_provider_state, %i[pointer uint32_type],
232
+ :pointer
233
+ attach_function :sync_http_get_provider_state_iter, :pactffi_sync_http_get_provider_state_iter, %i[pointer], :pointer
234
+ attach_function :pact_interaction_as_synchronous_http, :pactffi_pact_interaction_as_synchronous_http, %i[pointer],
235
+ :pointer
236
+ attach_function :pact_interaction_as_message, :pactffi_pact_interaction_as_message, %i[pointer], :pointer
237
+ attach_function :pact_interaction_as_asynchronous_message, :pactffi_pact_interaction_as_asynchronous_message,
238
+ %i[pointer], :pointer
239
+ attach_function :pact_interaction_as_synchronous_message, :pactffi_pact_interaction_as_synchronous_message,
240
+ %i[pointer], :pointer
241
+ attach_function :pact_message_iter_delete, :pactffi_pact_message_iter_delete, %i[pointer], :void
242
+ attach_function :pact_message_iter_next, :pactffi_pact_message_iter_next, %i[pointer], :pointer
243
+ attach_function :pact_sync_message_iter_next, :pactffi_pact_sync_message_iter_next, %i[pointer], :pointer
244
+ attach_function :pact_sync_message_iter_delete, :pactffi_pact_sync_message_iter_delete, %i[pointer], :void
245
+ attach_function :pact_sync_http_iter_next, :pactffi_pact_sync_http_iter_next, %i[pointer], :pointer
246
+ attach_function :pact_sync_http_iter_delete, :pactffi_pact_sync_http_iter_delete, %i[pointer], :void
247
+ attach_function :pact_interaction_iter_next, :pactffi_pact_interaction_iter_next, %i[pointer], :pointer
248
+ attach_function :pact_interaction_iter_delete, :pactffi_pact_interaction_iter_delete, %i[pointer], :void
249
+ attach_function :matching_rule_to_json, :pactffi_matching_rule_to_json, %i[pointer], :string
250
+ attach_function :matching_rules_iter_delete, :pactffi_matching_rules_iter_delete, %i[pointer], :void
251
+ attach_function :matching_rules_iter_next, :pactffi_matching_rules_iter_next, %i[pointer], :pointer
252
+ attach_function :matching_rules_iter_pair_delete, :pactffi_matching_rules_iter_pair_delete, %i[pointer], :void
253
+ attach_function :message_new, :pactffi_message_new, %i[], :pointer
254
+ attach_function :message_new_from_json, :pactffi_message_new_from_json, %i[uint32_type string int32], :pointer
255
+ attach_function :message_new_from_body, :pactffi_message_new_from_body, %i[string string], :pointer
256
+ attach_function :message_delete, :pactffi_message_delete, %i[pointer], :void
257
+ attach_function :message_get_contents, :pactffi_message_get_contents, %i[pointer], :string
258
+ attach_function :message_set_contents, :pactffi_message_set_contents, %i[pointer string string], :void
259
+ attach_function :message_get_contents_length, :pactffi_message_get_contents_length, %i[pointer], :size_t
260
+ attach_function :message_get_contents_bin, :pactffi_message_get_contents_bin, %i[pointer], :pointer
261
+ attach_function :message_set_contents_bin, :pactffi_message_set_contents_bin, %i[pointer pointer size_t string], :void
262
+ attach_function :message_get_description, :pactffi_message_get_description, %i[pointer], :string
263
+ attach_function :message_set_description, :pactffi_message_set_description, %i[pointer string], :int32
264
+ attach_function :message_get_provider_state, :pactffi_message_get_provider_state, %i[pointer uint32_type], :pointer
265
+ attach_function :message_get_provider_state_iter, :pactffi_message_get_provider_state_iter, %i[pointer], :pointer
266
+ attach_function :provider_state_iter_next, :pactffi_provider_state_iter_next, %i[pointer], :pointer
267
+ attach_function :provider_state_iter_delete, :pactffi_provider_state_iter_delete, %i[pointer], :void
268
+ attach_function :message_find_metadata, :pactffi_message_find_metadata, %i[pointer string], :string
269
+ attach_function :message_insert_metadata, :pactffi_message_insert_metadata, %i[pointer string string], :int32
270
+ attach_function :message_metadata_iter_next, :pactffi_message_metadata_iter_next, %i[pointer], :pointer
271
+ attach_function :message_get_metadata_iter, :pactffi_message_get_metadata_iter, %i[pointer], :pointer
272
+ attach_function :message_metadata_iter_delete, :pactffi_message_metadata_iter_delete, %i[pointer], :void
273
+ attach_function :message_metadata_pair_delete, :pactffi_message_metadata_pair_delete, %i[pointer], :void
274
+ attach_function :message_pact_new_from_json, :pactffi_message_pact_new_from_json, %i[string string], :pointer
275
+ attach_function :message_pact_delete, :pactffi_message_pact_delete, %i[pointer], :void
276
+ attach_function :message_pact_get_consumer, :pactffi_message_pact_get_consumer, %i[pointer], :pointer
277
+ attach_function :message_pact_get_provider, :pactffi_message_pact_get_provider, %i[pointer], :pointer
278
+ attach_function :message_pact_get_message_iter, :pactffi_message_pact_get_message_iter, %i[pointer], :pointer
279
+ attach_function :message_pact_message_iter_next, :pactffi_message_pact_message_iter_next, %i[pointer], :pointer
280
+ attach_function :message_pact_message_iter_delete, :pactffi_message_pact_message_iter_delete, %i[pointer], :void
281
+ attach_function :message_pact_find_metadata, :pactffi_message_pact_find_metadata, %i[pointer string string], :string
282
+ attach_function :message_pact_get_metadata_iter, :pactffi_message_pact_get_metadata_iter, %i[pointer], :pointer
283
+ attach_function :message_pact_metadata_iter_next, :pactffi_message_pact_metadata_iter_next, %i[pointer], :pointer
284
+ attach_function :message_pact_metadata_iter_delete, :pactffi_message_pact_metadata_iter_delete, %i[pointer], :void
285
+ attach_function :message_pact_metadata_triple_delete, :pactffi_message_pact_metadata_triple_delete, %i[pointer], :void
286
+ attach_function :provider_get_name, :pactffi_provider_get_name, %i[pointer], :string
287
+ attach_function :pact_get_provider, :pactffi_pact_get_provider, %i[pointer], :pointer
288
+ attach_function :pact_provider_delete, :pactffi_pact_provider_delete, %i[pointer], :void
289
+ attach_function :provider_state_get_name, :pactffi_provider_state_get_name, %i[pointer], :string
290
+ attach_function :provider_state_get_param_iter, :pactffi_provider_state_get_param_iter, %i[pointer], :pointer
291
+ attach_function :provider_state_param_iter_next, :pactffi_provider_state_param_iter_next, %i[pointer], :pointer
292
+ attach_function :provider_state_delete, :pactffi_provider_state_delete, %i[pointer], :void
293
+ attach_function :provider_state_param_iter_delete, :pactffi_provider_state_param_iter_delete, %i[pointer], :void
294
+ attach_function :provider_state_param_pair_delete, :pactffi_provider_state_param_pair_delete, %i[pointer], :void
295
+ attach_function :sync_message_new, :pactffi_sync_message_new, %i[], :pointer
296
+ attach_function :sync_message_delete, :pactffi_sync_message_delete, %i[pointer], :void
297
+ attach_function :sync_message_get_request_contents_str, :pactffi_sync_message_get_request_contents_str, %i[pointer],
298
+ :string
299
+ attach_function :sync_message_set_request_contents_str, :pactffi_sync_message_set_request_contents_str,
300
+ %i[pointer string string], :void
301
+ attach_function :sync_message_get_request_contents_length, :pactffi_sync_message_get_request_contents_length,
302
+ %i[pointer], :size_t
303
+ attach_function :sync_message_get_request_contents_bin, :pactffi_sync_message_get_request_contents_bin, %i[pointer],
304
+ :pointer
305
+ attach_function :sync_message_set_request_contents_bin, :pactffi_sync_message_set_request_contents_bin,
306
+ %i[pointer pointer size_t string], :void
307
+ attach_function :sync_message_get_request_contents, :pactffi_sync_message_get_request_contents, %i[pointer], :pointer
308
+ attach_function :sync_message_get_number_responses, :pactffi_sync_message_get_number_responses, %i[pointer], :size_t
309
+ attach_function :sync_message_get_response_contents_str, :pactffi_sync_message_get_response_contents_str,
310
+ %i[pointer size_t], :string
311
+ attach_function :sync_message_set_response_contents_str, :pactffi_sync_message_set_response_contents_str,
312
+ %i[pointer size_t string string], :void
313
+ attach_function :sync_message_get_response_contents_length, :pactffi_sync_message_get_response_contents_length,
314
+ %i[pointer size_t], :size_t
315
+ attach_function :sync_message_get_response_contents_bin, :pactffi_sync_message_get_response_contents_bin,
316
+ %i[pointer size_t], :pointer
317
+ attach_function :sync_message_set_response_contents_bin, :pactffi_sync_message_set_response_contents_bin,
318
+ %i[pointer size_t pointer size_t string], :void
319
+ attach_function :sync_message_get_response_contents, :pactffi_sync_message_get_response_contents, %i[pointer size_t],
320
+ :pointer
321
+ attach_function :sync_message_get_description, :pactffi_sync_message_get_description, %i[pointer], :string
322
+ attach_function :sync_message_set_description, :pactffi_sync_message_set_description, %i[pointer string], :int32
323
+ attach_function :sync_message_get_provider_state, :pactffi_sync_message_get_provider_state, %i[pointer uint32_type],
324
+ :pointer
325
+ attach_function :sync_message_get_provider_state_iter, :pactffi_sync_message_get_provider_state_iter, %i[pointer],
326
+ :pointer
327
+ attach_function :string_delete, :pactffi_string_delete, %i[string], :void
328
+ attach_function :create_mock_server, :pactffi_create_mock_server, %i[string string bool], :int32
329
+ attach_function :get_tls_ca_certificate, :pactffi_get_tls_ca_certificate, %i[], :string
330
+ attach_function :create_mock_server_for_pact, :pactffi_create_mock_server_for_pact, %i[uint16 string bool], :int32
331
+ attach_function :create_mock_server_for_transport, :pactffi_create_mock_server_for_transport,
332
+ %i[uint16 string uint16 string string], :int32
333
+ attach_function :mock_server_matched, :pactffi_mock_server_matched, %i[int32], :bool
334
+ attach_function :mock_server_mismatches, :pactffi_mock_server_mismatches, %i[int32], :string
335
+ attach_function :cleanup_mock_server, :pactffi_cleanup_mock_server, %i[int32], :bool
336
+ attach_function :write_pact_file, :pactffi_write_pact_file, %i[int32 string bool], :int32
337
+ attach_function :mock_server_logs, :pactffi_mock_server_logs, %i[int32], :string
338
+ attach_function :generate_datetime_string, :pactffi_generate_datetime_string, %i[string], :pointer
339
+ attach_function :check_regex, :pactffi_check_regex, %i[string string], :bool
340
+ attach_function :generate_regex_value, :pactffi_generate_regex_value, %i[string], :pointer
341
+ attach_function :free_string, :pactffi_free_string, %i[string], :void
342
+ attach_function :new_pact, :pactffi_new_pact, %i[string string], :uint16
343
+ attach_function :new_interaction, :pactffi_new_interaction, %i[uint16 string], :uint32_type
344
+ attach_function :new_message_interaction, :pactffi_new_message_interaction, %i[uint16 string], :uint32_type
345
+ attach_function :new_sync_message_interaction, :pactffi_new_sync_message_interaction, %i[uint16 string], :uint32_type
346
+ attach_function :upon_receiving, :pactffi_upon_receiving, %i[uint32_type string], :bool
347
+ attach_function :given, :pactffi_given, %i[uint32_type string], :bool
348
+ attach_function :given_with_params, :pactffi_given_with_params, %i[uint32_type string string], :int32
349
+ attach_function :interaction_test_name, :pactffi_interaction_test_name, %i[uint32_type string], :uint32_type
350
+ attach_function :given_with_param, :pactffi_given_with_param, %i[uint32_type string string string], :bool
351
+ attach_function :with_request, :pactffi_with_request, %i[uint32_type string string], :bool
352
+ attach_function :with_query_parameter, :pactffi_with_query_parameter, %i[uint32_type string size_t string], :bool
353
+ attach_function :with_query_parameter_v2, :pactffi_with_query_parameter_v2, %i[uint32_type string size_t string],
354
+ :bool
355
+ attach_function :with_specification, :pactffi_with_specification, %i[uint16 int32], :bool
356
+ attach_function :with_pact_metadata, :pactffi_with_pact_metadata, %i[uint16 string string string], :bool
357
+ attach_function :with_header, :pactffi_with_header, %i[uint32_type int32 string size_t string], :bool
358
+ attach_function :with_header_v2, :pactffi_with_header_v2, %i[uint32_type int32 string size_t string], :bool
359
+ attach_function :response_status, :pactffi_response_status, %i[uint32_type uint16], :bool
360
+ attach_function :with_body, :pactffi_with_body, %i[uint32_type int32 string string], :bool
361
+ attach_function :with_binary_file, :pactffi_with_binary_file, %i[uint32_type int32 string pointer size_t], :bool
362
+ attach_function :with_multipart_file, :pactffi_with_multipart_file, %i[uint32_type int32 string string string],
363
+ :pointer
364
+ attach_function :pact_handle_get_message_iter, :pactffi_pact_handle_get_message_iter, %i[uint16], :pointer
365
+ attach_function :pact_handle_get_sync_message_iter, :pactffi_pact_handle_get_sync_message_iter, %i[uint16], :pointer
366
+ attach_function :pact_handle_get_sync_http_iter, :pactffi_pact_handle_get_sync_http_iter, %i[uint16], :pointer
367
+ attach_function :new_message_pact, :pactffi_new_message_pact, %i[string string], :uint16
368
+ attach_function :new_message, :pactffi_new_message, %i[uint16 string], :uint32_type
369
+ attach_function :message_expects_to_receive, :pactffi_message_expects_to_receive, %i[uint32_type string], :void
370
+ attach_function :message_given, :pactffi_message_given, %i[uint32_type string], :void
371
+ attach_function :message_given_with_param, :pactffi_message_given_with_param, %i[uint32_type string string string],
372
+ :void
373
+ attach_function :message_with_contents, :pactffi_message_with_contents, %i[uint32_type string pointer size_t], :void
374
+ attach_function :message_with_metadata, :pactffi_message_with_metadata, %i[uint32_type string string], :void
375
+ attach_function :message_with_metadata_v2, :pactffi_message_with_metadata_v2, %i[uint32_type string string], :void
376
+ attach_function :with_metadata, :pactffi_with_metadata, %i[uint32_type string string int], :void
377
+ attach_function :message_reify, :pactffi_message_reify, %i[uint32_type], :string
378
+ attach_function :write_message_pact_file, :pactffi_write_message_pact_file, %i[uint16 string bool], :int32
379
+ attach_function :with_message_pact_metadata, :pactffi_with_message_pact_metadata, %i[uint16 string string string],
380
+ :void
381
+ attach_function :pact_handle_write_file, :pactffi_pact_handle_write_file, %i[uint16 string bool], :int32
382
+ attach_function :new_async_message, :pactffi_new_async_message, %i[uint16 string], :uint32_type
383
+ attach_function :free_pact_handle, :pactffi_free_pact_handle, %i[uint16], :uint32_type
384
+ attach_function :free_message_pact_handle, :pactffi_free_message_pact_handle, %i[uint16], :uint32_type
385
+ attach_function :verify, :pactffi_verify, %i[string], :int32
386
+ attach_function :verifier_new, :pactffi_verifier_new, %i[], :pointer
387
+ attach_function :verifier_new_for_application, :pactffi_verifier_new_for_application, %i[string string], :pointer
388
+ attach_function :verifier_shutdown, :pactffi_verifier_shutdown, %i[pointer], :void
389
+ attach_function :verifier_set_provider_info, :pactffi_verifier_set_provider_info,
390
+ %i[pointer string string string ushort string], :void
391
+ attach_function :verifier_add_provider_transport, :pactffi_verifier_add_provider_transport,
392
+ %i[pointer string uint16 string string], :void
393
+ attach_function :verifier_set_filter_info, :pactffi_verifier_set_filter_info, %i[pointer string string uint8], :void
394
+ attach_function :verifier_set_provider_state, :pactffi_verifier_set_provider_state, %i[pointer string uint8 uint8],
395
+ :void
396
+ attach_function :verifier_set_verification_options, :pactffi_verifier_set_verification_options,
397
+ %i[pointer uint8 ulong_long], :int32
398
+ attach_function :verifier_set_coloured_output, :pactffi_verifier_set_coloured_output, %i[pointer uint8], :int32
399
+ attach_function :verifier_set_no_pacts_is_error, :pactffi_verifier_set_no_pacts_is_error, %i[pointer uint8], :int32
400
+ attach_function :verifier_set_publish_options, :pactffi_verifier_set_publish_options,
401
+ %i[pointer string string pointer uint16 string], :int32
402
+ attach_function :verifier_set_consumer_filters, :pactffi_verifier_set_consumer_filters, %i[pointer pointer uint16],
403
+ :void
404
+ attach_function :verifier_add_custom_header, :pactffi_verifier_add_custom_header, %i[pointer string string], :void
405
+ attach_function :verifier_add_file_source, :pactffi_verifier_add_file_source, %i[pointer string], :void
406
+ attach_function :verifier_add_directory_source, :pactffi_verifier_add_directory_source, %i[pointer string], :void
407
+ attach_function :verifier_url_source, :pactffi_verifier_url_source, %i[pointer string string string string], :void
408
+ attach_function :verifier_broker_source, :pactffi_verifier_broker_source, %i[pointer string string string string],
409
+ :void
410
+ attach_function :verifier_broker_source_with_selectors, :pactffi_verifier_broker_source_with_selectors,
411
+ %i[pointer string string string string uint8 string pointer uint16 string pointer uint16 pointer uint16], :void
412
+ attach_function :verifier_execute, :pactffi_verifier_execute, %i[pointer], :int32
413
+ attach_function :verifier_cli_args, :pactffi_verifier_cli_args, %i[], :string
414
+ attach_function :verifier_logs, :pactffi_verifier_logs, %i[pointer], :string
415
+ attach_function :verifier_logs_for_provider, :pactffi_verifier_logs_for_provider, %i[string], :string
416
+ attach_function :verifier_output, :pactffi_verifier_output, %i[pointer uint8], :string
417
+ attach_function :verifier_json, :pactffi_verifier_json, %i[pointer], :string
418
+ attach_function :using_plugin, :pactffi_using_plugin, %i[uint16 string string], :uint32_type
419
+ attach_function :cleanup_plugins, :pactffi_cleanup_plugins, %i[uint16], :void
420
+ attach_function :interaction_contents, :pactffi_interaction_contents, %i[uint32_type int32 string string],
421
+ :uint32_type
422
+ attach_function :matches_string_value, :pactffi_matches_string_value, %i[pointer string string uint8], :string
423
+ attach_function :matches_u64_value, :pactffi_matches_u64_value, %i[pointer ulong_long ulong_long uint8], :string
424
+ attach_function :matches_i64_value, :pactffi_matches_i64_value, %i[pointer int64 int64 uint8], :string
425
+ attach_function :matches_f64_value, :pactffi_matches_f64_value, %i[pointer double double uint8], :string
426
+ attach_function :matches_bool_value, :pactffi_matches_bool_value, %i[pointer uint8 uint8 uint8], :string
427
+ attach_function :matches_binary_value, :pactffi_matches_binary_value,
428
+ %i[pointer pointer ulong_long pointer ulong_long uint8], :string
429
+ attach_function :matches_json_value, :pactffi_matches_json_value, %i[pointer string string uint8], :string
430
+ attach_function :pact_handle_to_pointer, :pactffi_pact_handle_to_pointer, %i[uint16], :pointer
431
+ attach_function :handle_get_pact_spec_version, :pactffi_handle_get_pact_spec_version, %i[uint16], :int32
432
+ attach_function :with_multipart_file, :pactffi_with_multipart_file, %i[uint32_type int32 string string string],
433
+ :pointer
434
+ attach_function :set_header, :pactffi_set_header, %i[uint32_type int32 string string], :bool
435
+ attach_function :with_binary_body, :pactffi_with_binary_body, %i[uint32_type int32 string pointer size_t], :bool
436
+ attach_function :with_matching_rules, :pactffi_with_matching_rules, %i[uint32_type int32 string], :bool
437
+ attach_function :with_multipart_file_v2, :pactffi_with_multipart_file_v2,
438
+ %i[uint32_type int32 string string string string], :pointer
439
+ attach_function :message_with_metadata_v2, :pactffi_message_with_metadata_v2, %i[uint32_type string string], :void
440
+ attach_function :with_generators, :pactffi_with_generators, %i[uint32_type int string], :bool
441
+ end
metadata ADDED
@@ -0,0 +1,161 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pact-ffi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.22.2
5
+ platform: x64-mingw32
6
+ authors:
7
+ - Yousaf Nabi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cucumber
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '9.2'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '9.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: httparty
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.21.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.21.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.16'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.16'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webrick
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.8'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: ffi
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.15'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.15'
111
+ description: Enables consumer driven contract testing, providing a mock service and
112
+ DSL for the consumer project, and interaction playback and verification for the
113
+ service provider project.
114
+ email:
115
+ - you@saf.dev
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - LICENSE.txt
121
+ - README.md
122
+ - bin/console
123
+ - bin/setup
124
+ - ffi/windows-x64/pact_ffi.dll
125
+ - lib/pact/detect_os.rb
126
+ - lib/pact/ffi.rb
127
+ - lib/pact/ffi/async_message_pact.rb
128
+ - lib/pact/ffi/http_consumer.rb
129
+ - lib/pact/ffi/logger.rb
130
+ - lib/pact/ffi/message_consumer.rb
131
+ - lib/pact/ffi/mock_server.rb
132
+ - lib/pact/ffi/plugin_consumer.rb
133
+ - lib/pact/ffi/sync_http_consumer.rb
134
+ - lib/pact/ffi/sync_message_consumer.rb
135
+ - lib/pact/ffi/utils.rb
136
+ - lib/pact/ffi/verifier.rb
137
+ - lib/pact/ffi/version.rb
138
+ homepage: https://github.com/you54f/pact-ffi
139
+ licenses:
140
+ - MIT
141
+ metadata: {}
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ requirements: []
157
+ rubygems_version: 3.5.11
158
+ signing_key:
159
+ specification_version: 4
160
+ summary: Pact Reference FFI libpact_ffi library wrapper
161
+ test_files: []