spelly 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class Spelly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,17 @@
1
+ require_relative "../lib/spelly"
2
+
3
+ describe Spelly do
4
+
5
+ it "should load a dictionary given a language" do
6
+ Spelly.new("en_US").dict.should
7
+ end
8
+
9
+ context "#spell_check" do
10
+ it "should return suggestions for misspelt words" do
11
+ words = %w/girll boy dog/
12
+ spelly = Spelly.new("en_GB")
13
+ spelly.spell_check(words).should == [{:word=>"girll", :suggest=>["grill", "girl", "gill", "girls", "girl l"]}]
14
+ end
15
+ end
16
+
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spelly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -55,8 +55,11 @@ files:
55
55
  - LICENSE.txt
56
56
  - README.md
57
57
  - Rakefile
58
+ - lib/dict/en_GB.aff
59
+ - lib/dict/en_GB.dic
58
60
  - lib/spelly.rb
59
61
  - lib/spelly/version.rb
62
+ - spec/spelly_spec.rb
60
63
  - spelly.gemspec
61
64
  homepage: http://gggarrett.com
62
65
  licenses: []
@@ -82,4 +85,5 @@ rubygems_version: 1.8.24
82
85
  signing_key:
83
86
  specification_version: 3
84
87
  summary: Given an array it will return mispelt words and suggestions for correct spellings
85
- test_files: []
88
+ test_files:
89
+ - spec/spelly_spec.rb