mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
update ruby bindings (#200)
This commit is contained in:
@@ -20,21 +20,11 @@ Gem::Specification.new do |spec|
|
||||
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/bindings/ruby/CHANGELOG.md"
|
||||
spec.metadata["rubygems_mfa_required"] = "true"
|
||||
|
||||
# Specify which files should be added to the gem when it is released.
|
||||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
||||
gemspec = File.basename(__FILE__)
|
||||
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
|
||||
ls.readlines("\x0", chomp: true).reject do |f|
|
||||
(f == gemspec) ||
|
||||
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
|
||||
end
|
||||
end
|
||||
|
||||
# Ensure Cargo.lock is included
|
||||
spec.files << "../../Cargo.lock" if File.exist?("../../Cargo.lock")
|
||||
spec.files = Dir["lib/*.rb", "lib/regorus/*.rb", "ext/**/*.{rs,rb,lock,toml}", "Cargo.{lock,toml}", "LICENSE.txt", "README.md"]
|
||||
|
||||
spec.bindir = "exe"
|
||||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
||||
spec.require_paths = ["lib"]
|
||||
spec.extensions = ["ext/regorusrb/Cargo.toml"]
|
||||
spec.extensions = ["ext/regorusrb/extconf.rb"]
|
||||
spec.add_dependency "rb_sys", "~> 0.9.91"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user