ru_bee 0.0.9 → 0.1.0
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 +5 -13
- data/README.md +27 -23
- data/lib/ru_bee/version.rb +1 -1
- data/lib/scanner.rb +4 -0
- data/ru_bee.gemspec +2 -2
- data/spec/scanner_spec.rb +9 -0
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Nzc4YThhNjA4NmIxODkzNmUyZTFkZTEyYzY3Y2E2NzZhYmExYjFmMA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1ebbdc60feeecd7c9acee31590a037dc0784526f
|
4
|
+
data.tar.gz: 7eec24ba6b08aaf15031a3261f5622501c71981e
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
Y2NiY2IzZjllYmZmNTY1NmFlODQ0NjhkMWZhMjdhODg2NjA0MDU3YzY1OTMx
|
11
|
-
NjZkYmY0YzA0YWIxYjEzMDA1ZGI1N2EwNDUzM2IxMzgxOGMxNGE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmZiMWI0NjQyZGRiYzE1NWE3ZDcxM2Q0MmU5Mjk5Y2UzMzc3NTgyNDAxYmU4
|
14
|
-
NjFjZjJlYzZhMWY4YTAwNTY1ZmNkMGYxNGQ3NTMyMzhmMmVkNmYzMDQ3ZWJk
|
15
|
-
NjMwNjM3OTQ5ZWY1YmVlMTc0ZWE4OWIzYTU1M2RiMWViNDEyM2I=
|
6
|
+
metadata.gz: 21c099525f30e85eabd4e6f3a9b72ec5c4149255f6fec80628d8b77a6c35aa422e32c341c2e77a09ef7365ee0a3ff899c3e22e5f83ddb61d069c36eb6b8f4dbc
|
7
|
+
data.tar.gz: e5b9feda7f928d304b204e1a6ff9ac4d8ac41440f6b948609f1b7f0e351c9f1a8e87dea364e981a2bb5a3564e1ac63cbd275d3c07747d2ccc87a0e7e8ec5e9a0
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ Or install it yourself as:
|
|
29
29
|
|
30
30
|
######boolean
|
31
31
|
|
32
|
-
|
32
|
+
Checks String for misspelled words. Returns boolean.
|
33
33
|
|
34
34
|
######arguments
|
35
35
|
|
@@ -37,70 +37,74 @@ Does the string contain a misspelling?
|
|
37
37
|
#correct? language: 'english'
|
38
38
|
```
|
39
39
|
|
40
|
-
|
40
|
+
_Other languages coming..._
|
41
41
|
|
42
|
+
######usage
|
42
43
|
|
43
44
|
```ruby
|
44
45
|
"This is a correct sentence. It works well and is pretty cool. You can also use numbers 123!".correct?
|
45
46
|
```
|
46
47
|
|
47
|
-
|
48
|
+
###### `=> true`
|
48
49
|
|
49
50
|
```ruby
|
50
51
|
"This santence contains a typo.".correct?
|
51
52
|
```
|
52
53
|
|
53
|
-
|
54
|
+
###### `=> false`
|
54
55
|
|
55
56
|
|
56
|
-
|
57
|
+
###spell_check
|
57
58
|
|
58
59
|
```
|
59
|
-
#
|
60
|
+
#spell_check
|
60
61
|
```
|
61
62
|
|
62
|
-
######
|
63
|
-
|
64
|
-
Array of misspellings from String
|
65
|
-
|
66
|
-
######arguments
|
63
|
+
######array
|
67
64
|
|
68
65
|
```
|
69
|
-
#
|
66
|
+
#spell_check language: 'english'
|
70
67
|
```
|
71
68
|
|
72
|
-
|
73
|
-
"This is a correct sentence. It works well and is pretty cool. You can also use numbers 123!".misspellings
|
74
|
-
```
|
69
|
+
Returns array of hashes consisting of word and suggestioned corrections.
|
75
70
|
|
76
|
-
|
71
|
+
######usage
|
77
72
|
|
78
73
|
```ruby
|
79
|
-
|
74
|
+
'fla'.spell_check
|
80
75
|
```
|
81
76
|
|
82
|
-
|
77
|
+
###### `=> [{word: 'fla', suggestions: ["flab", "flabbergast", "flabbergastation", "flabbergasted"...]}]`
|
83
78
|
|
84
79
|
|
85
|
-
###
|
80
|
+
###misspellings
|
86
81
|
|
87
82
|
```
|
88
|
-
#misspellings
|
83
|
+
#misspellings
|
89
84
|
```
|
90
85
|
|
91
|
-
|
86
|
+
######array
|
87
|
+
|
88
|
+
Array of misspellings from String
|
92
89
|
|
93
90
|
```ruby
|
94
|
-
|
91
|
+
"This is a correct sentence. It works well and is pretty cool. You can also use numbers 123!".misspellings
|
95
92
|
```
|
96
93
|
|
97
|
-
|
94
|
+
###### `=> []`
|
98
95
|
|
96
|
+
```ruby
|
97
|
+
"This santence contains a typo.".misspellings
|
98
|
+
```
|
99
99
|
|
100
|
+
###### `=> ['santence']`
|
100
101
|
|
101
102
|
|
102
103
|
## Contributing
|
103
104
|
|
105
|
+
#### Code
|
106
|
+
fork or pr away
|
107
|
+
|
104
108
|
#### Dictionaries
|
105
109
|
Add issue or submit pull request to add different languages or make additions to the library.
|
106
110
|
Each dictionary is in lib/dictionaries
|
data/lib/ru_bee/version.rb
CHANGED
data/lib/scanner.rb
CHANGED
data/ru_bee.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = RuBee::VERSION
|
9
9
|
spec.authors = ["dan"]
|
10
10
|
spec.email = ["danbickford007@yahoo.com"]
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{Checks
|
11
|
+
spec.summary = %q{Spell check for Ruby String.}
|
12
|
+
spec.description = %q{Checks for words within a String that are spelled incorrectly and offers suggestions for a correction . Usage: 'this is a test'.correct? or 'this is a test'.spell_check or 'this is a test'.misspellings}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/spec/scanner_spec.rb
CHANGED
@@ -18,6 +18,15 @@ describe String do
|
|
18
18
|
|
19
19
|
end
|
20
20
|
|
21
|
+
describe '#spell_check' do
|
22
|
+
|
23
|
+
it 'should return true with correct word' do
|
24
|
+
expect(test_string_good).to receive(:misspellings)
|
25
|
+
test_string_good.spell_check
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
21
30
|
describe '#misspellings' do
|
22
31
|
|
23
32
|
it 'should return array of misspelled words' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ru_bee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dan
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -52,15 +52,16 @@ dependencies:
|
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.2.0
|
55
|
-
description:
|
56
|
-
is a test''.
|
55
|
+
description: 'Checks for words within a String that are spelled incorrectly and offers
|
56
|
+
suggestions for a correction . Usage: ''this is a test''.correct? or ''this is a
|
57
|
+
test''.spell_check or ''this is a test''.misspellings'
|
57
58
|
email:
|
58
59
|
- danbickford007@yahoo.com
|
59
60
|
executables: []
|
60
61
|
extensions: []
|
61
62
|
extra_rdoc_files: []
|
62
63
|
files:
|
63
|
-
- .gitignore
|
64
|
+
- ".gitignore"
|
64
65
|
- Gemfile
|
65
66
|
- LICENSE.txt
|
66
67
|
- README.md
|
@@ -87,20 +88,20 @@ require_paths:
|
|
87
88
|
- lib
|
88
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
90
|
requirements:
|
90
|
-
- -
|
91
|
+
- - ">="
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
95
|
requirements:
|
95
|
-
- -
|
96
|
+
- - ">="
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: '0'
|
98
99
|
requirements: []
|
99
100
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.
|
101
|
+
rubygems_version: 2.2.2
|
101
102
|
signing_key:
|
102
103
|
specification_version: 4
|
103
|
-
summary:
|
104
|
+
summary: Spell check for Ruby String.
|
104
105
|
test_files:
|
105
106
|
- spec/dictionary_spec.rb
|
106
107
|
- spec/scanner_spec.rb
|