speakeasy_ruby_sdk 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/speakeasy_ruby_sdk/http_transaction.rb +3 -0
- data/lib/speakeasy_ruby_sdk/url_utils.rb +2 -3
- data/lib/speakeasy_ruby_sdk/version.rb +1 -1
- data/test/bulk_test.rb +1 -1
- data/test/testdata/captures_basic_request_and_no_response_body_output.json +1 -1
- data/test/testdata/captures_basic_request_and_response_output.json +1 -1
- data/test/testdata/captures_basic_request_and_response_with_different_content_types_output.json +1 -1
- data/test/testdata/captures_basic_request_and_response_with_no_response_header_set_output.json +1 -1
- data/test/testdata/captures_basic_request_with_nano_precision_output.json +1 -1
- data/test/testdata/captures_cookies_output.json +1 -1
- data/test/testdata/captures_masked_request_response_output.json +1 -1
- data/test/testdata/captures_no_response_body_when_not_modified_output.json +1 -1
- data/test/testdata/captures_post_request_with_body_output.json +1 -1
- data/test/testdata/captures_query_params_output.json +1 -1
- data/test/testdata/captures_redirect_output.json +1 -1
- data/test/testdata/drops_request_and_response_bodies_when_request_body_too_large_output.json +1 -1
- data/test/testdata/drops_response_body_when_too_large_output.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52458eafaf072d464efd6dcfb1a6436555a4c59a30921e24125ab148ea8e7db8
|
4
|
+
data.tar.gz: 6b9d9ef098153129e857c28ca9761efdd391457f8bc514315cec0daec049951e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593e43fcfb37052639816096afb005ee78cf8f5162f91027738a0f7352e2301c38af74c37cb242ab04d2b7caab779eb7f2891ac8de16f152acf4ce68bca3a77b
|
7
|
+
data.tar.gz: 31e54cb88d2033c7a65bed54b15687a70e688218d26bd82ebbeb21b236cb2cc7d82320ed4c5ee5dcfc0744d97ce288c2e33eb6ced196d0d9c9d14dde4f15f202
|
@@ -59,6 +59,9 @@ module SpeakeasyRubySdk
|
|
59
59
|
response_cookies = HTTP::CookieJar.new()
|
60
60
|
if response_headers.include? 'set-cookie'
|
61
61
|
cookies = response_headers['set-cookie']
|
62
|
+
if cookies.is_a? String
|
63
|
+
cookies = cookies.split("\n")
|
64
|
+
end
|
62
65
|
cookies.map { |cookie| response_cookies.parse(cookie, unmasked_url) }
|
63
66
|
end
|
64
67
|
|
@@ -12,12 +12,11 @@ module SpeakeasyRubySdk
|
|
12
12
|
request_uri = request_uri.split('?')[0]
|
13
13
|
end
|
14
14
|
scheme = env['rack.url_scheme']
|
15
|
-
host = env['HTTP_HOST']
|
16
15
|
if !query_params.nil? && !query_params.empty?
|
17
16
|
updated_query_string = URI.encode_www_form query_params
|
18
|
-
URI("#{scheme}://#{
|
17
|
+
URI("#{scheme}://#{request_uri}?#{updated_query_string}")
|
19
18
|
else
|
20
|
-
URI("#{scheme}://#{
|
19
|
+
URI("#{scheme}://#{request_uri}")
|
21
20
|
end
|
22
21
|
end
|
23
22
|
end
|
data/test/bulk_test.rb
CHANGED
@@ -54,7 +54,7 @@ class BulkTest < Test::Unit::TestCase
|
|
54
54
|
for pair in file_pairs
|
55
55
|
input = JSON.parse(File.read(pair.infile))
|
56
56
|
puts "Testing #{pair.infile}, #{pair.outfile}"
|
57
|
-
config = {api_id: '123', version_id: '1.0'}
|
57
|
+
config = {api_id: '123', api_key: 'abcd', version_id: '1.0'}
|
58
58
|
|
59
59
|
## Parse Masking Inputs
|
60
60
|
masking = []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: speakeasy_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Bentley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.3.7
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Speakeasy is your API Platform team as a service
|