cld 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/cld/extconf.rb +3 -0
- data/lib/cld/version.rb +1 -1
- metadata +32 -57
- data/.gitignore +0 -20
- data/.rspec +0 -2
- data/Gemfile +0 -6
- data/Rakefile +0 -5
- data/cld.gemspec +0 -22
- data/spec/cld_spec.rb +0 -67
- data/spec/spec_helper.rb +0 -6
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3c55c7c7fbfe65e1ff42ae98b6204dc1512c93c73bf0c6307941ca8311a02fa4
|
4
|
+
data.tar.gz: 4c8dff7178ea6a40f5774dfc754a569f224295b3e8c4101da32698412307f196
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5e81f1c5e5cf1e1331decf06f6fcd62b2f4cfca41e03814058efd2a19a0a24d29213d537c03a611911020ac5b8ab78fb7b3a103b12d734b817b8e111f0a2079a
|
7
|
+
data.tar.gz: 6c5d2f238af51c8a7acb36652ba93156114c64a012e7c0d886cc0d211e83cf2f846bf68d531f2cfbc269885ae52443707e5553e685d106de62b2344e4aa8a575
|
data/ext/cld/extconf.rb
CHANGED
data/lib/cld/version.rb
CHANGED
metadata
CHANGED
@@ -1,56 +1,39 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cld
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.7.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.0
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Jason Toy
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2018-12-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
16
14
|
name: ffi
|
17
|
-
|
18
|
-
|
19
|
-
none: false
|
20
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
21
17
|
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
24
20
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: rspec
|
28
21
|
prerelease: false
|
29
|
-
|
30
|
-
|
31
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
32
24
|
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :development
|
36
|
-
version_requirements: *id002
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
37
27
|
description: Compact Language Detection for Ruby
|
38
|
-
email:
|
28
|
+
email:
|
39
29
|
- jtoy@jtoy.net
|
40
30
|
executables: []
|
41
|
-
|
42
|
-
extensions:
|
31
|
+
extensions:
|
43
32
|
- ext/cld/extconf.rb
|
44
33
|
extra_rdoc_files: []
|
45
|
-
|
46
|
-
files:
|
47
|
-
- .gitignore
|
48
|
-
- .rspec
|
49
|
-
- Gemfile
|
34
|
+
files:
|
50
35
|
- LICENSE
|
51
36
|
- README.md
|
52
|
-
- Rakefile
|
53
|
-
- cld.gemspec
|
54
37
|
- ext/cld/Makefile.am
|
55
38
|
- ext/cld/Makefile.in
|
56
39
|
- ext/cld/aclocal.m4
|
@@ -161,35 +144,27 @@ files:
|
|
161
144
|
- ext/cld/thunk.cc
|
162
145
|
- lib/cld.rb
|
163
146
|
- lib/cld/version.rb
|
164
|
-
|
165
|
-
- spec/spec_helper.rb
|
166
|
-
homepage: http://github.com/jtoy/cld
|
147
|
+
homepage: https://github.com/jtoy/cld
|
167
148
|
licenses: []
|
168
|
-
|
149
|
+
metadata: {}
|
169
150
|
post_install_message:
|
170
151
|
rdoc_options: []
|
171
|
-
|
172
|
-
require_paths:
|
152
|
+
require_paths:
|
173
153
|
- lib
|
174
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
-
|
176
|
-
requirements:
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
177
156
|
- - ">="
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version:
|
180
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
-
|
182
|
-
requirements:
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
183
161
|
- - ">="
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version:
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
186
164
|
requirements: []
|
187
|
-
|
188
165
|
rubyforge_project:
|
189
|
-
rubygems_version:
|
166
|
+
rubygems_version: 2.7.6
|
190
167
|
signing_key:
|
191
|
-
specification_version:
|
168
|
+
specification_version: 4
|
192
169
|
summary: Compact Language Detection for Ruby
|
193
|
-
test_files:
|
194
|
-
- spec/cld_spec.rb
|
195
|
-
- spec/spec_helper.rb
|
170
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/cld.gemspec
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/cld/version', __FILE__)
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["Jason Toy"]
|
6
|
-
gem.email = ["jtoy@jtoy.net"]
|
7
|
-
gem.description = %q{Compact Language Detection for Ruby}
|
8
|
-
gem.summary = %q{Compact Language Detection for Ruby}
|
9
|
-
gem.homepage = "http://github.com/jtoy/cld"
|
10
|
-
|
11
|
-
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
-
gem.files = `git ls-files`.split("\n")
|
13
|
-
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
-
gem.extensions = ["ext/cld/extconf.rb"]
|
15
|
-
gem.name = "cld"
|
16
|
-
gem.require_paths = ["lib"]
|
17
|
-
gem.version = CLD::VERSION
|
18
|
-
|
19
|
-
gem.add_dependency "ffi"
|
20
|
-
|
21
|
-
gem.add_development_dependency "rspec"
|
22
|
-
end
|
data/spec/cld_spec.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
require "spec_helper"
|
3
|
-
|
4
|
-
describe CLD do
|
5
|
-
|
6
|
-
context "English text" do
|
7
|
-
subject { CLD.detect_language("This is a test") }
|
8
|
-
|
9
|
-
it { subject[:name].should eq("ENGLISH") }
|
10
|
-
it { subject[:code].should eq("en") }
|
11
|
-
it { subject[:reliable].should be_true }
|
12
|
-
end
|
13
|
-
|
14
|
-
context "French text" do
|
15
|
-
subject { CLD.detect_language("plus ça change, plus c'est la même chose") }
|
16
|
-
|
17
|
-
it { subject[:name].should eq("FRENCH") }
|
18
|
-
it { subject[:code].should eq("fr") }
|
19
|
-
it { subject[:reliable].should be_true }
|
20
|
-
end
|
21
|
-
|
22
|
-
context "French in HTML - using CLD html " do
|
23
|
-
subject { CLD.detect_language("<html><head><body><script>A large amount of english in the script which should be ignored if using html in detect_language.</script><p>plus ça change, plus c'est la même chose</p></body></html>", false) }
|
24
|
-
|
25
|
-
it { subject[:name].should eq("FRENCH") }
|
26
|
-
it { subject[:code].should eq("fr") }
|
27
|
-
|
28
|
-
end
|
29
|
-
context "French in HTML - using CLD text " do
|
30
|
-
subject { CLD.detect_language("<html><head><body><script>A large amount of english in the script which should be ignored if using html in detect_language.</script><p>plus ça change, plus c'est la même chose</p></body></html>", true) }
|
31
|
-
|
32
|
-
it { subject[:name].should eq("ENGLISH") }
|
33
|
-
it { subject[:code].should eq("en") }
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
context "Simplified Chinese text" do
|
38
|
-
subject { CLD.detect_language("你好吗箭体") }
|
39
|
-
|
40
|
-
it { subject[:name].should eq("Chinese") }
|
41
|
-
it { subject[:code].should eq("zh") }
|
42
|
-
end
|
43
|
-
|
44
|
-
context "Traditional Chinese text" do
|
45
|
-
subject { CLD.detect_language("你好嗎繁體") }
|
46
|
-
|
47
|
-
it { subject[:name].should eq("ChineseT") }
|
48
|
-
it { subject[:code].should eq("zh-TW") }
|
49
|
-
end
|
50
|
-
|
51
|
-
context "Unknown text" do
|
52
|
-
subject { CLD.detect_language("") }
|
53
|
-
|
54
|
-
it { subject[:name].should eq("Unknown") }
|
55
|
-
it { subject[:code].should eq("un") }
|
56
|
-
it { subject[:reliable].should be_true }
|
57
|
-
end
|
58
|
-
|
59
|
-
context "nil for text" do
|
60
|
-
subject { CLD.detect_language(nil) }
|
61
|
-
|
62
|
-
it { subject[:name].should eq("Unknown") }
|
63
|
-
it { subject[:code].should eq("un") }
|
64
|
-
it { subject[:reliable].should be_true }
|
65
|
-
end
|
66
|
-
|
67
|
-
end
|