speakeasy_ruby_sdk 0.0.2 → 0.0.3
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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4effbaa0cda858d56dc7f8ba0f14f8b31a7e62b7ce8e269a1327a22fa290b248
|
4
|
+
data.tar.gz: 3a04b32518dbe2aff768875fd4e81bab54798be961e99ee1408aa9bc7a9a2443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbace0f72af66971fd53e7a56b7e4f3217a22f4b74131250b638f62059ffbb5920db6228bd5b5d96ad7c8e9162d2243ad29f8ce535a5a4961e60c8d2b46c759d
|
7
|
+
data.tar.gz: f2db0d1a362985c049f74ee2616b1b563a63ded239618458e1b5fa64518394d6e99ee1801c75333c04d91703c7298e7d66ea164f13accba4a0d88cbce7b7be23
|
@@ -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 = []
|