joshbuddy-fuzzy_hash 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +7 -0
  2. data/VERSION.yml +1 -1
  3. data/lib/fuzzy_hash.rb +3 -4
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -24,3 +24,10 @@ namespace(:spec) do
24
24
  end
25
25
 
26
26
  end
27
+
28
+ desc "Run all examples with RCov"
29
+ Spec::Rake::SpecTask.new('spec_with_rcov') do |t|
30
+ t.spec_files = FileList['spec/**/*.rb']
31
+ t.rcov = true
32
+ t.rcov_opts = ['--exclude', 'spec']
33
+ end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
+ :patch: 3
2
3
  :major: 0
3
4
  :minor: 0
4
- :patch: 2
data/lib/fuzzy_hash.rb CHANGED
@@ -1,12 +1,11 @@
1
1
  class FuzzyHash
2
2
 
3
- Version = '0.0.1'
4
-
5
- def initialize
6
- @hash = {}
3
+ def initialize(init_hash = nil)
7
4
  @regexes = []
8
5
  @hash_reverse = {}
9
6
  @regexes_reverse = {}
7
+ @hash = {}
8
+ init_hash.each{ |key,value| self[key] = value } if init_hash
10
9
  end
11
10
 
12
11
  def clear
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.2
4
+ version: 0.0.3
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-04-06 00:00:00 -07:00
12
+ date: 2009-05-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15