Skip to content

Commit

Permalink
Update to to support Ruby 3.4 (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee authored Dec 31, 2024
1 parent 51927ca commit 351404a
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/release-crate-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-java/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "autocorrect-java"
version = "2.13.0"
version = "2.13.1"

[dependencies]
autocorrect = {path = "../autocorrect"}
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-java/javasrc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.huacnlee</groupId>
<artifactId>autocorrect-java</artifactId>
<version>2.13.0</version>
<version>2.13.1</version>
<name>autocorrect-java</name>
<description>A linter and formatter to help you to improve copywriting, correct spaces, words, punctuations between
CJK (Chinese, Japanese, Korean).
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "autocorrect-node"
version = "2.13.0"
version = "2.13.1"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autocorrect-node",
"version": "2.13.0",
"version": "2.13.1",
"main": "index.js",
"bin": {
"autocorrect": "./cli.js"
Expand Down
2 changes: 1 addition & 1 deletion autocorrect-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
43 changes: 24 additions & 19 deletions autocorrect-rb/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions autocorrect-rb/autocorrect-rb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["[email protected]"]
Expand All @@ -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
4 changes: 2 additions & 2 deletions autocorrect-rb/ext/autocorrect/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -10,4 +10,4 @@ name = "autocorrect"

[dependencies]
autocorrect = "2"
magnus = "0.6"
magnus = "0.7"
2 changes: 1 addition & 1 deletion autocorrect-wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "autocorrect-wasm"
version = "2.13.0"
version = "2.13.1"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion autocorrect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 351404a

Please sign in to comment.