Skip to content
Closed
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 c_glib/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
source "https://rubygems.org/"

gem "test-unit"
gem "gobject-introspection", "= 3.3.7"
gem "gobject-introspection"
1 change: 1 addition & 0 deletions c_glib/test/plasma/test-plasma-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class TestPlasmaClient < Test::Unit::TestCase
def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@options = Plasma::ClientOptions.new
Expand Down
3 changes: 3 additions & 0 deletions c_glib/test/plasma/test-plasma-created-object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
# under the License.

class TestPlasmaCreatedObject < Test::Unit::TestCase
include Helper::Omittable

def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@client = Plasma::Client.new(@store.socket_path, nil)
Expand Down
3 changes: 3 additions & 0 deletions c_glib/test/plasma/test-plasma-referred-object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
# under the License.

class TestPlasmaReferredObject < Test::Unit::TestCase
include Helper::Omittable

def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@client = Plasma::Client.new(@store.socket_path, nil)
Expand Down
2 changes: 2 additions & 0 deletions c_glib/test/test-cuda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

class TestCUDA < Test::Unit::TestCase
include Helper::Buildable
include Helper::Omittable

def setup
omit("Arrow CUDA is required") unless defined?(::ArrowCUDA)
Expand Down Expand Up @@ -47,6 +48,7 @@ def test_copy
end

def test_export
require_gi_bindings(3, 3, 9)
@buffer.copy_from_host("Hello World")
handle = @buffer.export
serialized_handle = handle.serialize.data
Expand Down
2 changes: 1 addition & 1 deletion ruby/red-arrow/red-arrow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
spec.extensions = ["ext/arrow/extconf.rb"]

spec.add_runtime_dependency("extpp", ">= 0.0.7")
spec.add_runtime_dependency("gio2", "= 3.3.7")
spec.add_runtime_dependency("gio2", ">= 3.3.6")
spec.add_runtime_dependency("native-package-installer")
spec.add_runtime_dependency("pkg-config")

Expand Down
1 change: 1 addition & 0 deletions ruby/red-plasma/test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@

require "test-unit"

require_relative "helper/omittable"
require_relative "helper/plasma-store"
36 changes: 36 additions & 0 deletions ruby/red-plasma/test/helper/omittable.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

module Helper
module Omittable
def require_gi_bindings(major, minor, micro)
return if GLib.check_binding_version?(major, minor, micro)
message =
"Require gobject-introspection #{major}.#{minor}.#{micro} or later: " +
GLib::BINDING_VERSION.join(".")
omit(message)
end

def require_gi(major, minor, micro)
return if GObjectIntrospection::Version.or_later?(major, minor, micro)
message =
"Require GObject Introspection #{major}.#{minor}.#{micro} or later: " +
GObjectIntrospection::Version::STRING
omit(message)
end
end
end
3 changes: 3 additions & 0 deletions ruby/red-plasma/test/test-plasma-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
# under the License.

class TestPlasmaClient < Test::Unit::TestCase
include Helper::Omittable

def setup
@store = nil
require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@id = Plasma::ObjectID.new("Hello")
Expand Down