whichlang 0.1.5 → 0.1.6

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: 5bd76e0e787f3f21b90952817fbdb74b0c62cdeca99ed5713f50b7286cfa3d37
4
- data.tar.gz: a8b8fc66fca53b06ac211b8da26de20826bf22a218ab56d59155103e5f26f071
3
+ metadata.gz: bd144825504c7899fce7a1f777d96ecab869909e44d410ac24cfebe3185fe0ac
4
+ data.tar.gz: 182bf0a58095db74283b8b397f5dc71c788e918cd558f637246dbb4eb6608bd3
5
5
  SHA512:
6
- metadata.gz: 215f5dd15c54d5cd15309c32ab2a1d057ed0294ddca7e291255013ca5b49ce09c154d4e5b2217a18620795a32752a088d0e68f6f6e6fc201eab0b2adb98ca01d
7
- data.tar.gz: 6330cc7ae47785ff1c8cba0bd18586e52e1ee0d1831716d0c22a72e2b709aa8c6fe5d94f7f8ace675775cf76bea249674f9a18ab0e9adbfbf0241488cef52dac
6
+ metadata.gz: fecaf71492c26f66dae553060a08c7570a32d76f5ce470b0f091e117d901e6be7c6de423bc3d05dfb8c63b4e27939270a80fbb714f88c36a375d53d9f31063fe
7
+ data.tar.gz: bb25a0ce53eaf3850cb82bd6a04944dda889a1cd2ab483a6eefb733b2196765e4155723575a8ef20022aa675c0be914ee8b555e6cb0180c1636c75c5d20d3565
data/Cargo.lock CHANGED
@@ -2,245 +2,28 @@
2
2
  # It is not intended for manual editing.
3
3
  version = 3
4
4
 
5
- [[package]]
6
- name = "aho-corasick"
7
- version = "1.1.2"
8
- source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
10
- dependencies = [
11
- "memchr",
12
- ]
13
-
14
- [[package]]
15
- name = "bindgen"
16
- version = "0.69.1"
17
- source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2"
19
- dependencies = [
20
- "bitflags",
21
- "cexpr",
22
- "clang-sys",
23
- "lazy_static",
24
- "lazycell",
25
- "peeking_take_while",
26
- "proc-macro2",
27
- "quote",
28
- "regex",
29
- "rustc-hash",
30
- "shlex",
31
- "syn",
32
- ]
33
-
34
- [[package]]
35
- name = "bitflags"
36
- version = "2.4.1"
37
- source = "registry+https://github.com/rust-lang/crates.io-index"
38
- checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
39
-
40
- [[package]]
41
- name = "cexpr"
42
- version = "0.6.0"
43
- source = "registry+https://github.com/rust-lang/crates.io-index"
44
- checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
45
- dependencies = [
46
- "nom",
47
- ]
48
-
49
- [[package]]
50
- name = "cfg-if"
51
- version = "1.0.0"
52
- source = "registry+https://github.com/rust-lang/crates.io-index"
53
- checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
54
-
55
- [[package]]
56
- name = "clang-sys"
57
- version = "1.6.1"
58
- source = "registry+https://github.com/rust-lang/crates.io-index"
59
- checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
60
- dependencies = [
61
- "glob",
62
- "libc",
63
- "libloading",
64
- ]
65
-
66
- [[package]]
67
- name = "glob"
68
- version = "0.3.1"
69
- source = "registry+https://github.com/rust-lang/crates.io-index"
70
- checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
71
-
72
5
  [[package]]
73
6
  name = "lazy_static"
74
7
  version = "1.4.0"
75
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
76
9
  checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
77
10
 
78
- [[package]]
79
- name = "lazycell"
80
- version = "1.3.0"
81
- source = "registry+https://github.com/rust-lang/crates.io-index"
82
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
83
-
84
11
  [[package]]
85
12
  name = "libc"
86
- version = "0.2.151"
87
- source = "registry+https://github.com/rust-lang/crates.io-index"
88
- checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
89
-
90
- [[package]]
91
- name = "libloading"
92
- version = "0.7.4"
93
- source = "registry+https://github.com/rust-lang/crates.io-index"
94
- checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
95
- dependencies = [
96
- "cfg-if",
97
- "winapi",
98
- ]
99
-
100
- [[package]]
101
- name = "memchr"
102
- version = "2.7.1"
103
- source = "registry+https://github.com/rust-lang/crates.io-index"
104
- checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
105
-
106
- [[package]]
107
- name = "minimal-lexical"
108
- version = "0.2.1"
109
- source = "registry+https://github.com/rust-lang/crates.io-index"
110
- checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
111
-
112
- [[package]]
113
- name = "nom"
114
- version = "7.1.3"
115
- source = "registry+https://github.com/rust-lang/crates.io-index"
116
- checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
117
- dependencies = [
118
- "memchr",
119
- "minimal-lexical",
120
- ]
121
-
122
- [[package]]
123
- name = "peeking_take_while"
124
- version = "0.1.2"
125
- source = "registry+https://github.com/rust-lang/crates.io-index"
126
- checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
127
-
128
- [[package]]
129
- name = "proc-macro2"
130
- version = "1.0.71"
131
- source = "registry+https://github.com/rust-lang/crates.io-index"
132
- checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8"
133
- dependencies = [
134
- "unicode-ident",
135
- ]
136
-
137
- [[package]]
138
- name = "quote"
139
- version = "1.0.33"
140
- source = "registry+https://github.com/rust-lang/crates.io-index"
141
- checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
142
- dependencies = [
143
- "proc-macro2",
144
- ]
145
-
146
- [[package]]
147
- name = "rb-sys"
148
- version = "0.9.85"
149
- source = "registry+https://github.com/rust-lang/crates.io-index"
150
- checksum = "05b780e6858b0b0eced1d55d0f097c024b77a37b41f83bd35341130f78e37c51"
151
- dependencies = [
152
- "rb-sys-build",
153
- ]
154
-
155
- [[package]]
156
- name = "rb-sys-build"
157
- version = "0.9.85"
158
- source = "registry+https://github.com/rust-lang/crates.io-index"
159
- checksum = "44957a3bc513dad1b0f20bdd0ee3b82e729a59da44086a6b40d8bc71958a6db8"
160
- dependencies = [
161
- "bindgen",
162
- "lazy_static",
163
- "proc-macro2",
164
- "quote",
165
- "regex",
166
- "shell-words",
167
- "syn",
168
- ]
169
-
170
- [[package]]
171
- name = "regex"
172
- version = "1.10.2"
173
- source = "registry+https://github.com/rust-lang/crates.io-index"
174
- checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
175
- dependencies = [
176
- "aho-corasick",
177
- "memchr",
178
- "regex-automata",
179
- "regex-syntax",
180
- ]
181
-
182
- [[package]]
183
- name = "regex-automata"
184
- version = "0.4.3"
185
- source = "registry+https://github.com/rust-lang/crates.io-index"
186
- checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
187
- dependencies = [
188
- "aho-corasick",
189
- "memchr",
190
- "regex-syntax",
191
- ]
192
-
193
- [[package]]
194
- name = "regex-syntax"
195
- version = "0.8.2"
13
+ version = "0.2.153"
196
14
  source = "registry+https://github.com/rust-lang/crates.io-index"
197
- checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
198
-
199
- [[package]]
200
- name = "rustc-hash"
201
- version = "1.1.0"
202
- source = "registry+https://github.com/rust-lang/crates.io-index"
203
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
15
+ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
204
16
 
205
17
  [[package]]
206
18
  name = "rutie"
207
- version = "0.8.4"
208
- source = "git+https://github.com/MelianLabs/rutie.git?branch=segmentation_fault#929bc8b16d2a769733b900f1782e92eeb4012e0e"
19
+ version = "0.9.0"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "e5e8e4f6480c30609e3480adfab87b8d4792525225a1caf98b371fbc9a7b698a"
209
22
  dependencies = [
210
23
  "lazy_static",
211
24
  "libc",
212
- "rb-sys",
213
- ]
214
-
215
- [[package]]
216
- name = "shell-words"
217
- version = "1.1.0"
218
- source = "registry+https://github.com/rust-lang/crates.io-index"
219
- checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
220
-
221
- [[package]]
222
- name = "shlex"
223
- version = "1.2.0"
224
- source = "registry+https://github.com/rust-lang/crates.io-index"
225
- checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
226
-
227
- [[package]]
228
- name = "syn"
229
- version = "2.0.43"
230
- source = "registry+https://github.com/rust-lang/crates.io-index"
231
- checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53"
232
- dependencies = [
233
- "proc-macro2",
234
- "quote",
235
- "unicode-ident",
236
25
  ]
237
26
 
238
- [[package]]
239
- name = "unicode-ident"
240
- version = "1.0.12"
241
- source = "registry+https://github.com/rust-lang/crates.io-index"
242
- checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
243
-
244
27
  [[package]]
245
28
  name = "whichlang"
246
29
  version = "0.1.0"
@@ -254,25 +37,3 @@ dependencies = [
254
37
  "rutie",
255
38
  "whichlang",
256
39
  ]
257
-
258
- [[package]]
259
- name = "winapi"
260
- version = "0.3.9"
261
- source = "registry+https://github.com/rust-lang/crates.io-index"
262
- checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
263
- dependencies = [
264
- "winapi-i686-pc-windows-gnu",
265
- "winapi-x86_64-pc-windows-gnu",
266
- ]
267
-
268
- [[package]]
269
- name = "winapi-i686-pc-windows-gnu"
270
- version = "0.4.0"
271
- source = "registry+https://github.com/rust-lang/crates.io-index"
272
- checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
273
-
274
- [[package]]
275
- name = "winapi-x86_64-pc-windows-gnu"
276
- version = "0.4.0"
277
- source = "registry+https://github.com/rust-lang/crates.io-index"
278
- checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
data/Cargo.toml CHANGED
@@ -7,7 +7,7 @@ edition = "2018"
7
7
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
8
 
9
9
  [dependencies]
10
- rutie = { git = "https://github.com/MelianLabs/rutie.git", branch = "segmentation_fault", features = ["no-link"] }
10
+ rutie = { version = "0.9.0", features = ["no-link"] }
11
11
  whichlang = "0.1.0"
12
12
 
13
13
  [lib]
data/ext/Rakefile CHANGED
@@ -1,23 +1,40 @@
1
+ def find_cargo
2
+ cargo = ENV["CARGO"]
3
+ return cargo if cargo && File.executable?(cargo)
4
+
5
+ ext = Gem.win_platform? ? ".exe" : ""
6
+ paths = [
7
+ File.join(ENV["HOME"].to_s, ".cargo", "bin"),
8
+ *ENV["PATH"].to_s.split(File::PATH_SEPARATOR)
9
+ ].uniq.reject(&:empty?)
10
+
11
+ paths.each do |dir|
12
+ candidate = File.join(dir, "cargo#{ext}")
13
+ return candidate if File.executable?(candidate)
14
+ end
15
+
16
+ nil
17
+ end
18
+
1
19
  task :default do
2
- cargo_exists = `cargo` rescue nil
3
- if cargo_exists
4
- sh "cargo build --release"
20
+ cargo = find_cargo
21
+ if cargo
22
+ sh "#{cargo} build --release"
5
23
  else
6
- fail <<EOS
7
- Rust environment is required to install this gem.
8
-
9
- For Unix like system, run
24
+ fail <<~EOS
25
+ Rust environment is required to install this gem.
10
26
 
11
- % curl https://sh.rustup.rs -sSf | sh
27
+ For Unix like system, run
12
28
 
13
- For Windows, download installer from
29
+ % curl https://sh.rustup.rs -sSf | sh
14
30
 
15
- https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
31
+ For Windows, download installer from
16
32
 
17
- See the Rust official page below for details
33
+ https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
18
34
 
19
- https://www.rust-lang.org/tools/install
35
+ See the Rust official page below for details
20
36
 
21
- EOS
37
+ https://www.rust-lang.org/tools/install
38
+ EOS
22
39
  end
23
40
  end
data/src/lib.rs CHANGED
@@ -1,8 +1,8 @@
1
1
  use rutie::{
2
- methods, module, AnyException, AnyObject, Module, NilClass, Object,
2
+ methods, module, AnyException, AnyObject, Module, Object,
3
3
  RString, VM,
4
4
  };
5
- use whichlang::{detect_language, Lang};
5
+ use whichlang::{detect_language};
6
6
 
7
7
  module!(Whichlang);
8
8
 
data/whichlang.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "whichlang"
5
5
  # spec.version = Tomlrb.load_file("Cargo.toml")["package"]["version"]
6
- spec.version = "0.1.5"
6
+ spec.version = "0.1.6"
7
7
  spec.license = "Ruby"
8
8
  spec.authors = ["Ben D'Angelo", "Kitaiti Makoto"]
9
9
  spec.email = ["ben@bendangelo.me", "KitaitiMakoto@gmail.com"]
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whichlang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben D'Angelo
8
8
  - Kitaiti Makoto
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-01-03 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rutie
@@ -142,7 +141,6 @@ metadata:
142
141
  homepage_uri: https://github.com/bendangelo/whichlang-rb
143
142
  source_code_uri: https://github.com/bendangelo/whichlang-rb
144
143
  changelog_uri: https://github.com/bendangelo/whichlang-rb/blob/master/CHANGELOG.md
145
- post_install_message:
146
144
  rdoc_options: []
147
145
  require_paths:
148
146
  - lib
@@ -157,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
155
  - !ruby/object:Gem::Version
158
156
  version: '0'
159
157
  requirements: []
160
- rubygems_version: 3.5.3
161
- signing_key:
158
+ rubygems_version: 4.0.18
162
159
  specification_version: 4
163
160
  summary: Fast natural language detection library.
164
161
  test_files: []