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
data/shell/.gitignore
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# Numerous always-ignore extensions
|
2
|
-
*.diff
|
3
|
-
*.err
|
4
|
-
*.orig
|
5
|
-
*.log
|
6
|
-
*.rej
|
7
|
-
*.swo
|
8
|
-
*.swp
|
9
|
-
*.vi
|
10
|
-
*~
|
11
|
-
*.sass-cache
|
12
|
-
*.iml
|
13
|
-
|
14
|
-
# OS or Editor folders
|
15
|
-
.DS_Store
|
16
|
-
.cache
|
17
|
-
.project
|
18
|
-
.settings
|
19
|
-
.tmproj
|
20
|
-
nbproject
|
21
|
-
Thumbs.db
|
22
|
-
|
23
|
-
# Folders to ignore
|
24
|
-
intermediate
|
25
|
-
publish
|
26
|
-
target
|
27
|
-
.idea
|
28
|
-
out
|
29
|
-
|
30
|
-
# markdown previews
|
31
|
-
*.md.html
|
32
|
-
|
33
|
-
# bundler suggested ignores
|
34
|
-
*.gem
|
35
|
-
*.rbc
|
36
|
-
.bundle
|
37
|
-
.config
|
38
|
-
.yardoc
|
39
|
-
Gemfile.lock
|
40
|
-
Gemfile.optional.lock
|
41
|
-
tmp
|
data/shell/.netrc
DELETED
data/shell/Gemfile
DELETED
data/shell/readme.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# [Looker](http://looker.com/) SDK Ruby Shell
|
2
|
-
|
3
|
-
The Looker SDK Shell allows you to call and experiment with Looker SDK APIs
|
4
|
-
in a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) interactive command-line environment.
|
5
|
-
|
6
|
-
### SDK Shell Setup
|
7
|
-
```bash
|
8
|
-
$ cd looker-sdk/shell
|
9
|
-
$ bundle install
|
10
|
-
```
|
11
|
-
|
12
|
-
### Running the Shell
|
13
|
-
```bash
|
14
|
-
$ ruby shell.rb
|
15
|
-
```
|
16
|
-
The Looker SDK Shell expects to find Looker API authentication credentials in
|
17
|
-
a .netrc file in the current directory. See the [Looker SDK readme](../readme.md) for details
|
18
|
-
on setting up your .netrc file.
|
data/shell/shell.rb
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
############################################################################################
|
2
|
-
# The MIT License (MIT)
|
3
|
-
#
|
4
|
-
# Copyright (c) 2022 Looker Data Sciences, Inc.
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
23
|
-
############################################################################################
|
24
|
-
|
25
|
-
require 'rubygems'
|
26
|
-
require 'bundler/setup'
|
27
|
-
|
28
|
-
require 'looker-sdk.rb'
|
29
|
-
require 'pry'
|
30
|
-
|
31
|
-
def sdk
|
32
|
-
@sdk ||= LookerSDK::Client.new(
|
33
|
-
# Create your own API3 key and add it to a .netrc file in your location of choice.
|
34
|
-
:netrc => true,
|
35
|
-
:netrc_file => "./.netrc",
|
36
|
-
|
37
|
-
# Disable cert verification if the looker has a self-signed cert.
|
38
|
-
# :connection_options => {:ssl => {:verify => false}},
|
39
|
-
|
40
|
-
# Support self-signed cert *and* set longer timeout to allow for long running queries.
|
41
|
-
:connection_options => {:ssl => {:verify => false}, :request => {:timeout => 60 * 60, :open_timeout => 30}},
|
42
|
-
|
43
|
-
:api_endpoint => "https://localhost:19999/api/4.0",
|
44
|
-
|
45
|
-
# Customize to use your specific looker instance
|
46
|
-
# :connection_options => {:ssl => {:verify => true}},
|
47
|
-
# :api_endpoint => "https://looker.mycoolcompany.com:19999/api/4.0",
|
48
|
-
)
|
49
|
-
end
|
50
|
-
|
51
|
-
begin
|
52
|
-
puts "Connecting to Looker at '#{sdk.api_endpoint}'"
|
53
|
-
puts sdk.alive? ? "Looker is alive!" : "Sad Looker, can't connect:\n #{sdk.last_error}"
|
54
|
-
puts sdk.authenticated? ? "Authenticated!" : "Sad Looker, can't authenticate:\n #{sdk.last_error}"
|
55
|
-
|
56
|
-
binding.pry self
|
57
|
-
rescue Exception => e
|
58
|
-
puts e
|
59
|
-
ensure
|
60
|
-
puts 'Bye!'
|
61
|
-
end
|
62
|
-
|
data/shell.nix
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
let
|
2
|
-
nixpkgs = import (builtins.fetchTarball {
|
3
|
-
name = "nixpkgs-21.05";
|
4
|
-
url =
|
5
|
-
"https://github.com/nixos/nixpkgs/archive/f7574a5c8fefd86b50def1827eadb9b8cb266ffd.tar.gz";
|
6
|
-
sha256 = "0pksag38bjdqwvmcxgyc5a31hfz1z201za21v3hb7mqd9b99lnr3";
|
7
|
-
}) { };
|
8
|
-
in
|
9
|
-
with nixpkgs;
|
10
|
-
with stdenv;
|
11
|
-
with lib;
|
12
|
-
let ruby' = ruby_2_6.withPackages(ps: with ps; [bundler rake]);
|
13
|
-
in
|
14
|
-
mkShell {
|
15
|
-
name = "cucu-shell";
|
16
|
-
buildInputs = [ ruby' lzma zlib libxml2 ];
|
17
|
-
|
18
|
-
# Looker expects this as the default encoding otherwise does not start
|
19
|
-
LANG = "en_US.UTF-8";
|
20
|
-
|
21
|
-
# https://nixos.org/nixpkgs/manual/#locales
|
22
|
-
LOCALE_ARCHIVE =
|
23
|
-
optionalString isLinux "${glibcLocales}/lib/locale/locale-archive";
|
24
|
-
|
25
|
-
shellHook = ''
|
26
|
-
# FIXME: SSH or tooling that requires libnss-cache (https://github.com/google/libnss-cache)
|
27
|
-
# seems to fail since the library is not present. When I have a better understanding of Nix
|
28
|
-
# let's fix this.
|
29
|
-
# https://github.com/NixOS/nixpkgs/issues/64665#issuecomment-511411309
|
30
|
-
[[ ! -f /lib/x86_64-linux-gnu/libnss_cache.so.2 ]] || export LD_PRELOAD=/lib/x86_64-linux-gnu/libnss_cache.so.2:$LD_PRELOAD
|
31
|
-
|
32
|
-
export GEM_USER_DIR=$(pwd)/.gem
|
33
|
-
export GEM_DEFAULT_DIR=$(${ruby'}/bin/ruby -e 'puts Gem.default_dir')
|
34
|
-
export GEM_PATH=$GEM_DEFAULT_DIR:$GEM_PATH
|
35
|
-
export GEM_HOME=$GEM_USER_DIR
|
36
|
-
export PATH=$GEM_HOME/bin:$PATH
|
37
|
-
'';
|
38
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
machine localhost login xyYBxzSPYYP29wQJ3Q5k password VY5sj6z5qjxZsvdvf8yNvKcQ
|