trino-client 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +4 -0
- data/README.md +1 -1
- data/SECURITY.md +7 -0
- data/lib/trino/client/version.rb +1 -1
- data/trino-client.gemspec +2 -2
- metadata +5 -33
- data/.github/CODEOWNERS +0 -1
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -18
- data/.github/dependabot.yaml +0 -10
- data/.github/release-drafter.yml +0 -45
- data/.github/workflows/codeql-analysis.yml +0 -71
- data/.github/workflows/release-drafter.yml +0 -29
- data/.github/workflows/ruby.yml +0 -39
- data/.gitignore +0 -4
- data/.standard.yml +0 -15
- data/.standard_todo.yml +0 -80
- data/Gemfile +0 -7
- data/Rakefile +0 -44
- data/modelgen/model_versions.rb +0 -280
- data/modelgen/modelgen.rb +0 -117
- data/modelgen/models.rb +0 -31
- data/modelgen/trino_models.rb +0 -268
- data/publish.rb +0 -13
- data/release.rb +0 -56
- data/spec/basic_query_spec.rb +0 -82
- data/spec/client_spec.rb +0 -75
- data/spec/gzip_spec.rb +0 -40
- data/spec/model_spec.rb +0 -37
- data/spec/spec_helper.rb +0 -43
- data/spec/statement_client_spec.rb +0 -634
- data/spec/tpch/q01.sql +0 -21
- data/spec/tpch/q02.sql +0 -43
- data/spec/tpch_query_spec.rb +0 -41
- data/trino-client-ruby/lib/trino-client-ruby.rb +0 -1
- data/trino-client-ruby/trino-client-ruby.gemspec +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50686d406d4aedd29016b8b5cfee3024869e797791cc53e099dbf813f6a7d135
|
4
|
+
data.tar.gz: d4d2e2762b8eba6ecaf6c2dd07c19f1db37eee5c8d1ebf4c995d88ec768fe62c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 203db357ca5034c2000d836667ac1bb92d976300d7299663105af90f284657854eb061625b48756a4cba0d21a4d8342d5006c95a7b6eab7e37ca1abbe832c21d
|
7
|
+
data.tar.gz: 5566882e00f6edac34ac3d863d78aea8f3358e829b86d7ffff9f51582b42315b7a2b87e0d71a7b22cfd98eea5ac0fb20ab28f1e219991f1ac62e28256cf914ec
|
data/ChangeLog.md
CHANGED
@@ -1,5 +1,9 @@
|
|
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
|
+
|
3
7
|
## 2.0.0
|
4
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)]
|
5
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)]
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Trino client library for Ruby
|
2
2
|
|
3
|
-
[![
|
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!
|
data/lib/trino/client/version.rb
CHANGED
data/trino-client.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
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(
|
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
15
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
|
@@ -27,6 +27,6 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.add_development_dependency "webmock", ["~> 3.0"]
|
28
28
|
gem.add_development_dependency "addressable", "~> 2.8.1" # 2.5.0 doesn't support Ruby 1.9.3
|
29
29
|
gem.add_development_dependency "simplecov", "~> 0.22.0"
|
30
|
-
gem.add_development_dependency "standard", "~> 1.
|
30
|
+
gem.add_development_dependency "standard", "~> 1.30.1"
|
31
31
|
gem.add_development_dependency "psych", "~> 3"
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trino-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -154,14 +154,14 @@ dependencies:
|
|
154
154
|
requirements:
|
155
155
|
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 1.
|
157
|
+
version: 1.30.1
|
158
158
|
type: :development
|
159
159
|
prerelease: false
|
160
160
|
version_requirements: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 1.
|
164
|
+
version: 1.30.1
|
165
165
|
- !ruby/object:Gem::Dependency
|
166
166
|
name: psych
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,21 +183,10 @@ executables: []
|
|
183
183
|
extensions: []
|
184
184
|
extra_rdoc_files: []
|
185
185
|
files:
|
186
|
-
- ".github/CODEOWNERS"
|
187
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
188
|
-
- ".github/dependabot.yaml"
|
189
|
-
- ".github/release-drafter.yml"
|
190
|
-
- ".github/workflows/codeql-analysis.yml"
|
191
|
-
- ".github/workflows/release-drafter.yml"
|
192
|
-
- ".github/workflows/ruby.yml"
|
193
|
-
- ".gitignore"
|
194
|
-
- ".standard.yml"
|
195
|
-
- ".standard_todo.yml"
|
196
186
|
- ChangeLog.md
|
197
|
-
- Gemfile
|
198
187
|
- LICENSE
|
199
188
|
- README.md
|
200
|
-
-
|
189
|
+
- SECURITY.md
|
201
190
|
- lib/trino-client.rb
|
202
191
|
- lib/trino/client.rb
|
203
192
|
- lib/trino/client/client.rb
|
@@ -215,23 +204,6 @@ files:
|
|
215
204
|
- lib/trino/client/query.rb
|
216
205
|
- lib/trino/client/statement_client.rb
|
217
206
|
- lib/trino/client/version.rb
|
218
|
-
- modelgen/model_versions.rb
|
219
|
-
- modelgen/modelgen.rb
|
220
|
-
- modelgen/models.rb
|
221
|
-
- modelgen/trino_models.rb
|
222
|
-
- publish.rb
|
223
|
-
- release.rb
|
224
|
-
- spec/basic_query_spec.rb
|
225
|
-
- spec/client_spec.rb
|
226
|
-
- spec/gzip_spec.rb
|
227
|
-
- spec/model_spec.rb
|
228
|
-
- spec/spec_helper.rb
|
229
|
-
- spec/statement_client_spec.rb
|
230
|
-
- spec/tpch/q01.sql
|
231
|
-
- spec/tpch/q02.sql
|
232
|
-
- spec/tpch_query_spec.rb
|
233
|
-
- trino-client-ruby/lib/trino-client-ruby.rb
|
234
|
-
- trino-client-ruby/trino-client-ruby.gemspec
|
235
207
|
- trino-client.gemspec
|
236
208
|
homepage: https://github.com/treasure-data/trino-client-ruby
|
237
209
|
licenses:
|
data/.github/CODEOWNERS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
* @treasure-data/query
|
@@ -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
|
data/.github/dependabot.yaml
DELETED
data/.github/release-drafter.yml
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
name-template: 'v$RESOLVED_VERSION'
|
2
|
-
tag-template: 'v$RESOLVED_VERSION'
|
3
|
-
categories:
|
4
|
-
- title: '🚀 Features'
|
5
|
-
labels:
|
6
|
-
- 'feature'
|
7
|
-
- 'enhancement'
|
8
|
-
- title: '🐛 Bug Fixes'
|
9
|
-
labels:
|
10
|
-
- 'bug'
|
11
|
-
- title: '👋 Deprecated'
|
12
|
-
labels:
|
13
|
-
- 'deprecation'
|
14
|
-
- title: '⛓ Dependency Updates'
|
15
|
-
label:
|
16
|
-
- 'library-update'
|
17
|
-
- 'test-library-update'
|
18
|
-
- 'dependencies'
|
19
|
-
- title: '🛠 Internal Updates'
|
20
|
-
label:
|
21
|
-
- 'internal'
|
22
|
-
- 'kaizen'
|
23
|
-
- 'chore'
|
24
|
-
- title: '📚 Docs'
|
25
|
-
labels:
|
26
|
-
- 'doc'
|
27
|
-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
28
|
-
|
29
|
-
template: |
|
30
|
-
## What's Changed
|
31
|
-
$CHANGES
|
32
|
-
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
33
|
-
|
34
|
-
autolabeler:
|
35
|
-
- label: 'doc'
|
36
|
-
files:
|
37
|
-
- '*.md'
|
38
|
-
- '*.yml'
|
39
|
-
- '*.yaml'
|
40
|
-
- label: 'bug'
|
41
|
-
title:
|
42
|
-
- '/fix/i'
|
43
|
-
- label: 'deprecation'
|
44
|
-
title:
|
45
|
-
- '/deprecate/i'
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
2
|
-
# to commit it to your repository.
|
3
|
-
#
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
-
# or to provide custom queries or build logic.
|
6
|
-
#
|
7
|
-
# ******** NOTE ********
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
-
# supported CodeQL languages.
|
11
|
-
#
|
12
|
-
name: "CodeQL"
|
13
|
-
|
14
|
-
on:
|
15
|
-
push:
|
16
|
-
branches: [master]
|
17
|
-
pull_request:
|
18
|
-
# The branches below must be a subset of the branches above
|
19
|
-
branches: [master]
|
20
|
-
schedule:
|
21
|
-
- cron: "15 3 * * 1"
|
22
|
-
|
23
|
-
jobs:
|
24
|
-
analyze:
|
25
|
-
name: Analyze
|
26
|
-
runs-on: ubuntu-latest
|
27
|
-
permissions:
|
28
|
-
actions: read
|
29
|
-
contents: read
|
30
|
-
security-events: write
|
31
|
-
|
32
|
-
strategy:
|
33
|
-
fail-fast: false
|
34
|
-
matrix:
|
35
|
-
language: ["ruby"]
|
36
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
38
|
-
|
39
|
-
steps:
|
40
|
-
- name: Checkout repository
|
41
|
-
uses: actions/checkout@v3
|
42
|
-
|
43
|
-
# Initializes the CodeQL tools for scanning.
|
44
|
-
- name: Initialize CodeQL
|
45
|
-
uses: github/codeql-action/init@v2
|
46
|
-
with:
|
47
|
-
languages: ${{ matrix.language }}
|
48
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
-
# By default, queries listed here will override any specified in a config file.
|
50
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
-
|
52
|
-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
53
|
-
# queries: security-extended,security-and-quality
|
54
|
-
|
55
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
56
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
57
|
-
- name: Autobuild
|
58
|
-
uses: github/codeql-action/autobuild@v2
|
59
|
-
|
60
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
61
|
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
62
|
-
|
63
|
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
64
|
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
65
|
-
|
66
|
-
# - run: |
|
67
|
-
# echo "Run, Build Application using script"
|
68
|
-
# ./location_of_script_within_repo/buildscript.sh
|
69
|
-
|
70
|
-
- name: Perform CodeQL Analysis
|
71
|
-
uses: github/codeql-action/analyze@v2
|
@@ -1,29 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Release Drafter
|
3
|
-
|
4
|
-
on:
|
5
|
-
workflow_dispatch:
|
6
|
-
push:
|
7
|
-
branches:
|
8
|
-
- master
|
9
|
-
pull_request:
|
10
|
-
# Only following types are handled by the action, but one can default to all as well
|
11
|
-
types: [opened, reopened, synchronize]
|
12
|
-
# pull_request_target event is required for auto-labeler to support PRs from forks
|
13
|
-
pull_request_target:
|
14
|
-
types: [opened, reopened, synchronize]
|
15
|
-
|
16
|
-
permissions:
|
17
|
-
contents: read
|
18
|
-
|
19
|
-
jobs:
|
20
|
-
update_release_draft:
|
21
|
-
permissions:
|
22
|
-
contents: write
|
23
|
-
pull-requests: write
|
24
|
-
runs-on: ubuntu-latest
|
25
|
-
steps:
|
26
|
-
# Drafts your next Release notes as Pull Requests are merged into "master"
|
27
|
-
- uses: release-drafter/release-drafter@v5
|
28
|
-
env:
|
29
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/ruby.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# This workflow uses actions that are not certified by GitHub.
|
3
|
-
# They are provided by a third-party and are governed by
|
4
|
-
# separate terms of service, privacy policy, and support
|
5
|
-
# documentation.
|
6
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
7
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
8
|
-
|
9
|
-
name: Ruby
|
10
|
-
|
11
|
-
on:
|
12
|
-
push:
|
13
|
-
branches:
|
14
|
-
- main
|
15
|
-
- master
|
16
|
-
pull_request:
|
17
|
-
|
18
|
-
jobs:
|
19
|
-
test:
|
20
|
-
runs-on: ubuntu-latest
|
21
|
-
strategy:
|
22
|
-
fail-fast: false
|
23
|
-
matrix:
|
24
|
-
ruby-version: ['2.7', '3.0', '3.2']
|
25
|
-
faraday-version: ['~> 1', '~> 2']
|
26
|
-
env:
|
27
|
-
FARADAY_VERSION: ${{ matrix.faraday-version }}
|
28
|
-
timeout-minutes: 5 # Typically ends within 1-2 min
|
29
|
-
steps:
|
30
|
-
- uses: actions/checkout@v3
|
31
|
-
- name: Set up Ruby
|
32
|
-
uses: ruby/setup-ruby@v1
|
33
|
-
with:
|
34
|
-
ruby-version: ${{ matrix.ruby-version }}
|
35
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
36
|
-
- name: Check coding style
|
37
|
-
run: bundle exec standardrb
|
38
|
-
- name: Run tests
|
39
|
-
run: bundle exec rake spec
|
data/.gitignore
DELETED
data/.standard.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
fix: false
|
3
|
-
format: progress # default: Standard::Formatter
|
4
|
-
default_ignores: false # default: true
|
5
|
-
|
6
|
-
ignore:
|
7
|
-
- 'vendor/bundle/**/*'
|
8
|
-
- lib/trino/client/model_versions/0.149.rb
|
9
|
-
- lib/trino/client/model_versions/0.153.rb
|
10
|
-
- lib/trino/client/model_versions/0.173.rb
|
11
|
-
- lib/trino/client/model_versions/0.178.rb
|
12
|
-
- lib/trino/client/model_versions/0.205.rb
|
13
|
-
- lib/trino/client/model_versions/303.rb
|
14
|
-
- lib/trino/client/model_versions/316.rb
|
15
|
-
- lib/trino/client/model_versions/351.rb
|
data/.standard_todo.yml
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
---
|
2
|
-
ignore:
|
3
|
-
- 'lib/trino/client/*.rb':
|
4
|
-
- Layout/EmptyLinesAroundModuleBody
|
5
|
-
- Layout/FirstHashElementIndentation
|
6
|
-
- Layout/SpaceAroundEqualsInParameterDefault
|
7
|
-
- Layout/SpaceInsideBlockBraces
|
8
|
-
- Layout/SpaceInsideBlockBraces
|
9
|
-
- Lint/AssignmentInCondition
|
10
|
-
- Lint/UselessAssignment
|
11
|
-
- Naming/VariableName
|
12
|
-
- Performance/RegexpMatch
|
13
|
-
- Performance/StringReplacement
|
14
|
-
- Style/ConditionalAssignment
|
15
|
-
- Style/HashConversion
|
16
|
-
- Style/HashSyntax
|
17
|
-
- Style/NilComparison
|
18
|
-
- Style/RedundantBegin
|
19
|
-
- Style/RedundantFileExtensionInRequire
|
20
|
-
- Style/RedundantInterpolation
|
21
|
-
- Style/RedundantReturn
|
22
|
-
- Style/RedundantSelf
|
23
|
-
- Style/SafeNavigation
|
24
|
-
- Style/Semicolon
|
25
|
-
- Style/StringLiterals
|
26
|
-
- Style/StringLiteralsInInterpolation
|
27
|
-
- Style/TernaryParentheses
|
28
|
-
- Style/TrailingCommaInHashLiteral
|
29
|
-
|
30
|
-
- 'modelgen/model_versions.rb': &modelgen_common
|
31
|
-
- Style/StringLiterals # TODO: Remove this later
|
32
|
-
- Layout/DotPosition # TODO: Remove this later
|
33
|
-
# NOTE: Selecting the below items
|
34
|
-
- Layout/ArrayAlignment
|
35
|
-
- Layout/EmptyLinesAroundExceptionHandlingKeywords
|
36
|
-
- Layout/FirstArrayElementIndentation
|
37
|
-
- Layout/FirstHashElementIndentation
|
38
|
-
- Lint/AssignmentInCondition
|
39
|
-
- Lint/Syntax
|
40
|
-
- Lint/UselessAssignment
|
41
|
-
- Performance/FlatMap
|
42
|
-
- Performance/RegexpMatch
|
43
|
-
- Style/InfiniteLoop
|
44
|
-
- Style/RedundantRegexpCharacterClass
|
45
|
-
- Style/RedundantRegexpEscape
|
46
|
-
- Style/StringLiteralsInInterpolation
|
47
|
-
- 'modelgen/modelgen.rb': *modelgen_common
|
48
|
-
- 'modelgen/models.rb': *modelgen_common
|
49
|
-
- 'modelgen/trino_models.rb': *modelgen_common
|
50
|
-
- 'spec/*.rb':
|
51
|
-
- Style/StringLiterals # TODO: Remove this later
|
52
|
-
- Layout/DotPosition # TODO: Remove this later
|
53
|
-
- Style/RedundantBegin
|
54
|
-
- Style/TrailingCommaInHashLiteral
|
55
|
-
- Lint/Void
|
56
|
-
- Layout/FirstHashElementIndentation
|
57
|
-
- Style/For
|
58
|
-
- Style/Semicolon
|
59
|
-
- Lint/UselessAssignment
|
60
|
-
- Style/MixinUsage
|
61
|
-
# NOTE: Selecting the below items
|
62
|
-
- Layout/ClosingParenthesisIndentation
|
63
|
-
- Layout/HashAlignment
|
64
|
-
- Layout/IndentationConsistency
|
65
|
-
- Layout/MultilineMethodCallBraceLayout
|
66
|
-
- Layout/MultilineMethodCallIndentation
|
67
|
-
- Lint/ElseLayout
|
68
|
-
- Lint/ParenthesesAsGroupedExpression
|
69
|
-
- Style/HashSyntax
|
70
|
-
- Style/IfWithSemicolon
|
71
|
-
- Style/MethodCallWithoutArgsParentheses
|
72
|
-
- Style/OneLineConditional
|
73
|
-
- Style/RescueStandardError
|
74
|
-
- Style/StderrPuts
|
75
|
-
- '**/*.gemspec':
|
76
|
-
- Layout/ExtraSpacing
|
77
|
-
- 'release.rb':
|
78
|
-
- Style/TrailingCommaInArguments
|
79
|
-
- Style/SlicingWithRange
|
80
|
-
- Style/GlobalStdStream
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,44 +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
|