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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/lib/looker-sdk/client.rb +8 -6
  4. data/lib/looker-sdk/error.rb +1 -1
  5. data/lib/looker-sdk/version.rb +1 -1
  6. data/test/helper.rb +11 -5
  7. data/test/looker/swagger.json +42011 -1117
  8. data/test/looker/test_client.rb +19 -15
  9. data/test/looker/test_dynamic_client.rb +36 -34
  10. data/test/looker/test_dynamic_client_agent.rb +45 -12
  11. metadata +9 -40
  12. data/.github/scripts/wait_for_looker.sh +0 -35
  13. data/.github/workflows/release-metrics.yml +0 -44
  14. data/.github/workflows/release.yml +0 -47
  15. data/.github/workflows/ruby-ci.yml +0 -137
  16. data/.gitignore +0 -60
  17. data/.ruby-gemset +0 -1
  18. data/Gemfile +0 -22
  19. data/Gemfile.lock +0 -73
  20. data/Makefile +0 -81
  21. data/Rakefile +0 -38
  22. data/examples/.netrc +0 -1
  23. data/examples/add_delete_users.rb +0 -118
  24. data/examples/change_credentials_email_address_for_users.rb +0 -47
  25. data/examples/convert_look_to_lookless_tile.rb +0 -71
  26. data/examples/create_credentials_email_for_users.rb +0 -43
  27. data/examples/delete_all_user_sessions.rb +0 -39
  28. data/examples/delete_credentials_google_for_users.rb +0 -43
  29. data/examples/errors.rb +0 -47
  30. data/examples/generate_password_reset_tokens_for_users.rb +0 -43
  31. data/examples/ldap_roles_test.rb +0 -74
  32. data/examples/me.rb +0 -27
  33. data/examples/refresh_user_notification_addresses.rb +0 -34
  34. data/examples/roles_and_users_with_permission.rb +0 -46
  35. data/examples/sdk_setup.rb +0 -45
  36. data/examples/streaming_downloads.rb +0 -44
  37. data/examples/users_with_credentials_email.rb +0 -30
  38. data/examples/users_with_credentials_embed.rb +0 -33
  39. data/examples/users_with_credentials_google.rb +0 -30
  40. data/examples/users_with_credentials_google_without_credentials_email.rb +0 -30
  41. data/looker-sdk.gemspec +0 -32
  42. data/shell/.gitignore +0 -41
  43. data/shell/.netrc +0 -3
  44. data/shell/Gemfile +0 -6
  45. data/shell/readme.md +0 -18
  46. data/shell/shell.rb +0 -62
  47. data/shell.nix +0 -38
  48. data/test/fixtures/.netrc.template +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5e038d877894b66d6cbc3c73e6c56d254196a47d2965ede1e0bcb75a9b9fddf
4
- data.tar.gz: 9770b81dcbd531e51f4d62e73d2131cbca10e69ae560536b570a118bc866b5ad
3
+ metadata.gz: 962fdcc584f53a5888bda532f4c35d10f7e1e9afb36132c8f5b3befa6e658e40
4
+ data.tar.gz: 2aa006572f93e9da8f9c0a12a0bcdd41799561b99ccda67f22d2b791a47141ef
5
5
  SHA512:
6
- metadata.gz: 10c9f1833242eb61f8098b3d006ebddcae6d50a9bd354fc49c5297c9d2daece34a7bc377d5117461240a594aec8375b0aa361a1408ac056702b4164d4bd15e9f
7
- data.tar.gz: da2bb7771662e02515fd6994b6ea550b0897122f131f4772b42a0e86e155014667492577de99358e094cb8e35752fbc0d556432c61ec52c455ce9398e593faa5
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
 
@@ -76,8 +76,8 @@ module LookerSDK
76
76
  #
77
77
  # @return [String]
78
78
  def inspect
79
- inspected = super
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 concatination of the
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
- type = Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0') ? Faraday::UploadIO : Faraday::FilePart
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 body.kind_of?(type)
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
@@ -25,7 +25,7 @@
25
25
  module LookerSDK
26
26
  class Error < StandardError
27
27
 
28
- # Returns the appropriate LookerSDK::Error sublcass based
28
+ # Returns the appropriate LookerSDK::Error subclass based
29
29
  # on status and response message
30
30
  #
31
31
  # @param [Hash] response HTTP response
@@ -26,6 +26,6 @@ module LookerSDK
26
26
 
27
27
  # Current version
28
28
  # @return [String]
29
- VERSION = "0.1.6"
29
+ VERSION = "0.1.10"
30
30
 
31
31
  end
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/mini_test'
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__)