trackoid 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +9 -0
- data/VERSION +1 -1
- data/lib/trackoid/reader_extender.rb +4 -0
- data/spec/reader_extender_spec.rb +8 -4
- data/trackoid.gemspec +2 -2
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -315,6 +315,15 @@ Trackoid will correctly translate dates for you (hopefully) if you pass a date t
|
|
315
315
|
|
316
316
|
= Revision History
|
317
317
|
|
318
|
+
0.3.2 - ReaderExtender as_json sould not return the full "total" and
|
319
|
+
"hours" data. I think it's more reasonable to return just the
|
320
|
+
total number like it always was. If you have the whole structure
|
321
|
+
you need to add somewhere:
|
322
|
+
|
323
|
+
def as_json
|
324
|
+
{ :total => @stat, :hourly => @stat.hourly }
|
325
|
+
end
|
326
|
+
|
318
327
|
0.3.1 - Implemented 'to_f' into ReaderExtender to be compatible with
|
319
328
|
ActionView::Template
|
320
329
|
Using "%.1f" % number gave "Can't convert to float"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
@@ -21,10 +21,14 @@ describe Mongoid::Tracking::ReaderExtender do
|
|
21
21
|
num.to_f.should be_kind_of(Float)
|
22
22
|
end
|
23
23
|
|
24
|
-
it "as_json should return a 'total' and a 'hours' member" do
|
25
|
-
json = Mongoid::Tracking::ReaderExtender.new(5, []).as_json
|
26
|
-
json.should
|
27
|
-
|
24
|
+
it "as_json should not return a 'total' and a 'hours' member" do
|
25
|
+
json = Mongoid::Tracking::ReaderExtender.new(5, [1, 2, 3]).as_json
|
26
|
+
json.should == 5
|
27
|
+
end
|
28
|
+
|
29
|
+
it "hourly as_json should return an array" do
|
30
|
+
json = Mongoid::Tracking::ReaderExtender.new(5, [1, 2, 3]).hourly.as_json
|
31
|
+
json.should == [1, 2, 3]
|
28
32
|
end
|
29
33
|
|
30
34
|
it "should be able to add additional data to it" do
|
data/trackoid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{trackoid}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jose Miguel Perez"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-18}
|
13
13
|
s.description = %q{Trackoid uses an embeddable approach to track analytics data using the poweful features of MongoDB for scalability}
|
14
14
|
s.email = %q{josemiguel@perezruiz.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jose Miguel Perez
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-04-
|
17
|
+
date: 2011-04-18 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|