diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 2b7e3b7..e4c329a 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -18,7 +18,9 @@ jobs: - name: Setup Ruby and Rust uses: oxidize-rb/actions/setup-ruby-and-rust@7ca44a16e287e5ff7dd72ab53f4bd41cbf34a571 #v1.26 with: - ruby-version: "3.3.1" + bundler: 2.6.5 + rubygems: 3.6.5 + ruby-version: "3.4.2" rustup-toolchain: "stable" bundler-cache: true cargo-cache: true @@ -27,5 +29,7 @@ jobs: - name: Run ruby tests run: | cd bindings/ruby + gem install bundler + bundle install cargo clippy --all-targets --no-deps -- -Dwarnings bundle exec rake diff --git a/bindings/ruby/.rubocop.yml b/bindings/ruby/.rubocop.yml index 8b9e9fa..4ed2b54 100644 --- a/bindings/ruby/.rubocop.yml +++ b/bindings/ruby/.rubocop.yml @@ -3,7 +3,7 @@ require: - rubocop-rake AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.4 NewCops: enable Layout/LineLength: diff --git a/bindings/ruby/.tool-versions b/bindings/ruby/.tool-versions index 51f617d..ae5ecdb 100644 --- a/bindings/ruby/.tool-versions +++ b/bindings/ruby/.tool-versions @@ -1 +1 @@ -ruby 3.3.1 +ruby 3.4.2 diff --git a/bindings/ruby/Gemfile b/bindings/ruby/Gemfile index 6230226..9f391c2 100644 --- a/bindings/ruby/Gemfile +++ b/bindings/ruby/Gemfile @@ -7,10 +7,10 @@ gemspec # These gems are required for local development and testing, # but won't be included in the published gem -gem "minitest", "~> 5.23" +gem "minitest", "~> 5.25" gem "rake", "~> 13.2" -gem "rake-compiler" -gem "rake-compiler-dock" -gem "rubocop", "~> 1.64", require: false -gem "rubocop-minitest", require: false -gem "rubocop-rake", require: false +gem "rake-compiler", "~> 1.2" +gem "rake-compiler-dock", "~> 1.9" +gem "rubocop", "~> 1.73", require: false +gem "rubocop-minitest", "~> 0.37.1", require: false +gem "rubocop-rake", "~> 0.7.1", require: false diff --git a/bindings/ruby/Gemfile.lock b/bindings/ruby/Gemfile.lock index bbafe2d..a7be32e 100644 --- a/bindings/ruby/Gemfile.lock +++ b/bindings/ruby/Gemfile.lock @@ -1,63 +1,68 @@ PATH remote: . specs: - regorusrb (0.2.1) - rb_sys (~> 0.9.97) + regorusrb (0.2.3) + rb_sys (~> 0.9.111) GEM remote: https://rubygems.org/ specs: ast (2.4.2) - json (2.7.2) - language_server-protocol (3.17.0.3) - minitest (5.24.1) - parallel (1.25.1) - parser (3.3.4.0) + json (2.10.1) + language_server-protocol (3.17.0.4) + lint_roller (1.1.0) + minitest (5.25.4) + parallel (1.26.3) + parser (3.3.7.1) ast (~> 2.4.1) racc - racc (1.8.0) + racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - rake-compiler (1.2.7) + rake-compiler (1.2.9) rake - rake-compiler-dock (1.5.1) - rb_sys (0.9.99) - regexp_parser (2.9.2) - rexml (3.3.9) - rubocop (1.65.0) + rake-compiler-dock (1.9.1) + rb_sys (0.9.111) + rake-compiler-dock (= 1.9.1) + regexp_parser (2.10.0) + rubocop (1.73.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.38.1) parser (>= 3.3.1.0) - rubocop-minitest (0.35.1) - rubocop (>= 1.61, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rake (0.6.0) - rubocop (~> 1.0) + rubocop-minitest (0.37.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) ruby-progressbar (1.13.0) - unicode-display_width (2.5.0) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) PLATFORMS ruby x86_64-linux DEPENDENCIES - minitest (~> 5.23) + minitest (~> 5.25) rake (~> 13.2) - rake-compiler - rake-compiler-dock + rake-compiler (~> 1.2) + rake-compiler-dock (~> 1.9) regorusrb! - rubocop (~> 1.64) - rubocop-minitest - rubocop-rake + rubocop (~> 1.73) + rubocop-minitest (~> 0.37.1) + rubocop-rake (~> 0.7.1) BUNDLED WITH - 2.5.13 + 2.6.5 diff --git a/bindings/ruby/ext/regorusrb/Cargo.toml b/bindings/ruby/ext/regorusrb/Cargo.toml index 9b43325..3e0e7b5 100644 --- a/bindings/ruby/ext/regorusrb/Cargo.toml +++ b/bindings/ruby/ext/regorusrb/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "regorusrb" -version = "0.2.2" -edition = "2021" +version = "0.2.3" +edition = "2024" description = "Ruby bindings for Regorus - a fast, lightweight Rego interpreter written in Rust" publish = false @@ -15,7 +15,7 @@ ast = ["regorus/ast"] coverage = ["regorus/coverage"] [dependencies] -magnus = { version = "0.6.4" } +magnus = { version = "0.7.1" } regorus = { path = "../../../..", default-features = false, features = ["arc"] } -serde_json = "1.0.117" -serde_magnus = "0.8.1" +serde_json = "1.0.140" +serde_magnus = "0.9.0" diff --git a/bindings/ruby/ext/regorusrb/src/lib.rs b/bindings/ruby/ext/regorusrb/src/lib.rs index 510437f..43b0cac 100644 --- a/bindings/ruby/ext/regorusrb/src/lib.rs +++ b/bindings/ruby/ext/regorusrb/src/lib.rs @@ -1,4 +1,4 @@ -use magnus::{exception::runtime_error, method, module, prelude::*, Error, Ruby}; +use magnus::{Error, Ruby, exception::runtime_error, method, module, prelude::*}; use regorus::Engine as RegorusEngine; use std::cell::RefCell; use std::cmp::Ordering; diff --git a/bindings/ruby/lib/regorus/version.rb b/bindings/ruby/lib/regorus/version.rb index 99ca45f..a709f6b 100644 --- a/bindings/ruby/lib/regorus/version.rb +++ b/bindings/ruby/lib/regorus/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Regorus - VERSION = "0.2.1" + VERSION = "0.2.3" end diff --git a/bindings/ruby/regorusrb.gemspec b/bindings/ruby/regorusrb.gemspec index bae6f49..92b52c3 100644 --- a/bindings/ruby/regorusrb.gemspec +++ b/bindings/ruby/regorusrb.gemspec @@ -10,8 +10,8 @@ Gem::Specification.new do |spec| spec.summary = "Ruby bindings for Regorus - a fast, lightweight Rego interpreter written in Rust" spec.homepage = "https://github.com/microsoft/regorus/blob/main/bindings/ruby" spec.license = "MIT" - spec.required_ruby_version = ">= 3.0.0" - spec.required_rubygems_version = ">= 3.3.11" + spec.required_ruby_version = ">= 3.4.2" + spec.required_rubygems_version = ">= 3.6.5" spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" @@ -26,5 +26,5 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.extensions = ["ext/regorusrb/extconf.rb"] - spec.add_dependency "rb_sys", "~> 0.9.97" + spec.add_dependency "rb_sys", "~> 0.9.111" end