all_seeing_eye 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/all_seeing_eye.gemspec +1 -1
- data/lib/all_seeing_eye/model.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/all_seeing_eye.gemspec
CHANGED
data/lib/all_seeing_eye/model.rb
CHANGED
@@ -116,8 +116,8 @@ class AllSeeingEye::Model
|
|
116
116
|
else
|
117
117
|
array = array.sort{|a, b| a.created_at <=> b.created_at}
|
118
118
|
end
|
119
|
-
start = array.first.created_at.
|
120
|
-
stop = array.last.created_at.
|
119
|
+
start = array.first.created_at.new_offset(0).to_i
|
120
|
+
stop = array.last.created_at.new_offset(0).to_i
|
121
121
|
interval = (stop - start) / options[:granularity]
|
122
122
|
interval = 1 if interval == 0
|
123
123
|
|
@@ -125,7 +125,7 @@ class AllSeeingEye::Model
|
|
125
125
|
options[:granularity].times {|n| tree[start + (interval * n)] = 0}
|
126
126
|
|
127
127
|
array.each do |o|
|
128
|
-
val = o.created_at.
|
128
|
+
val = o.created_at.new_offset(0).to_i
|
129
129
|
bound = tree.lower_bound(val)
|
130
130
|
bound = tree.upper_bound(val) if bound.nil?
|
131
131
|
tree[bound.first] += 1
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: all_seeing_eye
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Josh Symonds
|