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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eec4f085f75f425e9a066942d67bde11f67fa7f2ebf1fd7a38778a6b02a01104
4
- data.tar.gz: 41246f423ed0288d8cbbbb5f2dba3fe011ad23cca48dec84e6a6ddfb575ec73f
3
+ metadata.gz: d6d73874bee8e8e50c2af1c9b4fb6b9cbafacb7efdfac19936bc6d242fd0af39
4
+ data.tar.gz: fae005e0f507fb77fdcbfc8483446e6b73ba4c0ee812000fc111d6b0061c1296
5
5
  SHA512:
6
- metadata.gz: d6eb98d64177c6b30dd98c3fc0a6dc2ecf0ab0a83fdb4c694476cc791c63e8c2fc14c18a199dd6c01f59926691c7a340bccdf38ef4a0f1f3e10cbf8ff6a505ac
7
- data.tar.gz: 7630058cb8ae0d8e3968fddfb81b1e22c52bf446621cfed83d8e9b44d7c9685c306a801d8709197d2a2a84db970a5d73fe2fdc0212d9a713639bb2043abfdd5f
6
+ metadata.gz: e543fca41be0dbb06be352a1ed85a8841b7b50ea2a49308b04c003fc904559534009228f3c6be37f034724f985377afbc1bc1296abafb32537fa46bb8e728d96
7
+ data.tar.gz: 6b0bd2006e1ca238646c135fc022edc01062e12d01389ae6d93cdf6f0cf3cb8065fc70436d29e0ab4be3a024b2289ecbc54772544d3b8bb6591a3d606c3db415
@@ -11,7 +11,7 @@ jobs:
11
11
  release-please:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: GoogleCloudPlatform/release-please-action@v2
14
+ - uses: GoogleCloudPlatform/release-please-action@v3
15
15
  id: release
16
16
  with:
17
17
  release-type: ruby
@@ -102,7 +102,7 @@ jobs:
102
102
  - name: remove mock .netrc
103
103
  if: ${{ always() }}
104
104
  run: |
105
- rm test/fixtures/.netrc
105
+ rm -f test/fixtures/.netrc
106
106
 
107
107
  - name: Upload ts unit test results
108
108
  if: ${{ always() }}
data/.gitignore CHANGED
@@ -10,7 +10,7 @@
10
10
  *~
11
11
  *.sass-cache
12
12
  *.iml
13
-
13
+ .ruby-version
14
14
 
15
15
  # OS or Editor folders
16
16
  .DS_Store
@@ -55,3 +55,6 @@ tmp
55
55
 
56
56
  # credentials for testing
57
57
  .netrc
58
+
59
+ # test output
60
+ /test/reports/**
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.1.2', :platforms => :ruby
5
+ gem 'redcarpet', '~>3.2.3', :platforms => :ruby
6
6
  end
7
7
 
8
8
  group :development, :test do
9
- gem 'rake', '< 11.0'
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', '5.9.1'
15
- gem 'mocha', '1.1.0'
16
- gem 'rack', '1.6.4'
17
- gem 'rack-test', '0.6.2'
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)
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.9.1)
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 (1.6.4)
53
- rack-test (0.6.2)
54
- rack (>= 1.0)
55
- rake (10.5.0)
56
- redcarpet (3.1.2)
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 (= 5.9.1)
76
- mocha (= 1.1.0)
76
+ minitest (~> 5.11.0)
77
+ mocha (~> 1.1.0)
77
78
  netrc (~> 0.7.7)
78
- rack (= 1.6.4)
79
- rack-test (= 0.6.2)
80
- rake (< 11.0)
81
- redcarpet (~> 3.1.2)
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.8
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'],
@@ -420,7 +420,11 @@ module LookerSDK
420
420
 
421
421
  class Serializer < Sawyer::Serializer
422
422
  def encode(data)
423
- data.kind_of?(Faraday::UploadIO) ? data : super
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
- if body.kind_of?(Faraday::UploadIO)
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
@@ -26,6 +26,6 @@ module LookerSDK
26
26
 
27
27
  # Current version
28
28
  # @return [String]
29
- VERSION = "0.1.4"
29
+ VERSION = "0.1.5"
30
30
 
31
31
  end
@@ -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
- sdk.create_user(Faraday::UploadIO.new(name, "application/vnd.BOGUS3+json"))
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
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-03-14 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sawyer