vector_embed 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/lib/vector_embed.rb +0 -2
- data/lib/vector_embed/version.rb +1 -1
- data/spec/vector_embed_spec.rb +1 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/vector_embed.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'logger'
|
2
|
-
require 'digest/md5'
|
3
2
|
require 'murmurhash3'
|
4
3
|
|
5
4
|
require 'vector_embed/version'
|
@@ -62,7 +61,6 @@ class VectorEmbed
|
|
62
61
|
def index(parts)
|
63
62
|
sig = parts.join NULL_BYTE
|
64
63
|
if dict
|
65
|
-
sig = Digest::MD5.digest sig
|
66
64
|
dict[sig] || @mutex.synchronize do
|
67
65
|
dict[sig] ||= begin
|
68
66
|
k = parts[0]
|
data/lib/vector_embed/version.rb
CHANGED
data/spec/vector_embed_spec.rb
CHANGED
@@ -67,10 +67,9 @@ describe VectorEmbed do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "provides the latest dict on demand" do
|
70
|
-
require 'digest/md5'
|
71
70
|
v = VectorEmbed.new dict: {}
|
72
71
|
v.line(1, 'foo' => 5)
|
73
|
-
v.dict.should == {
|
72
|
+
v.dict.should == { 'foo' => 1 }
|
74
73
|
end
|
75
74
|
end
|
76
75
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vector_embed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: murmurhash3
|