streamit 0.0.6.1 → 0.0.6.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.
Files changed (2) hide show
  1. data/README.rdoc +39 -29
  2. metadata +2 -2
@@ -2,33 +2,43 @@
2
2
 
3
3
  Provides feed stream like feature to rails apps
4
4
 
5
- class Stream
6
- include MongoMapper::Document
7
- include Streamit::ORM::MongoMapper
8
- end
9
-
10
- # "he9lin started watching auction ipad a minute ago"
11
- #
12
- # en:
13
- # streamit:
14
- # watching:
15
- # create: "started watching"
16
- #
17
- class Watching < ActiveRecord::Base
18
- belongs_to :watcher, :class_name => "User", :foreign_key => "user_id"
19
- belongs_to :watched_item, :class_name => "Item", :foreign_key => "item_id"
5
+ stream.rb
6
+
7
+ class Stream
8
+ include MongoMapper::Document
9
+ include Streamit::ORM::MongoMapper
10
+ end
11
+
12
+ "he9lin started watching auction ipad a minute ago"
13
+
14
+ en.yml
15
+
16
+ en:
17
+ streamit:
18
+ watching:
19
+ create: "started watching"
20
+
21
+ watching.rb
22
+
23
+ class Watching < ActiveRecord::Base
24
+ belongs_to :watcher, :class_name => "User", :foreign_key => "user_id"
25
+ belongs_to :watched_item, :class_name => "Item", :foreign_key => "item_id"
20
26
 
21
- stream :create, :actor => :watcher,
22
- :receiver => :watched_item
23
- end
24
-
25
- # "he9lin edited profile image just now"
26
- #
27
- # en:
28
- # users:
29
- # update:
30
- # image_url: "edited profile image"
31
- #
32
- class User < ActiveRecord::Base
33
- stream :update, :attributes => :image_url
34
- end
27
+ stream :create, :actor => :watcher,
28
+ :receiver => :watched_item
29
+ end
30
+
31
+ "he9lin edited profile image just now"
32
+
33
+ en.yml
34
+
35
+ en:
36
+ users:
37
+ update:
38
+ image_url: "edited profile image"
39
+
40
+ user.rb
41
+
42
+ class User < ActiveRecord::Base
43
+ stream :update, :attributes => :image_url
44
+ end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.0.6.1
9
+ - 2
10
+ version: 0.0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lin He