activr 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/activr/storage/mongo_driver.rb +6 -4
- data/lib/activr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 181f71c3672b8ccf2e5f5fbe891c38bea35658ee
|
4
|
+
data.tar.gz: e48ccca004007fb0115a3829f0471a85c263fc21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87fb1f6900c94ba6654c056de0071fbd54feca68dfb6a383a6739bd38e0a5b8603be646eeb4b816eef9596a998bfd8cf60e273e07339c59141378c6a50ffae7
|
7
|
+
data.tar.gz: cbf4dc5d453090cad50181f3719adb82be675cf7ec35794f4e6559657aef21f3ed49c665d454e036aeb1e8bfbedd77938530e76325e45adc18c328471c33b116
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ With Activr you can create:
|
|
7
7
|
|
8
8
|
- a Global Activity Feed to display all activities in your website in a single feed
|
9
9
|
- a User Activity Feed to display all actions performed by a specific user
|
10
|
-
- a User News Feeds so
|
10
|
+
- a User News Feeds so that each user can get news from friends they follow, from albums they own or follow, etc.
|
11
11
|
- an Album Activity Feed to display what happens in a specific album
|
12
12
|
- ...
|
13
13
|
|
@@ -415,9 +415,10 @@ class Activr::Storage::MongoDriver
|
|
415
415
|
#
|
416
416
|
# @api private
|
417
417
|
def find_activities(limit, options = { })
|
418
|
-
selector
|
418
|
+
selector = options[:mongo_selector] || self.activities_selector(options)
|
419
|
+
sort_field = options[:mongo_sort_field] || 'at'
|
419
420
|
|
420
|
-
self.find(self.activity_collection, selector, limit, options[:skip],
|
421
|
+
self.find(self.activity_collection, selector, limit, options[:skip], sort_field)
|
421
422
|
end
|
422
423
|
|
423
424
|
# (see Storage#count_activities)
|
@@ -520,9 +521,10 @@ class Activr::Storage::MongoDriver
|
|
520
521
|
# @param options (see Storage#find_timeline)
|
521
522
|
# @return [Array<Hash>] An array of timeline entry documents
|
522
523
|
def find_timeline_entries(timeline_kind, recipient_id, limit, options = { })
|
523
|
-
selector
|
524
|
+
selector = options[:mongo_selector] || self.timeline_selector(timeline_kind, recipient_id, options)
|
525
|
+
sort_field = options[:mongo_sort_field] || 'activity.at'
|
524
526
|
|
525
|
-
self.find(self.timeline_collection(timeline_kind), selector, limit, options[:skip],
|
527
|
+
self.find(self.timeline_collection(timeline_kind), selector, limit, options[:skip], sort_field)
|
526
528
|
end
|
527
529
|
|
528
530
|
# Count number of timeline entry documents
|
data/lib/activr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aymerick JEHANNE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mustache
|