joshbuddy-fuzzy_hash 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/fuzzy_hash.rb +1 -1
- data/spec/fuzzy_hash_spec.rb +10 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/fuzzy_hash.rb
CHANGED
data/spec/fuzzy_hash_spec.rb
CHANGED
@@ -29,6 +29,16 @@ describe "Fuzzy hash" do
|
|
29
29
|
l[nil].should == 'qwe2'
|
30
30
|
end
|
31
31
|
|
32
|
+
it "should allow boolean keys" do
|
33
|
+
l = FuzzyHash.new
|
34
|
+
l[false] = 'false'
|
35
|
+
l[true] = 'true'
|
36
|
+
l[/.*/] = 'everything else'
|
37
|
+
l[true].should == 'true'
|
38
|
+
l[false].should == 'false'
|
39
|
+
l['false'].should == 'everything else'
|
40
|
+
end
|
41
|
+
|
32
42
|
it "should pick between the correct regex" do
|
33
43
|
hash = FuzzyHash.new
|
34
44
|
hash[/^\d+$/] = 'number'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: joshbuddy-fuzzy_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Hull
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-06 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|