activr 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8c5213239d234ced0af5ebb399a7eda41e0a4d5
4
- data.tar.gz: 21e2e0097d635de10733d743c371dc2ba5d8dbb4
3
+ metadata.gz: 181f71c3672b8ccf2e5f5fbe891c38bea35658ee
4
+ data.tar.gz: e48ccca004007fb0115a3829f0471a85c263fc21
5
5
  SHA512:
6
- metadata.gz: 30fed199b4ebce7be3858d8c9979ba9c423bc320a395a6b885477819024c3e34ec35c650671fd94ecc3de2a69a2ff5a21cd64598fa24add61ff765e3a41300b2
7
- data.tar.gz: 1aa847be13816b6a8588de4b5373c85e4f7bd53eb838cb3daad0ad479acffe66da65cf6c10d35c19c8f378f1dd0d67008148aca4b48d5a88240502d7045b5110
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 thar each user can get news from friends they follow, from albums they own or follow, etc.
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 = options[:mongo_selector] || self.activities_selector(options)
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], 'at')
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 = options[:mongo_selector] || self.timeline_selector(timeline_kind, recipient_id, options)
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], 'activity.at')
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
@@ -1,6 +1,6 @@
1
1
  module Activr
2
2
 
3
3
  # Activr version
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
 
6
6
  end
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.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-21 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mustache