looker-sdk 0.1.6 → 0.1.10
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 +19 -0
- data/lib/looker-sdk/client.rb +8 -6
- data/lib/looker-sdk/error.rb +1 -1
- data/lib/looker-sdk/version.rb +1 -1
- data/test/helper.rb +11 -5
- data/test/looker/swagger.json +42011 -1117
- data/test/looker/test_client.rb +19 -15
- data/test/looker/test_dynamic_client.rb +36 -34
- data/test/looker/test_dynamic_client_agent.rb +45 -12
- metadata +9 -40
- data/.github/scripts/wait_for_looker.sh +0 -35
- data/.github/workflows/release-metrics.yml +0 -44
- data/.github/workflows/release.yml +0 -47
- data/.github/workflows/ruby-ci.yml +0 -137
- data/.gitignore +0 -60
- data/.ruby-gemset +0 -1
- data/Gemfile +0 -22
- data/Gemfile.lock +0 -73
- data/Makefile +0 -81
- data/Rakefile +0 -38
- data/examples/.netrc +0 -1
- data/examples/add_delete_users.rb +0 -118
- data/examples/change_credentials_email_address_for_users.rb +0 -47
- data/examples/convert_look_to_lookless_tile.rb +0 -71
- data/examples/create_credentials_email_for_users.rb +0 -43
- data/examples/delete_all_user_sessions.rb +0 -39
- data/examples/delete_credentials_google_for_users.rb +0 -43
- data/examples/errors.rb +0 -47
- data/examples/generate_password_reset_tokens_for_users.rb +0 -43
- data/examples/ldap_roles_test.rb +0 -74
- data/examples/me.rb +0 -27
- data/examples/refresh_user_notification_addresses.rb +0 -34
- data/examples/roles_and_users_with_permission.rb +0 -46
- data/examples/sdk_setup.rb +0 -45
- data/examples/streaming_downloads.rb +0 -44
- data/examples/users_with_credentials_email.rb +0 -30
- data/examples/users_with_credentials_embed.rb +0 -33
- data/examples/users_with_credentials_google.rb +0 -30
- data/examples/users_with_credentials_google_without_credentials_email.rb +0 -30
- data/looker-sdk.gemspec +0 -32
- data/shell/.gitignore +0 -41
- data/shell/.netrc +0 -3
- data/shell/Gemfile +0 -6
- data/shell/readme.md +0 -18
- data/shell/shell.rb +0 -62
- data/shell.nix +0 -38
- data/test/fixtures/.netrc.template +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 962fdcc584f53a5888bda532f4c35d10f7e1e9afb36132c8f5b3befa6e658e40
|
4
|
+
data.tar.gz: 2aa006572f93e9da8f9c0a12a0bcdd41799561b99ccda67f22d2b791a47141ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e65b9e2fe9c4a262a7240cbcd661ee43df2be13cdefd192a0c8a269bbfd9b07e8bf3fb435e05299e7443297e19a2ec9bd9a9e4a758a3243f9b2c72cbd06da5f
|
7
|
+
data.tar.gz: 10c0aed18b69b6f59c919016ad26725506a4cfbc02048b112a19cf6ca99f795f9482900760559abf1a3374b6682c591ebeb0551bcec6b5230fbbf78499425727
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.10](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.7...v0.1.10) (2024-10-07)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* reduce output of inspect ([#81](https://github.com/looker-open-source/looker-sdk-ruby/issues/81)) ([ffb7d63](https://github.com/looker-open-source/looker-sdk-ruby/commit/ffb7d630842a907e860bc27bfefe8c51f401986a))
|
9
|
+
|
10
|
+
|
11
|
+
### Miscellaneous Chores
|
12
|
+
|
13
|
+
* release 0.1.10 ([1cf37b4](https://github.com/looker-open-source/looker-sdk-ruby/commit/1cf37b49586d97b4bbd85f1bf4f16c8836948744))
|
14
|
+
|
15
|
+
## [0.1.7](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.6...v0.1.7) (2024-01-19)
|
16
|
+
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
* **deps:** Fix for faraday multipart disabled ([2255a4e](https://github.com/looker-open-source/looker-sdk-ruby/commit/2255a4e4d67b87c06cefe87d945e9e11ae069465))
|
21
|
+
|
3
22
|
## [0.1.6](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.5...v0.1.6) (2023-06-28)
|
4
23
|
|
5
24
|
|
data/lib/looker-sdk/client.rb
CHANGED
@@ -76,8 +76,8 @@ module LookerSDK
|
|
76
76
|
#
|
77
77
|
# @return [String]
|
78
78
|
def inspect
|
79
|
-
|
80
|
-
|
79
|
+
vars = instance_variables.reject {|v| [:@swagger, :@operations].include? v}
|
80
|
+
inspected = "#{self.class.name}: attributes=\n#{vars.map {|v| "\t#{v}=#{instance_variable_get(v)}"}.join("\n")}>"
|
81
81
|
# Only show last 4 of token, secret
|
82
82
|
[@access_token, @client_secret].compact.each do |str|
|
83
83
|
len = [str.size - 4, 0].max
|
@@ -164,7 +164,7 @@ module LookerSDK
|
|
164
164
|
#
|
165
165
|
# @param url [String] The path, relative to {#api_endpoint}
|
166
166
|
# @param options [Hash] Query and header params for request
|
167
|
-
# @param block [Block] Block to perform the data
|
167
|
+
# @param block [Block] Block to perform the data concatenation of the
|
168
168
|
# multiple requests. The block is called with two parameters, the first
|
169
169
|
# contains the contents of the requests so far and the second parameter
|
170
170
|
# contains the latest response.
|
@@ -423,7 +423,7 @@ module LookerSDK
|
|
423
423
|
if Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0')
|
424
424
|
data.kind_of?(Faraday::UploadIO) ? data : super
|
425
425
|
else
|
426
|
-
data.kind_of?(Faraday::FilePart) ? data : super
|
426
|
+
defined?(Faraday::FilePart) && data.kind_of?(Faraday::FilePart) ? data : super
|
427
427
|
end
|
428
428
|
end
|
429
429
|
|
@@ -476,9 +476,11 @@ module LookerSDK
|
|
476
476
|
|
477
477
|
def merge_content_type_if_body(body, options = {})
|
478
478
|
if body
|
479
|
-
|
479
|
+
multipart = Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0') ?
|
480
|
+
body.kind_of?(Faraday::UploadIO) :
|
481
|
+
defined?(Faraday::FilePart) && body.kind_of?(Faraday::FilePart)
|
480
482
|
|
481
|
-
if
|
483
|
+
if multipart
|
482
484
|
length = File.new(body.local_path).size.to_s
|
483
485
|
headers = {:content_type => body.content_type, :content_length => length}.merge(options[:headers] || {})
|
484
486
|
else
|
data/lib/looker-sdk/error.rb
CHANGED
data/lib/looker-sdk/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -23,9 +23,7 @@
|
|
23
23
|
############################################################################################
|
24
24
|
|
25
25
|
require 'simplecov'
|
26
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter
|
27
|
-
SimpleCov::Formatter::HTMLFormatter
|
28
|
-
]
|
26
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new SimpleCov::Formatter::HTMLFormatter
|
29
27
|
SimpleCov.start
|
30
28
|
|
31
29
|
require 'rubygems'
|
@@ -38,11 +36,19 @@ require 'looker-sdk'
|
|
38
36
|
require 'minitest/autorun'
|
39
37
|
require 'minitest/spec'
|
40
38
|
require 'minitest/mock'
|
41
|
-
require 'mocha/
|
39
|
+
require 'mocha/minitest'
|
42
40
|
require "rack/test"
|
43
41
|
require "rack/request"
|
44
42
|
require "faraday/rack"
|
45
|
-
require "faraday/multipart"
|
43
|
+
require "faraday/multipart" if ENV['USE_FARADAY_MULTIPART'] == 'true'
|
44
|
+
|
45
|
+
module Minitest
|
46
|
+
class Mock
|
47
|
+
def is_a?( _a )
|
48
|
+
false
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
46
52
|
|
47
53
|
def fixture_path
|
48
54
|
File.expand_path("../fixtures", __FILE__)
|