Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces a few changes/fixes for the ruby bindings. While the process for building and installing the gem locally was working, I ran into some issues in another project when trying to use
bundler
to build the gem from the remote git source for me. I've verified these changes address those issues.regorus
fromregorusrb
. I think this might eventually be solvable with more advanced build scripts for the ruby gem, or would eventually be solved if the gem ends up built/published as part of regorus CI and includes pre-compiled binaries for distribution. In the meantime, I'm addressing this by pointingregorusrb
to depend onregorus = { git = "https://github.com/microsoft/regorus" }
bindings/ruby/LICENSE.txt
from a symlink to a copy ofLICENSE
bindings/ruby/README.md
to indicate the ruby gem name isregorusrb
, removebundle add
command until glob option is supported, add instructions for building and installing the rubygem from sourceextconf.rb
, which will auto-install the rust toolchain if not present. Also includerake-compiler-rust
gem when building and developing locally, which allows cross-compiling for different architectures, i.e.rake 'native[x86_64-linux]'
bindings/ruby/regorusrb/regorusb.so
(or appropriate file extension) tobindings/ruby/regorus/regorusrb.so
. This is more in keeping with the ruby module/namespaceRegorus
, while allowing referencing the dynamice libraryregorusrb
distinctly from theregorus
ruby code, which is uesful to avoid ambiguousrequire
andrequire_relative
statements in rubyRegorus::Engine#eval_bool_query()
,#eval_allow_query
, and#eval_deny_query
methods