From f31e1a310105fdce4a9180340ccc56dce6d93a7d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 22:41:21 +0100 Subject: [PATCH 01/10] Chore: Ignore local `vendor` directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 34c3268..c89f452 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,6 @@ log/crate.log crate_test_server.* crate-*.tar.gz parts/ +vendor/ .byebug_history From 3d4f70a60e68463d5db8063ceece4ec579ee471e Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 22:41:47 +0100 Subject: [PATCH 02/10] Documentation: Inform how to update the requirements lock file --- DEVELOP.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DEVELOP.rst b/DEVELOP.rst index 138e5dc..23e82eb 100644 --- a/DEVELOP.rst +++ b/DEVELOP.rst @@ -17,6 +17,9 @@ Then, run tests:: $ bundle exec rspec +Linter +====== + Run linter:: $ bundle exec rubocop @@ -25,6 +28,13 @@ Update linter violations file:: $ bundle exec rubocop --auto-gen-config +Dependencies +============ + +Update lock file ``Gemfile.lock``:: + + $ bundle update + Preparing a Release =================== From aeec87143777563768129b9c2549ba96c179b1b5 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 8 Apr 2024 19:11:14 +0200 Subject: [PATCH 03/10] CI: Add Ruby 3.3 to test matrix Ruby 3.3.0 has been released on 25 Dec 2023. -- https://www.ruby-lang.org/en/downloads/releases/ --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7366f03..58f4484 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-22.04", "macos-15-intel" ] # , windows-latest ] - ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2" ] + ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3" ] name: Ruby ${{ matrix.ruby-version }} on OS ${{ matrix.os }} steps: From 989bb5926ff70af92bfae189f2552b9d7174f9df Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 22:42:10 +0100 Subject: [PATCH 04/10] Dependencies: Update Gemfile.lock using ruby 3.3.10 --- Gemfile.lock | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7bbc7df..f245d7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,29 +6,32 @@ PATH GEM remote: https://rubygems.org/ specs: - ast (2.4.2) - diff-lcs (1.5.1) + ast (2.4.3) + diff-lcs (1.6.2) os (1.1.4) - parallel (1.22.1) - parser (3.1.3.0) + parallel (1.27.0) + parser (3.3.10.1) ast (~> 2.4.1) + racc + prism (1.9.0) + racc (1.8.1) rainbow (3.1.1) - rake (13.2.1) - regexp_parser (2.6.1) - rexml (3.2.5) - rspec (3.13.0) + rake (13.3.1) + regexp_parser (2.11.3) + rexml (3.4.4) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.2) + rspec-core (3.13.6) rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) + rspec-mocks (3.13.7) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.2) + rspec-support (3.13.7) rubocop (1.12.1) parallel (~> 1.10) parser (>= 3.0.0.0) @@ -38,20 +41,22 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.23.0) - parser (>= 3.1.1.0) - rubocop-rake (0.5.1) - rubocop - rubocop-rspec (2.3.0) + rubocop-ast (1.49.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.4.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) - ruby-progressbar (1.11.0) - unicode-display_width (2.3.0) + ruby-progressbar (1.13.0) + unicode-display_width (2.6.0) PLATFORMS x86_64-darwin-17 x86_64-darwin-19 x86_64-darwin-20 + x86_64-darwin-23 x86_64-linux DEPENDENCIES @@ -65,4 +70,4 @@ DEPENDENCIES rubocop-rspec BUNDLED WITH - 2.2.16 + 2.7.1 From b96aaba694b9da62eef440ee8a58b7e4a8b7424f Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:04:25 +0100 Subject: [PATCH 05/10] Dependencies: Update to rubocop 1.39 --- Gemfile.lock | 17 +++++++++-------- crate_ruby.gemspec | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f245d7c..82ca0fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,6 +8,7 @@ GEM specs: ast (2.4.3) diff-lcs (1.6.2) + json (2.18.1) os (1.1.4) parallel (1.27.0) parser (3.3.10.1) @@ -32,13 +33,14 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.12.1) + rubocop (1.39.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.2.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.23.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.49.0) @@ -46,9 +48,8 @@ GEM prism (~> 1.7) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.4.0) - rubocop (~> 1.0) - rubocop-ast (>= 1.1.0) + rubocop-rspec (2.17.1) + rubocop (~> 1.33) ruby-progressbar (1.13.0) unicode-display_width (2.6.0) @@ -65,7 +66,7 @@ DEPENDENCIES os rake rspec (~> 3.10) - rubocop (< 1.13) + rubocop (< 1.40) rubocop-rake rubocop-rspec diff --git a/crate_ruby.gemspec b/crate_ruby.gemspec index c872941..59e67c1 100644 --- a/crate_ruby.gemspec +++ b/crate_ruby.gemspec @@ -60,7 +60,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'os' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.10' - spec.add_development_dependency 'rubocop', '< 1.13' + spec.add_development_dependency 'rubocop', '< 1.40' spec.add_development_dependency 'rubocop-rake' spec.add_development_dependency 'rubocop-rspec' end From 62b6710a9e2866e9c29de0cdee82ba46539683f9 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:05:42 +0100 Subject: [PATCH 06/10] Modernize: Implement suggestions by rubocop 1.39 - `bundle exec rubocop --autocorrect` - Add `base64` to dependencies --- Gemfile.lock | 2 ++ crate_ruby.gemspec | 5 +++-- spec/bootstrap.rb | 4 +--- spec/crate_ruby/client_spec.rb | 9 ++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 82ca0fb..09061b8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,6 +7,7 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.3) + base64 (0.3.0) diff-lcs (1.6.2) json (2.18.1) os (1.1.4) @@ -61,6 +62,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + base64 bundler crate_ruby! os diff --git a/crate_ruby.gemspec b/crate_ruby.gemspec index 59e67c1..306c8d5 100644 --- a/crate_ruby.gemspec +++ b/crate_ruby.gemspec @@ -37,7 +37,6 @@ Gem::Specification.new do |spec| spec.files = Dir['lib/**/*'] spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = %w[lib] spec.extra_rdoc_files = Dir['README.rst', 'CHANGES.rst', 'LICENSE', 'NOTICE'] spec.rdoc_options += [ @@ -53,9 +52,11 @@ Gem::Specification.new do |spec| 'changelog_uri' => 'https://github.com/crate/crate_ruby/blob/main/CHANGES.rst', 'documentation_uri' => 'https://www.rubydoc.info/gems/crate_ruby', 'homepage_uri' => spec.homepage, - 'source_code_uri' => 'https://github.com/crate/crate_ruby' + 'source_code_uri' => 'https://github.com/crate/crate_ruby', + 'rubygems_mfa_required' => 'true' } + spec.add_development_dependency 'base64' spec.add_development_dependency 'bundler' spec.add_development_dependency 'os' spec.add_development_dependency 'rake' diff --git a/spec/bootstrap.rb b/spec/bootstrap.rb index e7eab94..ec00621 100755 --- a/spec/bootstrap.rb +++ b/spec/bootstrap.rb @@ -58,9 +58,7 @@ def download Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| request = Net::HTTP::Get.new uri resp = http.request request - File.open(@fname, 'wb') do |file| - file.write(resp.body) - end + File.binwrite(@fname, resp.body) end end diff --git a/spec/crate_ruby/client_spec.rb b/spec/crate_ruby/client_spec.rb index 1ea93d1..a2ab065 100644 --- a/spec/crate_ruby/client_spec.rb +++ b/spec/crate_ruby/client_spec.rb @@ -72,9 +72,7 @@ it 'downloads a blob' do data = client.blob_get(blob_table, digest) expect(data).to be_truthy - File.open(store_location, 'wb') do |file| - file.write(data) - end + File.binwrite(store_location, data) end end @@ -85,7 +83,8 @@ end it 'deletes a blob' do - client.blob_delete(blob_table, digest) + response = client.blob_delete(blob_table, digest) + expect(response).to be_falsy end end end @@ -95,7 +94,7 @@ before do client.execute("create table #{table_name} " \ - '(id integer primary key, name string, address object, tags array(string)) ') + '(id integer primary key, name string, address object, tags array(string)) ') end after do From ed36bd599fc90bf59e4a74a9e5a137f77884a79a Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:08:53 +0100 Subject: [PATCH 07/10] Dependencies: Pretend `Gemfile.lock` was bundled with bundler `2.2.16` --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 09061b8..1914a17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -73,4 +73,4 @@ DEPENDENCIES rubocop-rspec BUNDLED WITH - 2.7.1 + 2.2.16 From 1ab55f5d734c329412a94c4ab22dd6c9b292f775 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:12:04 +0100 Subject: [PATCH 08/10] CI: Remove Ruby 2.4 and 2.5 from test matrix Those are old versions, and apparently fail on CI now. https://github.com/crate/crate_ruby/actions/runs/21842711977/job/63030941887 --- .github/workflows/tests.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58f4484..e73fa8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,14 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-22.04", "macos-15-intel" ] # , windows-latest ] - ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3" ] + ruby-version: [ + "2.6", + "2.7", + "3.0", + "3.1", + "3.2", + "3.3", + ] name: Ruby ${{ matrix.ruby-version }} on OS ${{ matrix.os }} steps: From e4b91c6de60f20d3c71838ead799c81373254681 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:17:10 +0100 Subject: [PATCH 09/10] Project: Adjust minimum dependency to Ruby >= 2.5 --- .rubocop.yml | 2 +- crate_ruby.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3240022..2fc2808 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,4 +4,4 @@ require: rubocop-rspec AllCops: NewCops: enable - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 diff --git a/crate_ruby.gemspec b/crate_ruby.gemspec index 306c8d5..525bfca 100644 --- a/crate_ruby.gemspec +++ b/crate_ruby.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.description = 'A Ruby library for the CrateDB HTTP interface with query support, DDL command and schema introspection shortcuts, and support for BLOB tables.' spec.homepage = 'https://crate.io' spec.license = 'Apache-2.0' - spec.required_ruby_version = '>= 2.4' + spec.required_ruby_version = '>= 2.5' spec.files = Dir['lib/**/*'] spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } From 554962ce6ee4a337c95c2ae635aa670236f4527d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 9 Feb 2026 23:22:08 +0100 Subject: [PATCH 10/10] Dependencies: Remove `rake`, as suggested by rubocop --- Gemfile.lock | 5 ----- crate_ruby.gemspec | 2 -- 2 files changed, 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1914a17..4f7a8a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,6 @@ GEM prism (1.9.0) racc (1.8.1) rainbow (3.1.1) - rake (13.3.1) regexp_parser (2.11.3) rexml (3.4.4) rspec (3.13.2) @@ -47,8 +46,6 @@ GEM rubocop-ast (1.49.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-rake (0.6.0) - rubocop (~> 1.0) rubocop-rspec (2.17.1) rubocop (~> 1.33) ruby-progressbar (1.13.0) @@ -66,10 +63,8 @@ DEPENDENCIES bundler crate_ruby! os - rake rspec (~> 3.10) rubocop (< 1.40) - rubocop-rake rubocop-rspec BUNDLED WITH diff --git a/crate_ruby.gemspec b/crate_ruby.gemspec index 525bfca..d8e44dc 100644 --- a/crate_ruby.gemspec +++ b/crate_ruby.gemspec @@ -59,9 +59,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'base64' spec.add_development_dependency 'bundler' spec.add_development_dependency 'os' - spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.10' spec.add_development_dependency 'rubocop', '< 1.40' - spec.add_development_dependency 'rubocop-rake' spec.add_development_dependency 'rubocop-rspec' end