Skip to content

Commit

Permalink
chore: remove unused binding feature file (#3757)
Browse files Browse the repository at this point in the history
* chore: remove unused binding feature file

Signed-off-by: tison <[email protected]>

* rspec tests

Signed-off-by: tison <[email protected]>

---------

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Dec 14, 2023
1 parent 0f19def commit 00b5a16
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 128 deletions.
3 changes: 2 additions & 1 deletion bindings/ruby/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
/tmp/
*.bundle
*.so
Gemfile.lock
.rspec_status
Gemfile.lock
3 changes: 3 additions & 0 deletions bindings/ruby/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format documentation
--color
--require spec_helper
7 changes: 2 additions & 5 deletions bindings/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ source "https://rubygems.org"
gemspec

gem "rake", "~> 13.0"

gem "rb_sys", "~> 0.9.39"
gem "rake-compiler", "~> 1.2.0"

gem "cucumber", "~> 8.0"

gem "rspec", "~> 3.12.0"
gem "standard", "~> 1.3"
gem "rb_sys", "~> 0.9.39"
20 changes: 3 additions & 17 deletions bindings/ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,16 @@

require "rake/testtask"
require "rake/extensiontask"
require "rspec/core/rake_task"
require "bundler/gem_tasks"
require "standard/rake"
require "cucumber"
require "cucumber/rake/task"

task default: ["lint", "test"]
RSpec::Core::RakeTask.new(:spec)

Rake::ExtensionTask.new do |ext|
ext.name = "opendal_ruby"
ext.ext_dir = "."
ext.lib_dir = "lib/opendal_ruby"
end

task lint: :standard

task :dev do
ENV["RB_SYS_CARGO_PROFILE"] = "dev"
end

Rake::TestTask.new do |t|
t.deps << :dev << :compile
t.test_files = FileList[File.expand_path("tests/*_test.rb", __dir__)]
end

Cucumber::Rake::Task.new(:test) do |t|
t.cucumber_opts = ["--format pretty", "--publish-quiet"] # Any valid command line option can go here.
end
task default: %i[clobber compile spec standard]
36 changes: 36 additions & 0 deletions bindings/ruby/spec/blocking_op_spec.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.

# frozen_string_literal: true

RSpec.describe OpenDAL do
before :each do
@op = OpenDAL::Operator.new("memory", nil)
end

it "should perform basic ops" do
path = "/path/to/file"
content = "OpenDAL Ruby is ready."
@op.write(path, content)

stat = @op.stat(path)
expect(stat.is_file).to eq(true)
expect(stat.content_length).to eq(content.length)

expect(@op.read(path)).to eq(content)
end
end
32 changes: 32 additions & 0 deletions bindings/ruby/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.

# frozen_string_literal: true

require "opendal"

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"

# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!

config.expect_with :rspec do |c|
c.syntax = :expect
end
end
1 change: 0 additions & 1 deletion bindings/ruby/tests/binding.feature

This file was deleted.

66 changes: 0 additions & 66 deletions bindings/ruby/tests/steps/binding.rb

This file was deleted.

3 changes: 0 additions & 3 deletions bindings/tests/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions bindings/tests/features/binding.feature

This file was deleted.

0 comments on commit 00b5a16

Please sign in to comment.