autocorrect-rb 2.13.1 → 2.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a168747d6caab840439076801c21aa9e2bb873711423093d5285d6d679319ea
4
- data.tar.gz: 2c1a52403e9b2876fb9dbc140455ed79c90044f1899019bc719d8561e9727ec3
3
+ metadata.gz: 7e346cdfc5490a15aed62718194a0fdb3a7f9fadef11ffc850c57ba3bbc2ac4c
4
+ data.tar.gz: 7ccf365cb4cdb40daeba9cf7478ea2975d08de7f4b3a4ebc1546fc7d1604e61b
5
5
  SHA512:
6
- metadata.gz: 0e3e4ebd8f4f849a79c5404d8c7a0d1e138184e21fbc88f51dd4ea00708d12e8379e63452fb2bbbe106d96061f75c41d6b0a64beed9534d3670e4c7cd489e169
7
- data.tar.gz: 9fc0baada6be74fb14326ca0602bca8405ccd958366e13d107fae4b6c1603d0ab6fd35173e6582b7abd87778250b0f4c5970bf21f80e362e653feb0b7e15d5ec
6
+ metadata.gz: 19f93281ff1174ef2411fe2d3785f9cc50c1c62e16fc29de10e029a5fc91fd35549cacaed2d9ca356914d01ba9931b2502ef518a1b0f755429856f8773d8035d
7
+ data.tar.gz: 47786dde5297fa482aef8cbc8a4451d59e8041382ddd7b4e4890df4d92b497acd434098b9215e1ac05f3fdaa6abe4ec495f16a1c35502aca746ddeb85a92c034
data/README.md CHANGED
@@ -99,13 +99,13 @@ Calculating -------------------------------------
99
99
 
100
100
  | Test Case | Duration (Rust) | Duration (Pure Ruby) | Speedup |
101
101
  | ----------- | --------------- | -------------------- | ------- |
102
- | Foramt 50 | 0.008ms | 0.031ms | ~3.8x |
102
+ | Format 50 | 0.008ms | 0.031ms | ~3.8x |
103
103
  | Format 100 | 0.017ms | 0.062ms | ~3.6x |
104
104
  | Format 400 | 0.052ms | 0.2ms | ~3.8x |
105
105
  | Format HTML | 0.183ms | 0.67ms | ~3.6x |
106
106
 
107
107
  > 🎈 Rust version about 3.5 ~ 3.8x fast then Ruby (pure version).
108
- >
108
+ >
109
109
  > By this result, we can see the Ruby version is also fast, but the Rust version is more better.
110
110
 
111
111
  ## Know issues
@@ -1,7 +1,7 @@
1
1
  [package]
2
- edition = "2021"
2
+ edition = "2024"
3
3
  name = "autocorrect-rb"
4
- version = "2.13.1"
4
+ version = "2.16.3"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
  [lib]
@@ -10,4 +10,5 @@ name = "autocorrect"
10
10
 
11
11
  [dependencies]
12
12
  autocorrect = "2"
13
- magnus = "0.7"
13
+ # Wait 0.9.0
14
+ magnus = { git = "https://github.com/matsadler/magnus.git", rev = "c7e33c181c44860a33e7d8cd8f39090145f061d0" }
@@ -1,4 +1,4 @@
1
- use magnus::{define_class, function, method, Error, IntoValue, Module, Object};
1
+ use magnus::{Error, IntoValue, Module, Object, Ruby, function, method};
2
2
 
3
3
  #[derive(Debug, Clone)]
4
4
  pub struct LineResult {
@@ -137,14 +137,14 @@ pub fn load_config(config_str: String) {
137
137
  }
138
138
 
139
139
  #[magnus::init(name = "autocorrect")]
140
- fn init() -> Result<(), Error> {
141
- let class = define_class("AutoCorrect", magnus::class::object())?;
140
+ fn init(ruby: &Ruby) -> Result<(), Error> {
141
+ let class = ruby.define_class("AutoCorrect", ruby.class_object())?;
142
142
  class.define_singleton_method("format", function!(format, 1))?;
143
143
  class.define_singleton_method("format_for", function!(format_for, 2))?;
144
144
  class.define_singleton_method("lint_for", function!(lint_for, 2))?;
145
145
  class.define_singleton_method("load_config", function!(load_config, 1))?;
146
146
 
147
- let ignorer_class = class.define_class("Ignorer", magnus::class::object())?;
147
+ let ignorer_class = class.define_class("Ignorer", ruby.class_object())?;
148
148
  ignorer_class.define_singleton_method("new", function!(Ignorer::new, 1))?;
149
149
  ignorer_class.define_method("ignored?", method!(Ignorer::is_ignored, 1))?;
150
150
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autocorrect-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.1
4
+ version: 2.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2024-12-30 00:00:00.000000000 Z
11
+ date: 2026-02-05 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rb_sys
@@ -42,6 +43,7 @@ homepage: https://github.com/huacnlee/autocorrect
42
43
  licenses:
43
44
  - MIT
44
45
  metadata: {}
46
+ post_install_message:
45
47
  rdoc_options: []
46
48
  require_paths:
47
49
  - lib
@@ -56,7 +58,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
58
  - !ruby/object:Gem::Version
57
59
  version: '0'
58
60
  requirements: []
59
- rubygems_version: 3.6.2
61
+ rubygems_version: 3.5.23
62
+ signing_key:
60
63
  specification_version: 4
61
64
  summary: AutoCorrect is a linter and formatter to help you to improve copywriting.
62
65
  test_files: []