trackoid 0.1.6 → 0.1.7
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 +11 -9
- data/VERSION +1 -1
- data/lib/trackoid/aggregates.rb +4 -3
- data/trackoid.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -187,13 +187,15 @@ For comparison, this README is already 8.5Kb in size.
|
|
187
187
|
|
188
188
|
= Revision History
|
189
189
|
|
190
|
-
0.1.
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
190
|
+
0.1.7 - Maintenance Release: A little error with the index on aggregated fields
|
191
|
+
|
192
|
+
0.1.6 - Enabled support for String dates in operators. This string date must
|
193
|
+
be DateTime parseable.
|
194
|
+
For example: @spain.world_cups.inc("2010-07-11")
|
195
|
+
- Normalized Date and DateTime objects to use only Date methods.
|
196
|
+
- Added "first" / "first_date" / "last" / "last_date" accessors.
|
197
|
+
- Added "all" accessor.
|
198
|
+
|
199
|
+
0.1.5 - Added support for namespaced models and aggregations
|
200
|
+
- Enabled "set" operations on aggregates
|
199
201
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/lib/trackoid/aggregates.rb
CHANGED
@@ -25,7 +25,7 @@ module Mongoid #:nodoc:
|
|
25
25
|
#
|
26
26
|
# <tt>class Page</tt>
|
27
27
|
# <tt> include Mongoid::Document</tt>
|
28
|
-
# <tt> include Mongoid::
|
28
|
+
# <tt> include Mongoid::Tracking</tt>
|
29
29
|
# <tt> track :visits</tt>
|
30
30
|
# <tt> aggregate :browsers do |b|</tt>
|
31
31
|
# <tt> b.split(" ").first</tt>
|
@@ -39,7 +39,7 @@ module Mongoid #:nodoc:
|
|
39
39
|
# <tt>belongs_to :page</tt>
|
40
40
|
# <tt>field :ns, :type => String</tt>
|
41
41
|
# <tt>field :key, :type => String</tt>
|
42
|
-
# <tt>index [:ns, :key], :unique => true</tt>
|
42
|
+
# <tt>index [:page_id, :ns, :key], :unique => true</tt>
|
43
43
|
# <tt>track :[original_parent_tracking_data]</tt>
|
44
44
|
# <tt>track :...</tt>
|
45
45
|
#
|
@@ -96,7 +96,8 @@ module Mongoid #:nodoc:
|
|
96
96
|
# Internal fields to track aggregation token and keys
|
97
97
|
field :ns, :type => String
|
98
98
|
field :key, :type => String
|
99
|
-
index [[:ns, Mongo::ASCENDING], [:key, Mongo::ASCENDING]],
|
99
|
+
index [["#{parent_name}_id".to_sym, Mongo::ASCENDING], [:ns, Mongo::ASCENDING], [:key, Mongo::ASCENDING]],
|
100
|
+
:unique => true, :background => true
|
100
101
|
|
101
102
|
# Include parent tracking data.
|
102
103
|
parent_name.camelize.constantize.tracked_fields.each {|track_field| track track_field }
|
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.1.
|
8
|
+
s.version = "0.1.7"
|
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{2010-07-
|
12
|
+
s.date = %q{2010-07-17}
|
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
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jose Miguel Perez
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-17 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|