stream_rails 2.2.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/lib/stream_rails/config.rb +2 -0
- data/lib/stream_rails/version.rb +1 -1
- data/lib/stream_rails.rb +2 -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: 6f45aa0e3dd69e72ed3690118dc9d3dd04c9921e
|
4
|
+
data.tar.gz: 2c535ef5107a6f56be191c679ad5bd86575bfd41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cdf88de17a7378f1c4c2d58fece46d5e71d61374784fc432081e6243fd2eacc4e24513b0f0fef55211693d271f641e1261ebb874206882960178ab48cdf98e1
|
7
|
+
data.tar.gz: a5c3638890a1af1b42f46c4edc59e3e26b8defa716c38d4123426de839e2e7600153ddde07cd54b2c413b4513fa0242d44ccd0cb8ca9b7b432893cea528dd8cc
|
data/README.md
CHANGED
@@ -61,6 +61,7 @@ require 'stream_rails'
|
|
61
61
|
StreamRails.configure do |config|
|
62
62
|
config.api_key = "YOUR API KEY"
|
63
63
|
config.api_secret = "YOUR API SECRET"
|
64
|
+
config.timeout = 30
|
64
65
|
end
|
65
66
|
```
|
66
67
|
|
@@ -85,7 +86,7 @@ class Pin < ActiveRecord::Base
|
|
85
86
|
|
86
87
|
end
|
87
88
|
```
|
88
|
-
Everytime a Pin is created it will be stored in the feed of the user that created it
|
89
|
+
Everytime a Pin is created it will be stored in the feed of the user that created it. When a Pin instance is deleted, the feed will be removed as well.
|
89
90
|
|
90
91
|
####Activity fields
|
91
92
|
|
@@ -150,8 +151,8 @@ feed = StreamRails.feed_manager.get_user_feed(current_user.id)
|
|
150
151
|
|
151
152
|
####Feeds bundled with feed_manager
|
152
153
|
|
153
|
-
To get you started the manager has 4 feeds pre
|
154
|
-
Feeds are divided
|
154
|
+
To get you started the manager has 4 feeds pre-configured. You can add more feeds if your application requires it.
|
155
|
+
Feeds are divided into three categories.
|
155
156
|
|
156
157
|
#####User feed:
|
157
158
|
The user feed stores all activities for a user. Think of it as your personal Facebook page. You can easily get this feed from the manager.
|
@@ -160,7 +161,7 @@ feed = StreamRails.feed_manager.get_user_feed(current_user.id)
|
|
160
161
|
```
|
161
162
|
|
162
163
|
#####News feeds:
|
163
|
-
|
164
|
+
News feeds store activities from the people you follow.
|
164
165
|
There is both a flat newsfeed (similar to twitter) and an aggregated newsfeed (like facebook).
|
165
166
|
|
166
167
|
```php
|
@@ -226,7 +227,7 @@ end
|
|
226
227
|
```
|
227
228
|
|
228
229
|
####Follow a feed
|
229
|
-
|
230
|
+
This is how you create the newsfeeds you need to notify the system about follow relationships. The manager comes with APIs to let a user's news feed follow another user's feed. This code lets the current user's flat and aggregated feeds follow the target_user's personal feed.
|
230
231
|
|
231
232
|
```
|
232
233
|
StreamRails.feed_manager.follow_user(user_id, target_id)
|
@@ -255,7 +256,7 @@ activities = enricher.enrich_activities(results)
|
|
255
256
|
####Templating
|
256
257
|
|
257
258
|
Now that you've enriched the activities you can render them in a view.
|
258
|
-
For convenience we
|
259
|
+
For convenience we include a basic view:
|
259
260
|
|
260
261
|
```
|
261
262
|
<div class="container">
|
data/lib/stream_rails/config.rb
CHANGED
@@ -6,6 +6,7 @@ module StreamRails
|
|
6
6
|
attr_accessor :location
|
7
7
|
attr_accessor :api_site_id
|
8
8
|
attr_accessor :enabled
|
9
|
+
attr_accessor :timeout
|
9
10
|
|
10
11
|
attr_accessor :news_feeds
|
11
12
|
attr_accessor :notification_feed
|
@@ -16,6 +17,7 @@ module StreamRails
|
|
16
17
|
@news_feeds = {:flat=>'flat', :aggregated=>'aggregated'}
|
17
18
|
@notification_feed = 'notification'
|
18
19
|
@user_feed = 'user'
|
20
|
+
@timeout = 3
|
19
21
|
end
|
20
22
|
|
21
23
|
def feed_configs
|
data/lib/stream_rails/version.rb
CHANGED
data/lib/stream_rails.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stream_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommaso Barbugli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|