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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b38ec236c26320f7fe18d8dcfb9e8020ee07aea5f65aeacc03f016d7aa12cf6
4
- data.tar.gz: 717e65d319d58d044ab50656bde6b2fcdccdfff69400c5b20631bd737db7f412
3
+ metadata.gz: b66e79758ed96fe627d9ecb1c0337c4b842bf136943e24b07c9431e96ba76a1f
4
+ data.tar.gz: a6ba6ba2672b8efcb98f10e2450ed30aa8eb9b136648c65e677307ab79a12b4c
5
5
  SHA512:
6
- metadata.gz: 87a1c61b1f6d4fba05c9bb31743757974ed91efb8f73cfd2e94ac2000b1b3d243c4e34b330e73319e965d477f0361e20b72d0fb196817f975bd666df79351341
7
- data.tar.gz: 7f20baf26fb2d47782587e05f4867879eecc1b77552e1bc30e62fea52dd8eb053d10f272598dd0f2b5523cf293e3d875c122fb2b5550067dda20d265e984238b
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
 
@@ -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
 
@@ -26,6 +26,6 @@ module LookerSDK
26
26
 
27
27
  # Current version
28
28
  # @return [String]
29
- VERSION = "0.1.12"
29
+ VERSION = "0.2.1"
30
30
 
31
31
  end
@@ -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.12
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-03-11 00:00:00.000000000 Z
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.1.6
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/swagger.json
172
- - test/looker/test_client.rb
172
+ - test/looker/user.json