looker-sdk 0.1.12 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/looker-sdk/client.rb +1 -1
- data/lib/looker-sdk/version.rb +1 -1
- data/test/looker/test_client.rb +95 -0
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b66e79758ed96fe627d9ecb1c0337c4b842bf136943e24b07c9431e96ba76a1f
|
|
4
|
+
data.tar.gz: a6ba6ba2672b8efcb98f10e2450ed30aa8eb9b136648c65e677307ab79a12b4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 731ecb6c91196e366e842b1dfe68ae75b492b82fdf189f5859c5007dee06c145b236b3221b15ef27ee882a46367efa60b31da068f4ff3003a42ec70f338b4652
|
|
7
|
+
data.tar.gz: 0a4e3f74db38d3e243b4e3b24274eee327355f9e99a73791224047238bca0fe090eee9098c2d5e69f186b255aafc6343187e0c8b1aec02bfb51cbf08cb0b8953
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.1](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.2.0...v0.2.1) (2026-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* configure release-please manifest and version-file for ruby code ([#171](https://github.com/looker-open-source/looker-sdk-ruby/issues/171)) ([7f9aa51](https://github.com/looker-open-source/looker-sdk-ruby/commit/7f9aa5187b4a59b6fae36d5b1bdc50859b352077))
|
|
9
|
+
* enable SSL certificate verification by default in streaming requests ([#169](https://github.com/looker-open-source/looker-sdk-ruby/issues/169)) ([824f90e](https://github.com/looker-open-source/looker-sdk-ruby/commit/824f90e406a6a21bf1bdc8f6aa9d49ffe05f8a1b))
|
|
10
|
+
|
|
3
11
|
## [0.2.0](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.11...v0.2.0) (2026-03-08)
|
|
4
12
|
|
|
5
13
|
|
data/lib/looker-sdk/client.rb
CHANGED
|
@@ -385,7 +385,7 @@ module LookerSDK
|
|
|
385
385
|
|
|
386
386
|
connect_opts = {
|
|
387
387
|
:use_ssl => !!connection.ssl,
|
|
388
|
-
:verify_mode => (connection.ssl.verify rescue true) ?
|
|
388
|
+
:verify_mode => ((connection.ssl.verify != false) rescue true) ?
|
|
389
389
|
OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE,
|
|
390
390
|
}
|
|
391
391
|
|
data/lib/looker-sdk/version.rb
CHANGED
data/test/looker/test_client.rb
CHANGED
|
@@ -407,6 +407,101 @@ describe LookerSDK::Client do
|
|
|
407
407
|
end
|
|
408
408
|
end
|
|
409
409
|
|
|
410
|
+
describe "streaming client SSL verification" do
|
|
411
|
+
it "verifies SSL peer by default when ssl.verify is not explicitly configured" do
|
|
412
|
+
client = LookerSDK::Client.new(lazy_swagger: true)
|
|
413
|
+
streaming_client = LookerSDK::Client::StreamingClient.new(client)
|
|
414
|
+
|
|
415
|
+
mock_ssl = OpenStruct.new(verify: nil)
|
|
416
|
+
mock_conn = OpenStruct.new(
|
|
417
|
+
ssl: mock_ssl,
|
|
418
|
+
options: OpenStruct.new(open_timeout: 30, timeout: 60)
|
|
419
|
+
)
|
|
420
|
+
def mock_conn.build_exclusive_url(*); "https://localhost:19999/api/4.0/test"; end
|
|
421
|
+
|
|
422
|
+
mock_req = OpenStruct.new(
|
|
423
|
+
path: "/api/4.0/test",
|
|
424
|
+
params: {},
|
|
425
|
+
options: OpenStruct.new(params_encoder: nil),
|
|
426
|
+
http_method: :get,
|
|
427
|
+
headers: {},
|
|
428
|
+
body: nil
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
Net::HTTP.expects(:start).with do |host, port, opts|
|
|
432
|
+
assert_equal "localhost", host
|
|
433
|
+
assert_equal 19999, port
|
|
434
|
+
assert_equal true, opts[:use_ssl]
|
|
435
|
+
assert_equal OpenSSL::SSL::VERIFY_PEER, opts[:verify_mode]
|
|
436
|
+
true
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
streaming_client.build_response(mock_conn, mock_req)
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
it "disables SSL verification when ssl.verify is explicitly false" do
|
|
443
|
+
client = LookerSDK::Client.new(lazy_swagger: true)
|
|
444
|
+
streaming_client = LookerSDK::Client::StreamingClient.new(client)
|
|
445
|
+
|
|
446
|
+
mock_ssl = OpenStruct.new(verify: false)
|
|
447
|
+
mock_conn = OpenStruct.new(
|
|
448
|
+
ssl: mock_ssl,
|
|
449
|
+
options: OpenStruct.new(open_timeout: 30, timeout: 60)
|
|
450
|
+
)
|
|
451
|
+
def mock_conn.build_exclusive_url(*); "https://localhost:19999/api/4.0/test"; end
|
|
452
|
+
|
|
453
|
+
mock_req = OpenStruct.new(
|
|
454
|
+
path: "/api/4.0/test",
|
|
455
|
+
params: {},
|
|
456
|
+
options: OpenStruct.new(params_encoder: nil),
|
|
457
|
+
http_method: :get,
|
|
458
|
+
headers: {},
|
|
459
|
+
body: nil
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
Net::HTTP.expects(:start).with do |host, port, opts|
|
|
463
|
+
assert_equal "localhost", host
|
|
464
|
+
assert_equal 19999, port
|
|
465
|
+
assert_equal true, opts[:use_ssl]
|
|
466
|
+
assert_equal OpenSSL::SSL::VERIFY_NONE, opts[:verify_mode]
|
|
467
|
+
true
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
streaming_client.build_response(mock_conn, mock_req)
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
it "verifies SSL peer when ssl.verify is explicitly true" do
|
|
474
|
+
client = LookerSDK::Client.new(lazy_swagger: true)
|
|
475
|
+
streaming_client = LookerSDK::Client::StreamingClient.new(client)
|
|
476
|
+
|
|
477
|
+
mock_ssl = OpenStruct.new(verify: true)
|
|
478
|
+
mock_conn = OpenStruct.new(
|
|
479
|
+
ssl: mock_ssl,
|
|
480
|
+
options: OpenStruct.new(open_timeout: 30, timeout: 60)
|
|
481
|
+
)
|
|
482
|
+
def mock_conn.build_exclusive_url(*); "https://localhost:19999/api/4.0/test"; end
|
|
483
|
+
|
|
484
|
+
mock_req = OpenStruct.new(
|
|
485
|
+
path: "/api/4.0/test",
|
|
486
|
+
params: {},
|
|
487
|
+
options: OpenStruct.new(params_encoder: nil),
|
|
488
|
+
http_method: :get,
|
|
489
|
+
headers: {},
|
|
490
|
+
body: nil
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
Net::HTTP.expects(:start).with do |host, port, opts|
|
|
494
|
+
assert_equal "localhost", host
|
|
495
|
+
assert_equal 19999, port
|
|
496
|
+
assert_equal true, opts[:use_ssl]
|
|
497
|
+
assert_equal OpenSSL::SSL::VERIFY_PEER, opts[:verify_mode]
|
|
498
|
+
true
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
streaming_client.build_response(mock_conn, mock_req)
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
|
|
410
505
|
# TODO: Convert the old tests that were here to deal with swagger/dynamic way of doing things. Perhaps
|
|
411
506
|
# with a dedicated server that serves swagger customized to the test suite. Also, bring the auth tests
|
|
412
507
|
# to life here on the SDK client end.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: looker-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Looker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sawyer
|
|
@@ -157,16 +157,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
157
157
|
version: '0'
|
|
158
158
|
requirements:
|
|
159
159
|
- Looker version 4.0 or later
|
|
160
|
-
rubygems_version: 3.
|
|
160
|
+
rubygems_version: 3.3.27
|
|
161
161
|
signing_key:
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Looker Ruby SDK
|
|
164
164
|
test_files:
|
|
165
165
|
- test/helper.rb
|
|
166
|
+
- test/looker/swagger.json
|
|
167
|
+
- test/looker/test_body_params.rb
|
|
168
|
+
- test/looker/test_client.rb
|
|
166
169
|
- test/looker/test_dynamic_client.rb
|
|
167
170
|
- test/looker/test_dynamic_client_agent.rb
|
|
168
|
-
- test/looker/test_body_params.rb
|
|
169
|
-
- test/looker/user.json
|
|
170
171
|
- test/looker/test_inline_query.rb
|
|
171
|
-
- test/looker/
|
|
172
|
-
- test/looker/test_client.rb
|
|
172
|
+
- test/looker/user.json
|