looker-sdk 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/ruby-ci.yml +1 -1
- data/.gitignore +4 -1
- data/CHANGELOG.md +7 -0
- data/Gemfile +6 -6
- data/Gemfile.lock +15 -14
- data/README.md +4 -0
- data/examples/convert_look_to_lookless_tile.rb +1 -1
- data/lib/looker-sdk/client.rb +8 -2
- data/lib/looker-sdk/version.rb +1 -1
- data/test/looker/test_dynamic_client.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6d73874bee8e8e50c2af1c9b4fb6b9cbafacb7efdfac19936bc6d242fd0af39
|
4
|
+
data.tar.gz: fae005e0f507fb77fdcbfc8483446e6b73ba4c0ee812000fc111d6b0061c1296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e543fca41be0dbb06be352a1ed85a8841b7b50ea2a49308b04c003fc904559534009228f3c6be37f034724f985377afbc1bc1296abafb32537fa46bb8e728d96
|
7
|
+
data.tar.gz: 6b0bd2006e1ca238646c135fc022edc01062e12d01389ae6d93cdf6f0cf3cb8065fc70436d29e0ab4be3a024b2289ecbc54772544d3b8bb6591a3d606c3db415
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.5](https://github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.4...v0.1.5) (2023-06-28)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* updated redcarpet dependency to account for an injection vulnerability which can enable a cross-site scripting attack. ([f325228](https://github.com/looker-open-source/looker-sdk-ruby/commit/f32522897157887d0bf446b8c5b27c57d8e533b9))
|
9
|
+
|
3
10
|
### [0.1.4](https://www.github.com/looker-open-source/looker-sdk-ruby/compare/v0.1.3...v0.1.4) (2023-03-14)
|
4
11
|
|
5
12
|
|
data/Gemfile
CHANGED
@@ -2,19 +2,19 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
group :development do
|
4
4
|
gem 'awesome_print', '~>1.6.1', :require => 'ap'
|
5
|
-
gem 'redcarpet', '~>3.
|
5
|
+
gem 'redcarpet', '~>3.2.3', :platforms => :ruby
|
6
6
|
end
|
7
7
|
|
8
8
|
group :development, :test do
|
9
|
-
gem 'rake', '
|
9
|
+
gem 'rake', '~> 13.0.3'
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
13
13
|
# gem 'json', '~> 1.7', :platforms => [:jruby] look TODO needed?
|
14
|
-
gem 'minitest',
|
15
|
-
gem 'mocha',
|
16
|
-
gem 'rack',
|
17
|
-
gem 'rack-test',
|
14
|
+
gem 'minitest', '~> 5.11.0'
|
15
|
+
gem 'mocha', '~> 1.1.0'
|
16
|
+
gem 'rack', '~> 2.2.7'
|
17
|
+
gem 'rack-test', '~> 1'
|
18
18
|
gem 'netrc', '~> 0.7.7'
|
19
19
|
gem 'simplecov', '~> 0.7.1', :require => false
|
20
20
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
looker-sdk (0.1.
|
4
|
+
looker-sdk (0.1.5)
|
5
5
|
faraday (>= 1.2, < 3.0)
|
6
6
|
sawyer (~> 0.8)
|
7
7
|
|
@@ -42,18 +42,18 @@ GEM
|
|
42
42
|
faraday-rack (1.0.0)
|
43
43
|
faraday-retry (1.0.3)
|
44
44
|
metaclass (0.0.4)
|
45
|
-
minitest (5.
|
45
|
+
minitest (5.11.3)
|
46
46
|
mocha (1.1.0)
|
47
47
|
metaclass (~> 0.0.1)
|
48
48
|
multi_json (1.15.0)
|
49
49
|
multipart-post (2.3.0)
|
50
50
|
netrc (0.7.9)
|
51
51
|
public_suffix (5.0.1)
|
52
|
-
rack (
|
53
|
-
rack-test (
|
54
|
-
rack (>= 1.0)
|
55
|
-
rake (
|
56
|
-
redcarpet (3.
|
52
|
+
rack (2.2.7)
|
53
|
+
rack-test (1.1.0)
|
54
|
+
rack (>= 1.0, < 3)
|
55
|
+
rake (13.0.6)
|
56
|
+
redcarpet (3.2.3)
|
57
57
|
rexml (3.2.5)
|
58
58
|
ruby2_keywords (0.0.5)
|
59
59
|
sawyer (0.9.2)
|
@@ -65,6 +65,7 @@ GEM
|
|
65
65
|
simplecov-html (0.7.1)
|
66
66
|
|
67
67
|
PLATFORMS
|
68
|
+
arm64-darwin-22
|
68
69
|
x86_64-linux
|
69
70
|
|
70
71
|
DEPENDENCIES
|
@@ -72,14 +73,14 @@ DEPENDENCIES
|
|
72
73
|
ci_reporter_minitest (~> 1.0)
|
73
74
|
faraday (~> 1.10)
|
74
75
|
looker-sdk!
|
75
|
-
minitest (
|
76
|
-
mocha (
|
76
|
+
minitest (~> 5.11.0)
|
77
|
+
mocha (~> 1.1.0)
|
77
78
|
netrc (~> 0.7.7)
|
78
|
-
rack (
|
79
|
-
rack-test (
|
80
|
-
rake (
|
81
|
-
redcarpet (~> 3.
|
79
|
+
rack (~> 2.2.7)
|
80
|
+
rack-test (~> 1)
|
81
|
+
rake (~> 13.0.3)
|
82
|
+
redcarpet (~> 3.2.3)
|
82
83
|
simplecov (~> 0.7.1)
|
83
84
|
|
84
85
|
BUNDLED WITH
|
85
|
-
2.4.
|
86
|
+
2.4.14
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/looker-sdk.svg)](https://badge.fury.io/rb/looker-sdk)[![Ruby-CI](https://github.com/looker-open-source/looker-sdk-ruby/actions/workflows/ruby-ci.yml/badge.svg?branch=main)](https://github.com/looker-open-source/looker-sdk-ruby/actions/workflows/ruby-ci.yml)
|
2
2
|
# [Looker](http://looker.com/) SDK for Ruby
|
3
|
+
|
4
|
+
### Support
|
5
|
+
This SDK is officially supported by Looker/Google. Issues can be logged here in the GitHub Issues page, but can also be logged with Looker Support. Details of Looker API and SDK support can be found at [https://cloud.google.com/looker/docs/api-sdk-support-policy](https://cloud.google.com/looker/docs/api-sdk-support-policy).
|
6
|
+
|
3
7
|
### Overview
|
4
8
|
This SDK supports secure/authenticated access to the Looker RESTful API. The SDK binds dynamically to the Looker API and builds mappings for the sets of API methods that the Looker instance exposes. This allows for writing straightforward Ruby scripts to interact with the Looker API. And, it allows the SDK to provide access to new Looker API features in each Looker release without requiring an update to the SDK each time.
|
5
9
|
|
@@ -25,7 +25,7 @@
|
|
25
25
|
require 'looker-sdk'
|
26
26
|
require 'json'
|
27
27
|
|
28
|
-
# Note that this example requires API 3.1 for new dashboard element manipulation functions
|
28
|
+
# Note that this example requires API 3.1 or greater for new dashboard element manipulation functions
|
29
29
|
|
30
30
|
sdk = LookerSDK::Client.new(
|
31
31
|
:client_id => ENV['KEY'],
|
data/lib/looker-sdk/client.rb
CHANGED
@@ -420,7 +420,11 @@ module LookerSDK
|
|
420
420
|
|
421
421
|
class Serializer < Sawyer::Serializer
|
422
422
|
def encode(data)
|
423
|
-
|
423
|
+
if Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0')
|
424
|
+
data.kind_of?(Faraday::UploadIO) ? data : super
|
425
|
+
else
|
426
|
+
data.kind_of?(Faraday::FilePart) ? data : super
|
427
|
+
end
|
424
428
|
end
|
425
429
|
|
426
430
|
# slight modification to the base class' decode_hash_value function to
|
@@ -472,7 +476,9 @@ module LookerSDK
|
|
472
476
|
|
473
477
|
def merge_content_type_if_body(body, options = {})
|
474
478
|
if body
|
475
|
-
|
479
|
+
type = Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0') ? Faraday::UploadIO : Faraday::FilePart
|
480
|
+
|
481
|
+
if body.kind_of?(type)
|
476
482
|
length = File.new(body.local_path).size.to_s
|
477
483
|
headers = {:content_type => body.content_type, :content_length => length}.merge(options[:headers] || {})
|
478
484
|
else
|
data/lib/looker-sdk/version.rb
CHANGED
@@ -223,7 +223,12 @@ class LookerDynamicClientTest < MiniTest::Spec
|
|
223
223
|
it "post with file upload" do
|
224
224
|
verify(response, :post, '/api/3.0/users', {first_name:'Joe', last_name:'User'}, {}, "application/vnd.BOGUS3+json") do |sdk|
|
225
225
|
name = File.join(File.dirname(__FILE__), 'user.json')
|
226
|
-
|
226
|
+
if Gem.loaded_specs['faraday'].version < Gem::Version.new('2.0')
|
227
|
+
sdk.create_user(Faraday::UploadIO.new(name, "application/vnd.BOGUS3+json"))
|
228
|
+
else
|
229
|
+
sdk.create_user(Faraday::FilePart.new(name, "application/vnd.BOGUS3+json"))
|
230
|
+
end
|
231
|
+
|
227
232
|
end
|
228
233
|
end
|
229
234
|
|
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.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Looker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sawyer
|