whispr 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/whispr.rb +5 -5
- data/lib/whispr/version.rb +1 -1
- metadata +2 -2
data/lib/whispr.rb
CHANGED
@@ -223,7 +223,7 @@ class Whispr
|
|
223
223
|
fromTime = fromTime.to_i
|
224
224
|
untilTime = untilTime.to_i
|
225
225
|
now = Time.now.to_i
|
226
|
-
oldest = header[:maxRetention]
|
226
|
+
oldest = now - header[:maxRetention]
|
227
227
|
fromTime = oldest if fromTime < oldest
|
228
228
|
raise InvalidTimeInterval.new("Invalid time interval") unless fromTime < untilTime
|
229
229
|
untilTime = now if untilTime > now || untilTime < fromTime
|
@@ -368,9 +368,9 @@ private
|
|
368
368
|
if higherBaseInterval == 0
|
369
369
|
higherFirstOffset = higher.offset
|
370
370
|
else
|
371
|
-
timeDistance
|
372
|
-
pointDistance
|
373
|
-
byteDistance
|
371
|
+
timeDistance = lowerIntervalStart - higherBaseInterval
|
372
|
+
pointDistance = timeDistance / higher.spp
|
373
|
+
byteDistance = pointDistance * POINT_SIZE
|
374
374
|
higherFirstOffset = higher.offset + (byteDistance % higher.size)
|
375
375
|
end
|
376
376
|
|
@@ -407,7 +407,7 @@ private
|
|
407
407
|
|
408
408
|
knownValues = neighborValues.select { |v| !v.nil? }
|
409
409
|
return false if knownValues.empty?
|
410
|
-
if (knownValues.length / neighborValues.length
|
410
|
+
if (knownValues.length.to_f / neighborValues.length.to_f) < header[:xFilesFactor]
|
411
411
|
return false
|
412
412
|
end
|
413
413
|
|
data/lib/whispr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whispr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2012-
|
12
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email: whispr@simulacre.org
|