autocorrect-rb 2.9.0 → 2.9.1.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/autocorrect/Cargo.toml +3 -2
- data/ext/autocorrect/src/lib.rs +8 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6922e75a558fb00f464fee422096a652311b909690cf69258f1a3bbe2cc2d106
|
4
|
+
data.tar.gz: 54666b479cca5e0188d91addd0b9b1aab58dc78fdf8e666d8d659f8fe6e863ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31562a972f2a13c2f948aa621f0e49dce60dc8f87c4e1039b43bfcf6b835a618aa5b827e12395e20a1ddeb7d6bc063af91767333b7918b5d909a2074a6e71682
|
7
|
+
data.tar.gz: 61cdbb6222d148f88195fa8ec2cf7e45c5038b5eea0e7d538238f8a671c70fbdb5020ff6922e9cd031e4b935ef41fdda7c012a2c4a5dc04ca778d20dd2b8583b
|
data/ext/autocorrect/Cargo.toml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[package]
|
2
2
|
edition = "2021"
|
3
3
|
name = "autocorrect-rb"
|
4
|
-
version = "2.9.
|
4
|
+
version = "2.9.1"
|
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.
|
13
|
+
magnus = "0.6"
|
14
|
+
rb-sys = { version = "*", default-features = false, features = ["stable-api-compiled-fallback"] }
|
data/ext/autocorrect/src/lib.rs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
use magnus::{define_class, function, method, Error, Module, Object};
|
1
|
+
use magnus::{define_class, function, method, Error, IntoValue, Module, Object};
|
2
2
|
|
3
3
|
#[derive(Debug, Clone)]
|
4
4
|
pub struct LineResult {
|
@@ -74,10 +74,11 @@ impl LintResult {
|
|
74
74
|
hash.aset("filepath", self.filepath())?;
|
75
75
|
hash.aset(
|
76
76
|
"lines",
|
77
|
-
|
78
|
-
.
|
79
|
-
|
80
|
-
|
77
|
+
magnus::RArray::from_iter(
|
78
|
+
self.lines()
|
79
|
+
.iter()
|
80
|
+
.map(|l| l.to_hash().unwrap().into_value()),
|
81
|
+
),
|
81
82
|
)?;
|
82
83
|
hash.aset("error", self.error())?;
|
83
84
|
Ok(hash)
|
@@ -137,13 +138,13 @@ pub fn load_config(config_str: String) {
|
|
137
138
|
|
138
139
|
#[magnus::init(name = "autocorrect")]
|
139
140
|
fn init() -> Result<(), Error> {
|
140
|
-
let class = define_class("AutoCorrect",
|
141
|
+
let class = define_class("AutoCorrect", magnus::class::object())?;
|
141
142
|
class.define_singleton_method("format", function!(format, 1))?;
|
142
143
|
class.define_singleton_method("format_for", function!(format_for, 2))?;
|
143
144
|
class.define_singleton_method("lint_for", function!(lint_for, 2))?;
|
144
145
|
class.define_singleton_method("load_config", function!(load_config, 1))?;
|
145
146
|
|
146
|
-
let ignorer_class = class.define_class("Ignorer",
|
147
|
+
let ignorer_class = class.define_class("Ignorer", magnus::class::object())?;
|
147
148
|
ignorer_class.define_singleton_method("new", function!(Ignorer::new, 1))?;
|
148
149
|
ignorer_class.define_method("ignored?", method!(Ignorer::is_ignored, 1))?;
|
149
150
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autocorrect-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1.pre.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.5.3
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: AutoCorrect is a linter and formatter to help you to improve copywriting.
|