Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for ruby 3 kwargs changes #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
# inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.0.0
CacheRootDirectory: .cache
NewCops: enable
Layout/ArgumentAlignment:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
3.1.3
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.4-slim-buster@sha256:afc5840d7214ce2f39f2ab18a32115a5b88b282394f286c00131f2799c49f76b AS ruby-base
FROM ruby:3.1.3-slim-bullseye@sha256:a6f940b1fca8a057561ac86f431539df2e77b954370fa17348f5a5ec3cba1cad AS ruby-base

ENV RUBY_BUNDLER_VERSION '2.2.30'
ENV BUNDLE_PATH /usr/local/bundle
Expand Down
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PATH
amazing_print (~> 1.3)
google-cloud-bigquery (~> 1.35)
paint (~> 2.2)
sequel (~> 5.48)
sequel (~> 5.63)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -145,7 +145,7 @@ GEM
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
sequel (5.50.0)
sequel (5.63.0)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
Expand All @@ -158,6 +158,8 @@ GEM
webrick (1.7.0)

PLATFORMS
x86_64-darwin-20
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -172,4 +174,4 @@ DEPENDENCIES
sequel-bigquery!

BUNDLED WITH
2.2.30
2.3.26
6 changes: 3 additions & 3 deletions lib/sequel-bigquery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module Bigquery
class Database < Sequel::Database # rubocop:disable Metrics/ClassLength
set_adapter_scheme :bigquery

def initialize(*args, **kwargs)
@bigquery_config = kwargs.fetch(:orig_opts)
def initialize(opts)
@bigquery_config = opts.fetch(:orig_opts)
@sql_buffer = []
@sql_buffering = false
super
Expand All @@ -32,7 +32,7 @@ def connect(*_args)

def bigquery
# ObjectSpace.each_object(HTTPClient).each { |c| c.debug_dev = STDOUT }
@bigquery ||= Google::Cloud::Bigquery.new(google_cloud_bigquery_gem_config)
@bigquery ||= Google::Cloud::Bigquery.new(**google_cloud_bigquery_gem_config)
end

def disconnect_connection(_c)
Expand Down
4 changes: 2 additions & 2 deletions sequel-bigquery.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|

spec.summary = "A Sequel adapter for Google's BigQuery"
spec.homepage = 'https://github.com/ZimbiX/sequel-bigquery'
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
spec.required_ruby_version = Gem::Requirement.new('>= 3.0.0')

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = spec.homepage
Expand All @@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
spec.add_dependency 'amazing_print', '~> 1.3'
spec.add_dependency 'google-cloud-bigquery', '~> 1.35'
spec.add_dependency 'paint', '~> 2.2'
spec.add_dependency 'sequel', '~> 5.48'
spec.add_dependency 'sequel', '~> 5.63'
end