autocorrect-rb 2.1.1.beta1-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c010e484cb64fb6759474bf57482e62c69e32628415b5262fe32b0ac47e7a3be
4
+ data.tar.gz: e9d2e20a20b4c69069e5bf95fd3ae7bff9102712cb373161b9d08a873df6c2b4
5
+ SHA512:
6
+ metadata.gz: ead596bd1c7ecd7c0071ac6bc7e83ad710661f0bd63d0c8218e5023e27487bd42f14072f8dee9450266d95c329ef5c2899a48e1bf2d8dadf5152510fdcded03f
7
+ data.tar.gz: 1d918e4628c81d9bbfa56ccfd30dac3e1cbb7af80a6506eadbee8d2c73442629c6fb79001b8f5ec6f93d1caf5c9ed8aafdc8906ccf9f10eccff5eff43eda24f3
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # AutoCorrect for Node.js
2
+
3
+ The Native Node.js version of [AutoCorrect](https://github.com/huacnlee/autocorrect) built on [NAPI.RS](https://napi.rs).
4
+
5
+ - Rust - [autocorrect](https://github.com/huacnlee/autocorrect)
6
+ - Ruby - [autocorrect-rb](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-py)
7
+ - Go - [autocorrect-go](https://github.com/longbridgeapp/autocorrect)
8
+ - Python - [autocorrect-py](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-py)
9
+ - Node.js - [autocorrect-node](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-node)
10
+ - JavaScript (Browser) - [autocorrect-wasm](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-wasm)
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ $ yarn add autocorrect-node
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```js
21
+ const autocorrect = require('autocorrect-node');
22
+
23
+ const out = autocorrect.format('Hello你好.');
24
+ console.log(out);
25
+ // Hello 你好。
26
+
27
+ out = autocorrect.formatFor("let title = 'Hello你好。'", 'js');
28
+ // let title = 'Hello 你好。'
29
+
30
+ const result = autocorrect.lintFor("let title = 'Hello你好。'", 'js');
31
+ console.log(result);
32
+ // {
33
+ // filepath: 'js',
34
+ // lines: [
35
+ // { l: 1, c: 13, new: "'Hello 你好。'", old: "'Hello你好。'", severity: 1 }
36
+ // ],
37
+ // error: ''
38
+ // }
39
+ ```
data/Rakefile ADDED
@@ -0,0 +1,40 @@
1
+ require "rubygems"
2
+
3
+ begin
4
+ require "bundler/setup"
5
+ rescue LoadError
6
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
7
+ end
8
+
9
+ require "bundler/gem_tasks"
10
+ require "rake/testtask"
11
+ require "rake/extensiontask"
12
+ require "bundler"
13
+
14
+ CROSS_PLATFORMS = %w[
15
+ aarch64-linux
16
+ arm64-darwin
17
+ x64-mingw32
18
+ x86_64-darwin
19
+ x86_64-linux
20
+ ]
21
+
22
+ spec = Bundler.load_gemspec("autocorrect-rb.gemspec")
23
+
24
+ Rake::TestTask.new(:test) do |t|
25
+ t.libs << "test"
26
+ t.libs << "lib"
27
+ t.test_files = FileList["test/**/*_test.rb"]
28
+ end
29
+
30
+ Rake::ExtensionTask.new("autocorrect") do |ext|
31
+ ext.gem_spec = spec
32
+ ext.lib_dir = "lib/autocorrect"
33
+ ext.source_pattern = "*.{rs,toml}"
34
+ ext.cross_compile = true
35
+ ext.cross_platform = CROSS_PLATFORMS
36
+ end
37
+
38
+ task build: :compile
39
+ task test: :compile
40
+ task default: %i[compile test]
Binary file
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ begin
2
+ # load the precompiled extension file
3
+ ruby_version = /(\d+\.\d+)/.match(::RUBY_VERSION)
4
+ require_relative "autocorrect/#{ruby_version}/autocorrect"
5
+ rescue LoadError
6
+ # fall back to the extension compiled upon installation.
7
+ # use "require" instead of "require_relative" because non-native gems will place C extension files
8
+ # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
9
+ # is in $LOAD_PATH but not necessarily relative to this file
10
+ # (see https://github.com/sparklemotion/nokogiri/issues/2300 for more)
11
+ require "autocorrect/autocorrect"
12
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autocorrect-rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.1.beta1
5
+ platform: x86_64-linux
6
+ authors:
7
+ - Jason Lee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rb_sys
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.18
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.18
27
+ description: AutoCorrect is a linter and formatter to help you to improve copywriting,
28
+ correct spaces, words, punctuations between CJK (Chinese, Japanese, Korean).
29
+ email:
30
+ - huacnlee@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - README.md
36
+ - Rakefile
37
+ - lib/autocorrect-rb.rb
38
+ - lib/autocorrect/2.7/autocorrect.so
39
+ - lib/autocorrect/3.0/autocorrect.so
40
+ - lib/autocorrect/3.1/autocorrect.so
41
+ homepage: https://github.com/huacnlee/autocorrect
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '2.7'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: 3.2.dev
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.1
62
+ requirements: []
63
+ rubygems_version: 3.4.0.dev
64
+ signing_key:
65
+ specification_version: 4
66
+ summary: AutoCorrect is a linter and formatter to help you to improve copywriting.
67
+ test_files: []