From 351404ae1b180d4bad8e7f69cb19752e15da5582 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 31 Dec 2024 15:32:53 +0800 Subject: [PATCH] Update to to support Ruby 3.4 (#231) --- .github/workflows/ci.yml | 2 +- .github/workflows/release-crate-gem.yml | 31 ++++++++-------- autocorrect-cli/Cargo.toml | 2 +- autocorrect-java/Cargo.toml | 2 +- autocorrect-java/javasrc/pom.xml | 2 +- autocorrect-node/Cargo.toml | 2 +- autocorrect-node/package.json | 2 +- autocorrect-py/Cargo.toml | 2 +- autocorrect-rb/Gemfile.lock | 43 +++++++++++++---------- autocorrect-rb/autocorrect-rb.gemspec | 4 +-- autocorrect-rb/ext/autocorrect/Cargo.toml | 4 +-- autocorrect-wasm/Cargo.toml | 2 +- autocorrect/Cargo.toml | 2 +- 13 files changed, 53 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5758d0e..cc255f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: key: ubuntu-test-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.4 bundler-cache: true - name: Test Ruby run: make test:ruby diff --git a/.github/workflows/release-crate-gem.yml b/.github/workflows/release-crate-gem.yml index e14b037..e6c8830 100644 --- a/.github/workflows/release-crate-gem.yml +++ b/.github/workflows/release-crate-gem.yml @@ -34,9 +34,9 @@ jobs: - x86_64-linux-musl steps: - uses: actions/checkout@v4 - - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.1.9 + - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.3.0 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true cargo-cache: true cargo-vendor: false @@ -45,16 +45,16 @@ jobs: run: | touch Rakefile - - uses: oxidize-rb/actions/cross-gem@v1.1.9 + - uses: oxidize-rb/actions/cross-gem@v1.3.0 with: platform: ${{ matrix.ruby-platform }} working-directory: autocorrect-rb/ - ruby-versions: "3.3, 3.2, 3.1" # optional + ruby-versions: "3.4, 3.3, 3.2" # optional - name: Upload Gem - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: cross-gem + name: cross-gem-${{ matrix.ruby-platform }} path: autocorrect-rb/pkg/ build_source: @@ -64,9 +64,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.1.9 + - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.3.0 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: false cargo-cache: true cargo-vendor: true @@ -79,9 +79,9 @@ jobs: mv *.gem pkg/ - name: Upload Gem - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: cross-gem + name: cross-gem-source path: autocorrect-rb/pkg/ publish: @@ -93,15 +93,16 @@ jobs: steps: - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: cross-gem path: pkg/ - name: Display structure of built gems - run: ls -R + run: | + mv -f **/autocorrect-*.gem ./ + ls -lha autocorrect-*.gem working-directory: pkg/ - name: Publish to RubyGem @@ -113,7 +114,7 @@ jobs: touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${RUBYGEM_TOKEN}\n" > $HOME/.gem/credentials - for filename in *.gem; do + for filename in autocorrect-*.gem; do echo $filename gem push $filename done diff --git a/autocorrect-cli/Cargo.toml b/autocorrect-cli/Cargo.toml index f295899..83d3b38 100644 --- a/autocorrect-cli/Cargo.toml +++ b/autocorrect-cli/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" name = "autocorrect-cli" readme = "../README.md" repository = "https://github.com/huacnlee/autocorrect" -version = "2.13.0" +version = "2.13.1" [[bin]] name = "autocorrect" diff --git a/autocorrect-java/Cargo.toml b/autocorrect-java/Cargo.toml index daa3aed..1b724c2 100644 --- a/autocorrect-java/Cargo.toml +++ b/autocorrect-java/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "autocorrect-java" -version = "2.13.0" +version = "2.13.1" [dependencies] autocorrect = {path = "../autocorrect"} diff --git a/autocorrect-java/javasrc/pom.xml b/autocorrect-java/javasrc/pom.xml index 1b3b0d3..21b5ea0 100644 --- a/autocorrect-java/javasrc/pom.xml +++ b/autocorrect-java/javasrc/pom.xml @@ -6,7 +6,7 @@ io.github.huacnlee autocorrect-java - 2.13.0 + 2.13.1 autocorrect-java A linter and formatter to help you to improve copywriting, correct spaces, words, punctuations between CJK (Chinese, Japanese, Korean). diff --git a/autocorrect-node/Cargo.toml b/autocorrect-node/Cargo.toml index 2ac6c2c..1aa3e5e 100644 --- a/autocorrect-node/Cargo.toml +++ b/autocorrect-node/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "autocorrect-node" -version = "2.13.0" +version = "2.13.1" [lib] crate-type = ["cdylib"] diff --git a/autocorrect-node/package.json b/autocorrect-node/package.json index bf88fe9..d97e0e2 100644 --- a/autocorrect-node/package.json +++ b/autocorrect-node/package.json @@ -1,6 +1,6 @@ { "name": "autocorrect-node", - "version": "2.13.0", + "version": "2.13.1", "main": "index.js", "bin": { "autocorrect": "./cli.js" diff --git a/autocorrect-py/Cargo.toml b/autocorrect-py/Cargo.toml index b26b84c..ecb3c70 100644 --- a/autocorrect-py/Cargo.toml +++ b/autocorrect-py/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT" name = "autocorrect-py" readme = "README.md" repository = "https://github.com/huacnlee/autocorrect" -version = "2.13.0" +version = "2.13.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/autocorrect-rb/Gemfile.lock b/autocorrect-rb/Gemfile.lock index a10ca27..df1bab2 100644 --- a/autocorrect-rb/Gemfile.lock +++ b/autocorrect-rb/Gemfile.lock @@ -1,47 +1,52 @@ PATH remote: . specs: - autocorrect-rb (2.9.1) - rb_sys (>= 0.9.54) + autocorrect-rb (2.13.0) + rb_sys (>= 0.9.105) GEM remote: https://rubygems.org/ specs: - activesupport (7.1.2) + activesupport (8.0.1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) base64 (0.2.0) - benchmark-ips (2.13.0) - bigdecimal (3.1.5) - concurrent-ruby (1.2.2) + benchmark (0.4.0) + benchmark-ips (2.14.0) + bigdecimal (3.1.9) + concurrent-ruby (1.3.4) connection_pool (2.4.1) - drb (2.2.0) - ruby2_keywords - i18n (1.14.1) + drb (2.2.1) + i18n (1.14.6) concurrent-ruby (~> 1.0) - memory_profiler (1.0.1) - minitest (5.20.0) - mutex_m (0.2.0) - rake (13.1.0) - rake-compiler (1.2.5) + logger (1.6.4) + memory_profiler (1.1.0) + minitest (5.25.4) + rake (13.2.1) + rake-compiler (1.2.8) rake - rb_sys (0.9.86) - ruby2_keywords (0.0.5) + rb_sys (0.9.105) + securerandom (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.2) PLATFORMS arm64-darwin-20 arm64-darwin-21 arm64-darwin-22 arm64-darwin-23 + arm64-darwin-24 x86_64-linux DEPENDENCIES diff --git a/autocorrect-rb/autocorrect-rb.gemspec b/autocorrect-rb/autocorrect-rb.gemspec index 8f78265..9a9a16f 100644 --- a/autocorrect-rb/autocorrect-rb.gemspec +++ b/autocorrect-rb/autocorrect-rb.gemspec @@ -2,7 +2,7 @@ $:.push File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "autocorrect-rb" - s.version = "2.13.0" + s.version = "2.13.1" s.platform = Gem::Platform::RUBY s.authors = ["Jason Lee"] s.email = ["huacnlee@gmail.com"] @@ -15,5 +15,5 @@ Gem::Specification.new do |s| s.extensions = ["ext/autocorrect/extconf.rb"] # needed until rubygems supports Rust support is out of beta - s.add_dependency "rb_sys", ">= 0.9.54" + s.add_dependency "rb_sys", ">= 0.9.105" end diff --git a/autocorrect-rb/ext/autocorrect/Cargo.toml b/autocorrect-rb/ext/autocorrect/Cargo.toml index 1564a0b..51dd514 100644 --- a/autocorrect-rb/ext/autocorrect/Cargo.toml +++ b/autocorrect-rb/ext/autocorrect/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "autocorrect-rb" -version = "2.13.0" +version = "2.13.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -10,4 +10,4 @@ name = "autocorrect" [dependencies] autocorrect = "2" -magnus = "0.6" +magnus = "0.7" diff --git a/autocorrect-wasm/Cargo.toml b/autocorrect-wasm/Cargo.toml index 25744c6..0ed5216 100644 --- a/autocorrect-wasm/Cargo.toml +++ b/autocorrect-wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "autocorrect-wasm" -version = "2.13.0" +version = "2.13.1" [lib] crate-type = ["cdylib", "rlib"] diff --git a/autocorrect/Cargo.toml b/autocorrect/Cargo.toml index 5613a32..c253cef 100644 --- a/autocorrect/Cargo.toml +++ b/autocorrect/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "autocorrect" readme = "../README.md" repository = "https://github.com/huacnlee/autocorrect" -version = "2.13.0" +version = "2.13.1" [lib] name = "autocorrect"