Skip to content

Commit cd8627b

Browse files
committed
chore(ruby): Use rubygems-requirements-system
1 parent 900fe52 commit cd8627b

File tree

4 files changed

+26
-50
lines changed

4 files changed

+26
-50
lines changed

dev/release/verify-release-candidate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020

2121
# Requirements
22-
# - Ruby >= 2.3
22+
# - Ruby >= 3.2
2323
# - Maven >= 3.3.9
2424
# - JDK >= 11
2525
# - gcc >= 4.8

ruby/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,20 @@ Red ADBC is the Ruby bindings of ADBC GLib.
2323

2424
## How to install
2525

26+
If you want to install Red ADBC by Bundler, you can add the following
27+
to your `Gemfile`:
28+
29+
```ruby
30+
plugin "rubygems-requirements-system"
31+
32+
gem "red-adbc"
33+
```
34+
35+
If you want to install Red ADBC by RubyGems, you can use the following
36+
command line:
37+
2638
```console
39+
$ gem install rubygems-requirements-system
2740
$ gem install red-adbc
2841
```
2942

ruby/dependency-check/Rakefile

Lines changed: 0 additions & 47 deletions
This file was deleted.

ruby/red-adbc.gemspec

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Gem::Specification.new do |spec|
5050
spec.files += [file]
5151
end
5252
spec.files += Dir.glob("lib/**/*.rb")
53-
spec.extensions = ["dependency-check/Rakefile"]
5453

5554
# For CI: sometimes we can't use the latest red-arrow due to
5655
# conda-forge arrow-c-glib lagging behind
@@ -60,5 +59,16 @@ Gem::Specification.new do |spec|
6059
spec.add_runtime_dependency("red-arrow")
6160
end
6261

63-
# spec.metadata["msys2_mingw_dependencies"] = "adbc>=#{spec.version}"
62+
required_adbc_arrow_glib_version = version_components[0, 3].join(".")
63+
[
64+
["debian", "libadbc-arrow-glib-dev"],
65+
["rhel", "adbc-arrow-glib-devel"],
66+
].each do |platform, package|
67+
spec.requirements <<
68+
"system: adbc-arrow-glib>=#{required_adbc_arrow_glib_version}: " +
69+
"#{platform}: #{package}"
70+
end
71+
72+
# spec.metadata["msys2_mingw_dependencies"] = \
73+
# "adbc>=#{required_adbc_arrow_glib_version}"
6474
end

0 commit comments

Comments
 (0)