Skip to content
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
ruby-version: [
"2.6",
"2.7",
"3.0",
"3.1",
"3.2",
"3.3",
]

name: Ruby ${{ matrix.ruby-version }} on OS ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ log/crate.log
crate_test_server.*
crate-*.tar.gz
parts/
vendor/

.byebug_history
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ require: rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
10 changes: 10 additions & 0 deletions DEVELOP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Then, run tests::

$ bundle exec rspec

Linter
======

Run linter::

$ bundle exec rubocop
Expand All @@ -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
===================
Expand Down
59 changes: 31 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,65 @@ PATH
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
diff-lcs (1.5.1)
ast (2.4.3)
base64 (0.3.0)
diff-lcs (1.6.2)
json (2.18.1)
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)
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)
rubocop (1.12.1)
rspec-support (3.13.7)
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.23.0)
parser (>= 3.1.1.0)
rubocop-rake (0.5.1)
rubocop
rubocop-rspec (2.3.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (2.3.0)
rubocop-ast (1.49.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-rspec (2.17.1)
rubocop (~> 1.33)
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
base64
bundler
crate_ruby!
os
rake
rspec (~> 3.10)
rubocop (< 1.13)
rubocop-rake
rubocop (< 1.40)
rubocop-rspec

BUNDLED WITH
Expand Down
11 changes: 5 additions & 6 deletions crate_ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ 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) }
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 += [
Expand All @@ -53,14 +52,14 @@ 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'
spec.add_development_dependency 'rspec', '~> 3.10'
spec.add_development_dependency 'rubocop', '< 1.13'
spec.add_development_dependency 'rubocop-rake'
spec.add_development_dependency 'rubocop', '< 1.40'
spec.add_development_dependency 'rubocop-rspec'
end
4 changes: 1 addition & 3 deletions spec/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 4 additions & 5 deletions spec/crate_ruby/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
Loading