trino-client 1.0.2 → 2.0.1

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: fd6f8fe49771f84393aac9d14d2184c25c65915e8e219682c222d686f229a40c
4
- data.tar.gz: 3b17b2ff6dfb6d9e20f9e730fa2c51127a39c0455ffef7f239c13fb1c0e75f62
3
+ metadata.gz: 50686d406d4aedd29016b8b5cfee3024869e797791cc53e099dbf813f6a7d135
4
+ data.tar.gz: d4d2e2762b8eba6ecaf6c2dd07c19f1db37eee5c8d1ebf4c995d88ec768fe62c
5
5
  SHA512:
6
- metadata.gz: 53f7ebdcb51e1d90a4006ca29847827f213fc714bc4561d4cf992ca3296122dc0aa625c7301a597999ac91be6cb9de54192b6c13524650baece9da416dba4160
7
- data.tar.gz: 9cf5f0e74f443aee676e63deac7cb41fedf68cadfa2415d7babfc948b237327c566958a4e560d12bdb705efbafda4614c3f237883c27097e1db92f871c551399
6
+ metadata.gz: 203db357ca5034c2000d836667ac1bb92d976300d7299663105af90f284657854eb061625b48756a4cba0d21a4d8342d5006c95a7b6eab7e37ca1abbe832c21d
7
+ data.tar.gz: 5566882e00f6edac34ac3d863d78aea8f3358e829b86d7ffff9f51582b42315b7a2b87e0d71a7b22cfd98eea5ac0fb20ab28f1e219991f1ac62e28256cf914ec
data/ChangeLog.md CHANGED
@@ -1,5 +1,48 @@
1
1
  trino-client-ruby
2
2
  ====
3
+ ## 2.0.1
4
+ - Reduce published gem size ([#113](https://github.com/treasure-data/trino-client-ruby/issues/113)) [[4e03819](https://github.com/treasure-data/trino-client-ruby/commit/4e03819)]
5
+ - Update standard requirement from ~> 1.24.3 to ~> 1.30.1 ([#112](https://github.com/treasure-data/trino-client-ruby/issues/112)) [[b9f9c0c](https://github.com/treasure-data/trino-client-ruby/commit/b9f9c0c)]
6
+
7
+ ## 2.0.0
8
+ - Bump actions/checkout from 2 to 3 ([#99](https://github.com/treasure-data/trino-client-ruby/issues/99)) [[3022dc1](https://github.com/treasure-data/trino-client-ruby/commit/3022dc1)]
9
+ - linter: Enable linter on lib ([#98](https://github.com/treasure-data/trino-client-ruby/issues/98)) [[1c043cd](https://github.com/treasure-data/trino-client-ruby/commit/1c043cd)]
10
+ - ci: fix typo ([#97](https://github.com/treasure-data/trino-client-ruby/issues/97)) [[69d966d](https://github.com/treasure-data/trino-client-ruby/commit/69d966d)]
11
+ - Faraday 2.x and 1.x cross support ([#94](https://github.com/treasure-data/trino-client-ruby/issues/94)) [[401639e](https://github.com/treasure-data/trino-client-ruby/commit/401639e)]
12
+ - "push" event on pull requests are redundant ([#95](https://github.com/treasure-data/trino-client-ruby/issues/95)) [[f935407](https://github.com/treasure-data/trino-client-ruby/commit/f935407)]
13
+ - Fix for Ruby 3.2.x ([#92](https://github.com/treasure-data/trino-client-ruby/issues/92)) [[3e8fad5](https://github.com/treasure-data/trino-client-ruby/commit/3e8fad5)]
14
+ - Update CODEOWNERS [[4d8709a](https://github.com/treasure-data/trino-client-ruby/commit/4d8709a)]
15
+ - Merge pull request [#90](https://github.com/treasure-data/trino-client-ruby/issues/90) from treasure-data/release-drafter [[390a745](https://github.com/treasure-data/trino-client-ruby/commit/390a745)]
16
+ - Merge pull request [#80](https://github.com/treasure-data/trino-client-ruby/issues/80) from treasure-data/dependabot/bundler/rspec-tw-3.12.0 [[b525d85](https://github.com/treasure-data/trino-client-ruby/commit/b525d85)]
17
+ - Migrate legacy "should" to "expect" [[9c22bb0](https://github.com/treasure-data/trino-client-ruby/commit/9c22bb0)]
18
+ - Bump rake so it works with rspec 3.x [[7354526](https://github.com/treasure-data/trino-client-ruby/commit/7354526)]
19
+ - Update rspec requirement from ~> 2.13.0 to ~> 3.12.0 [[0c82814](https://github.com/treasure-data/trino-client-ruby/commit/0c82814)]
20
+ - Merge pull request [#91](https://github.com/treasure-data/trino-client-ruby/issues/91) from treasure-data/dependabot/bundler/standard-tw-1.24.3 [[ec7a559](https://github.com/treasure-data/trino-client-ruby/commit/ec7a559)]
21
+ - Remove the deprecated "test_files" to make the gem package smaller [[7e03774](https://github.com/treasure-data/trino-client-ruby/commit/7e03774)]
22
+ - Use parentheses with complex conditions [[c6351b7](https://github.com/treasure-data/trino-client-ruby/commit/c6351b7)]
23
+ - Remove redundant escape [[b52d244](https://github.com/treasure-data/trino-client-ruby/commit/b52d244)]
24
+ - Update standard requirement from ~> 1.12.1 to ~> 1.24.3 [[0723dc7](https://github.com/treasure-data/trino-client-ruby/commit/0723dc7)]
25
+ - Introduce release-drafter github action [[7cf538b](https://github.com/treasure-data/trino-client-ruby/commit/7cf538b)]
26
+ - Run unit tests in github actions with ruby 3 ([#89](https://github.com/treasure-data/trino-client-ruby/issues/89)) [[58e899d](https://github.com/treasure-data/trino-client-ruby/commit/58e899d)]
27
+ - Upgrade minimum ruby version to 2.7 ([#86](https://github.com/treasure-data/trino-client-ruby/issues/86)) [[07921fd](https://github.com/treasure-data/trino-client-ruby/commit/07921fd)]
28
+ - Bump ruby/setup-ruby from 1.61.0 to 1.133.2 ([#85](https://github.com/treasure-data/trino-client-ruby/issues/85)) [[79e722c](https://github.com/treasure-data/trino-client-ruby/commit/79e722c)]
29
+ - Update dependabot.yaml [[96cf01d](https://github.com/treasure-data/trino-client-ruby/commit/96cf01d)]
30
+ - Update addressable requirement from ~> 2.4.0 to ~> 2.8.1 ([#82](https://github.com/treasure-data/trino-client-ruby/issues/82)) [[24b0c9e](https://github.com/treasure-data/trino-client-ruby/commit/24b0c9e)]
31
+ - Update simplecov requirement from ~> 0.10.0 to ~> 0.22.0 ([#83](https://github.com/treasure-data/trino-client-ruby/issues/83)) [[8e46420](https://github.com/treasure-data/trino-client-ruby/commit/8e46420)]
32
+ - Merge pull request [#79](https://github.com/treasure-data/trino-client-ruby/issues/79) from treasure-data/dependabot/bundler/standard-tw-1.12.1 [[d82433f](https://github.com/treasure-data/trino-client-ruby/commit/d82433f)]
33
+ - Reformat [[8fb2672](https://github.com/treasure-data/trino-client-ruby/commit/8fb2672)]
34
+ - Update standard requirement from ~> 1.0.0 to ~> 1.12.1 [[bbb900f](https://github.com/treasure-data/trino-client-ruby/commit/bbb900f)]
35
+ - Create dependabot.yaml [[d1b619a](https://github.com/treasure-data/trino-client-ruby/commit/d1b619a)]
36
+ - Merge pull request [#78](https://github.com/treasure-data/trino-client-ruby/issues/78) from treasure-data/standardrb [[bed70c9](https://github.com/treasure-data/trino-client-ruby/commit/bed70c9)]
37
+ - Reformat Rakefile and etc [[6e08989](https://github.com/treasure-data/trino-client-ruby/commit/6e08989)]
38
+ - Introduce standard [[009173e](https://github.com/treasure-data/trino-client-ruby/commit/009173e)]
39
+ - Merge pull request [#76](https://github.com/treasure-data/trino-client-ruby/issues/76) from treasure-data/SECU-1152 [[5c9b488](https://github.com/treasure-data/trino-client-ruby/commit/5c9b488)]
40
+ - Remove ruby 2.5 from testing targets [[cdaa0e4](https://github.com/treasure-data/trino-client-ruby/commit/cdaa0e4)]
41
+ - Create codeql-analysis.yml [[116a17f](https://github.com/treasure-data/trino-client-ruby/commit/116a17f)]
42
+ - Merge pull request [#77](https://github.com/treasure-data/trino-client-ruby/issues/77) from treasure-data/retry-interval [[cfd99f6](https://github.com/treasure-data/trino-client-ruby/commit/cfd99f6)]
43
+ - Update retryable errors [[e8878f6](https://github.com/treasure-data/trino-client-ruby/commit/e8878f6)]
44
+ - Minor change for retry logic for testing [[190fd92](https://github.com/treasure-data/trino-client-ruby/commit/190fd92)]
45
+
3
46
  ## 1.0.2
4
47
  - Merge pull request [#75](https://github.com/treasure-data/trino-client-ruby/issues/75) from evgeniy-b/1-0-1-fixes [[4cdd21f](https://github.com/treasure-data/trino-client-ruby/commit/4cdd21f)]
5
48
  - Faraday basic auth deprecation fix [[5c20266](https://github.com/treasure-data/trino-client-ruby/commit/5c20266)]
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Trino client library for Ruby
2
2
 
3
- [![Build Status](https://travis-ci.org/treasure-data/trino-client-ruby.svg?branch=master)](https://travis-ci.org/treasure-data/trino-client-ruby) [![Gem](https://img.shields.io/gem/v/trino-client)](https://rubygems.org/gems/trino-client) [![Gem](https://img.shields.io/gem/dt/trino-client)](https://rubygems.org/gems/trino-client) [![GitHub](https://img.shields.io/github/license/treasure-data/trino-client-ruby)]()
3
+ [![Ruby](https://github.com/treasure-data/trino-client-ruby/actions/workflows/ruby.yml/badge.svg)](https://github.com/treasure-data/trino-client-ruby/actions/workflows/ruby.yml) [![Gem](https://img.shields.io/gem/v/trino-client)](https://rubygems.org/gems/trino-client) [![Gem](https://img.shields.io/gem/dt/trino-client)](https://rubygems.org/gems/trino-client) [![GitHub](https://img.shields.io/github/license/treasure-data/trino-client-ruby)]()
4
4
 
5
5
  Trino is a distributed SQL query engine for big data:
6
6
  https://trino.io/
data/SECURITY.md ADDED
@@ -0,0 +1,7 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Treasure Data values the security of its customers and is committed to ensuring that the systems and products are secure. We invite all bug bounty researchers to join our efforts in identifying and reporting vulnerabilities in our systems.
6
+
7
+ Submit your findings to our dedicated bug bounty email address [vulnerabilities@treasuredata.com](mailto:vulnerabilities@treasuredata.com) and help us keep Treasure Data secure. Let’s work together to make the Internet a safer place!
@@ -14,6 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  module Trino::Client
17
+ FARADAY1_USED = Faraday::VERSION.start_with?("1.")
18
+ private_constant :FARADAY1_USED
17
19
 
18
20
  require 'cgi'
19
21
 
@@ -70,18 +72,24 @@ module Trino::Client
70
72
  url = "#{ssl ? "https" : "http"}://#{server}"
71
73
  proxy = options[:http_proxy] || options[:proxy] # :proxy is obsoleted
72
74
 
73
- faraday_options = {url: url, proxy: "#{proxy}"}
75
+ faraday_options = {url: url}
76
+ faraday_options[:proxy] = "#{proxy}" if proxy
74
77
  faraday_options[:ssl] = ssl if ssl
75
78
 
76
79
  faraday = Faraday.new(faraday_options) do |faraday|
77
80
  if options[:user] && options[:password]
78
- faraday.request(:basic_auth, options[:user], options[:password])
81
+ # https://lostisland.github.io/faraday/middleware/authentication
82
+ if FARADAY1_USED
83
+ faraday.request(:basic_auth, options[:user], options[:password])
84
+ else
85
+ faraday.request :authorization, :basic, options[:user], options[:password]
86
+ end
79
87
  end
80
88
  if options[:follow_redirect]
81
- faraday.use FaradayMiddleware::FollowRedirects
89
+ faraday.response :follow_redirects
82
90
  end
83
91
  if options[:gzip]
84
- faraday.use FaradayMiddleware::Gzip
92
+ faraday.request :gzip
85
93
  end
86
94
  faraday.response :logger if options[:http_debug]
87
95
  faraday.adapter Faraday.default_adapter
@@ -16,7 +16,8 @@
16
16
  module Trino::Client
17
17
 
18
18
  require 'faraday'
19
- require 'faraday_middleware'
19
+ require 'faraday/gzip'
20
+ require 'faraday/follow_redirects'
20
21
  require 'trino/client/models'
21
22
  require 'trino/client/errors'
22
23
  require 'trino/client/faraday_client'
@@ -106,11 +107,12 @@ module Trino::Client
106
107
  raise TrinoError, "Query #{@api.current_results.id} has no columns"
107
108
  end
108
109
 
109
- begin
110
+ loop do
110
111
  if data = @api.current_results.data
111
112
  block.call(data)
112
113
  end
113
- end while advance_and_raise
114
+ break unless advance_and_raise
115
+ end
114
116
  end
115
117
 
116
118
  def query_info
@@ -193,7 +193,7 @@ module Trino::Client
193
193
  start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
194
194
  attempts = 0
195
195
 
196
- begin
196
+ loop do
197
197
  begin
198
198
  response = @faraday.get(uri)
199
199
  rescue Faraday::TimeoutError, Faraday::ConnectionFailed
@@ -218,7 +218,9 @@ module Trino::Client
218
218
 
219
219
  attempts += 1
220
220
  sleep attempts * 0.1
221
- end while (Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) < @retry_timeout && !client_aborted?
221
+
222
+ break unless (Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) < @retry_timeout && !client_aborted?
223
+ end
222
224
 
223
225
  exception! TrinoHttpError.new(408, "Trino API error due to timeout")
224
226
  end
@@ -15,6 +15,6 @@
15
15
  #
16
16
  module Trino
17
17
  module Client
18
- VERSION = "1.0.2"
18
+ VERSION = "2.0.1"
19
19
  end
20
20
  end
data/lib/trino/client.rb CHANGED
@@ -15,9 +15,7 @@
15
15
  #
16
16
  module Trino
17
17
  module Client
18
-
19
- require 'trino/client/version'
20
- require 'trino/client/client'
21
-
18
+ require "trino/client/version"
19
+ require "trino/client/client"
22
20
  end
23
21
  end
data/lib/trino-client.rb CHANGED
@@ -1 +1 @@
1
- require 'trino/client'
1
+ require "trino/client"
data/trino-client.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- require File.expand_path 'lib/trino/client/version', File.dirname(__FILE__)
1
+ require File.expand_path "lib/trino/client/version", File.dirname(__FILE__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "trino-client"
@@ -6,25 +6,27 @@ Gem::Specification.new do |gem|
6
6
 
7
7
  gem.authors = ["Sadayuki Furuhashi"]
8
8
  gem.email = ["sf@treasure-data.com"]
9
- gem.description = %q{Trino client library}
10
- gem.summary = %q{Trino client library}
9
+ gem.description = "Trino client library"
10
+ gem.summary = "Trino client library"
11
11
  gem.homepage = "https://github.com/treasure-data/trino-client-ruby"
12
12
  gem.license = "Apache-2.0"
13
13
 
14
- gem.files = `git ls-files`.split($\)
15
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?(*%w[.git .standard modelgen spec trino-client-ruby Gemfile Rakefile publish.rb release.rb]) }
15
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
16
  gem.require_paths = ["lib"]
18
17
 
19
- gem.required_ruby_version = ">= 1.9.1"
18
+ gem.required_ruby_version = ">= 2.7.0"
20
19
 
21
- gem.add_dependency "faraday", ["~> 1.0"]
22
- gem.add_dependency "faraday_middleware", ["~> 1.0"]
23
- gem.add_dependency "msgpack", [">= 0.7.0"]
20
+ gem.add_dependency "faraday", ">= 1", "< 3"
21
+ gem.add_dependency "faraday-gzip", ">= 1"
22
+ gem.add_dependency "faraday-follow_redirects", ">= 0.3"
23
+ gem.add_dependency "msgpack", [">= 1.5.1"]
24
24
 
25
- gem.add_development_dependency "rake", [">= 0.9.2", "< 11.0"]
26
- gem.add_development_dependency "rspec", ["~> 2.13.0"]
25
+ gem.add_development_dependency "rake", [">= 0.9.2", "< 14.0"]
26
+ gem.add_development_dependency "rspec", "~> 3.12.0"
27
27
  gem.add_development_dependency "webmock", ["~> 3.0"]
28
- gem.add_development_dependency "addressable", ["~> 2.4.0"] # 2.5.0 doesn't support Ruby 1.9.3
29
- gem.add_development_dependency "simplecov", ["~> 0.10.0"]
28
+ gem.add_development_dependency "addressable", "~> 2.8.1" # 2.5.0 doesn't support Ruby 1.9.3
29
+ gem.add_development_dependency "simplecov", "~> 0.22.0"
30
+ gem.add_development_dependency "standard", "~> 1.30.1"
31
+ gem.add_development_dependency "psych", "~> 3"
30
32
  end
metadata CHANGED
@@ -1,57 +1,77 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trino-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2023-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '1.0'
22
+ version: '3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '1.0'
29
+ version: '1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
27
33
  - !ruby/object:Gem::Dependency
28
- name: faraday_middleware
34
+ name: faraday-gzip
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: '1.0'
39
+ version: '1'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: faraday-follow_redirects
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.3'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
39
59
  - !ruby/object:Gem::Version
40
- version: '1.0'
60
+ version: '0.3'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: msgpack
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - ">="
46
66
  - !ruby/object:Gem::Version
47
- version: 0.7.0
67
+ version: 1.5.1
48
68
  type: :runtime
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
72
  - - ">="
53
73
  - !ruby/object:Gem::Version
54
- version: 0.7.0
74
+ version: 1.5.1
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rake
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -61,7 +81,7 @@ dependencies:
61
81
  version: 0.9.2
62
82
  - - "<"
63
83
  - !ruby/object:Gem::Version
64
- version: '11.0'
84
+ version: '14.0'
65
85
  type: :development
66
86
  prerelease: false
67
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,21 +91,21 @@ dependencies:
71
91
  version: 0.9.2
72
92
  - - "<"
73
93
  - !ruby/object:Gem::Version
74
- version: '11.0'
94
+ version: '14.0'
75
95
  - !ruby/object:Gem::Dependency
76
96
  name: rspec
77
97
  requirement: !ruby/object:Gem::Requirement
78
98
  requirements:
79
99
  - - "~>"
80
100
  - !ruby/object:Gem::Version
81
- version: 2.13.0
101
+ version: 3.12.0
82
102
  type: :development
83
103
  prerelease: false
84
104
  version_requirements: !ruby/object:Gem::Requirement
85
105
  requirements:
86
106
  - - "~>"
87
107
  - !ruby/object:Gem::Version
88
- version: 2.13.0
108
+ version: 3.12.0
89
109
  - !ruby/object:Gem::Dependency
90
110
  name: webmock
91
111
  requirement: !ruby/object:Gem::Requirement
@@ -106,28 +126,56 @@ dependencies:
106
126
  requirements:
107
127
  - - "~>"
108
128
  - !ruby/object:Gem::Version
109
- version: 2.4.0
129
+ version: 2.8.1
110
130
  type: :development
111
131
  prerelease: false
112
132
  version_requirements: !ruby/object:Gem::Requirement
113
133
  requirements:
114
134
  - - "~>"
115
135
  - !ruby/object:Gem::Version
116
- version: 2.4.0
136
+ version: 2.8.1
117
137
  - !ruby/object:Gem::Dependency
118
138
  name: simplecov
119
139
  requirement: !ruby/object:Gem::Requirement
120
140
  requirements:
121
141
  - - "~>"
122
142
  - !ruby/object:Gem::Version
123
- version: 0.10.0
143
+ version: 0.22.0
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: 0.22.0
151
+ - !ruby/object:Gem::Dependency
152
+ name: standard
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: 1.30.1
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: 1.30.1
165
+ - !ruby/object:Gem::Dependency
166
+ name: psych
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '3'
124
172
  type: :development
125
173
  prerelease: false
126
174
  version_requirements: !ruby/object:Gem::Requirement
127
175
  requirements:
128
176
  - - "~>"
129
177
  - !ruby/object:Gem::Version
130
- version: 0.10.0
178
+ version: '3'
131
179
  description: Trino client library
132
180
  email:
133
181
  - sf@treasure-data.com
@@ -135,15 +183,10 @@ executables: []
135
183
  extensions: []
136
184
  extra_rdoc_files: []
137
185
  files:
138
- - ".github/CODEOWNERS"
139
- - ".github/PULL_REQUEST_TEMPLATE.md"
140
- - ".github/workflows/ruby.yml"
141
- - ".gitignore"
142
186
  - ChangeLog.md
143
- - Gemfile
144
187
  - LICENSE
145
188
  - README.md
146
- - Rakefile
189
+ - SECURITY.md
147
190
  - lib/trino-client.rb
148
191
  - lib/trino/client.rb
149
192
  - lib/trino/client/client.rb
@@ -161,29 +204,12 @@ files:
161
204
  - lib/trino/client/query.rb
162
205
  - lib/trino/client/statement_client.rb
163
206
  - lib/trino/client/version.rb
164
- - modelgen/model_versions.rb
165
- - modelgen/modelgen.rb
166
- - modelgen/models.rb
167
- - modelgen/trino_models.rb
168
- - publish.rb
169
- - release.rb
170
- - spec/basic_query_spec.rb
171
- - spec/client_spec.rb
172
- - spec/gzip_spec.rb
173
- - spec/model_spec.rb
174
- - spec/spec_helper.rb
175
- - spec/statement_client_spec.rb
176
- - spec/tpch/q01.sql
177
- - spec/tpch/q02.sql
178
- - spec/tpch_query_spec.rb
179
- - trino-client-ruby/lib/trino-client-ruby.rb
180
- - trino-client-ruby/trino-client-ruby.gemspec
181
207
  - trino-client.gemspec
182
208
  homepage: https://github.com/treasure-data/trino-client-ruby
183
209
  licenses:
184
210
  - Apache-2.0
185
211
  metadata: {}
186
- post_install_message:
212
+ post_install_message:
187
213
  rdoc_options: []
188
214
  require_paths:
189
215
  - lib
@@ -191,24 +217,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
217
  requirements:
192
218
  - - ">="
193
219
  - !ruby/object:Gem::Version
194
- version: 1.9.1
220
+ version: 2.7.0
195
221
  required_rubygems_version: !ruby/object:Gem::Requirement
196
222
  requirements:
197
223
  - - ">="
198
224
  - !ruby/object:Gem::Version
199
225
  version: '0'
200
226
  requirements: []
201
- rubygems_version: 3.0.3
202
- signing_key:
227
+ rubygems_version: 3.3.7
228
+ signing_key:
203
229
  specification_version: 4
204
230
  summary: Trino client library
205
- test_files:
206
- - spec/basic_query_spec.rb
207
- - spec/client_spec.rb
208
- - spec/gzip_spec.rb
209
- - spec/model_spec.rb
210
- - spec/spec_helper.rb
211
- - spec/statement_client_spec.rb
212
- - spec/tpch/q01.sql
213
- - spec/tpch/q02.sql
214
- - spec/tpch_query_spec.rb
231
+ test_files: []
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @treasure-data/mpp
@@ -1,18 +0,0 @@
1
- # Purpose
2
-
3
- Briefly describe the purpose of the pull request.
4
-
5
- # Overview
6
-
7
- Describe the list of work you have done in this pull request.
8
-
9
- Example:
10
- - Add something
11
- - Remove other things
12
-
13
- # Checklist
14
-
15
- - [ ] Code compiles correctly
16
- - [ ] Created tests which fail without the change (if possible)
17
- - [ ] All tests passing
18
- - [ ] Extended the README / documentation, if necessary
@@ -1,30 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
- name: Ruby
9
-
10
- on: [push, pull_request]
11
-
12
- jobs:
13
- test:
14
- runs-on: ubuntu-latest
15
- strategy:
16
- matrix:
17
- ruby-version: ['2.5', '2.6', '2.7']
18
-
19
- steps:
20
- - uses: actions/checkout@v2
21
- - name: Set up Ruby
22
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
23
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
24
- # uses: ruby/setup-ruby@v1
25
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
26
- with:
27
- ruby-version: ${{ matrix.ruby-version }}
28
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
29
- - name: Run tests
30
- run: bundle exec rake spec
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- Gemfile.lock
2
- tmp/*
3
- pkg/*
4
- coverage/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org/'
2
- gemspec
3
-
4
- group :development, :test do
5
- gem 'tiny-presto', "~> 0.0.8"
6
- end
data/Rakefile DELETED
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
-
4
- require 'rake/testtask'
5
- require 'rake/clean'
6
-
7
- require 'rspec/core/rake_task'
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- task :default => [:spec, :build]
12
-
13
- GEN_MODEL_VERSIONS = %w[
14
- 351
15
- ]
16
-
17
- namespace "modelgen" do
18
- task :latest => :all do
19
- require 'erb'
20
- erb = ERB.new(File.read("modelgen/models.rb"))
21
- @versions = GEN_MODEL_VERSIONS
22
- @latest_version = GEN_MODEL_VERSIONS.last
23
- data = erb.result
24
- File.write("lib/trino/client/models.rb", data)
25
- end
26
-
27
- task :all => GEN_MODEL_VERSIONS
28
-
29
- GEN_MODEL_VERSIONS.each do |ver|
30
- file "build/trino-#{ver}.tar.gz" do
31
- mkdir_p "build"
32
- sh "curl -L -o build/trino-#{ver}.tar.gz https://github.com/trinodb/trino/archive/#{ver}.tar.gz"
33
- end
34
-
35
- file "lib/trino/client/model_versions/#{ver}.rb" => "build/trino-#{ver}.tar.gz" do
36
- sh "tar zxf build/trino-#{ver}.tar.gz -C build"
37
- mkdir_p "lib/trino/client/model_versions"
38
- sh "#{RbConfig.ruby} modelgen/modelgen.rb #{ver} build/trino-#{ver} modelgen/model_versions.rb lib/trino/client/model_versions/#{ver}.rb"
39
- puts "Generated lib/trino/client/model_versions/#{ver}.rb."
40
- end
41
-
42
- task ver => "lib/trino/client/model_versions/#{ver}.rb"
43
- end
44
- end
45
-