streama 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,137 +1,125 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: streama
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.4
4
5
  prerelease:
5
- version: 0.3.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Christos Pappas
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-06-29 00:00:00 +10:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: activesupport
18
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2012-02-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70213468334740 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "3.0"
24
- type: :runtime
20
+ - !ruby/object:Gem::Version
21
+ version: '2.5'
22
+ type: :development
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70213468334740
25
+ - !ruby/object:Gem::Dependency
28
26
  name: mongoid
29
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &70213468333820 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
29
+ requirements:
32
30
  - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "2.0"
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.3.0
31
+ - !ruby/object:Gem::Version
32
+ version: '2.4'
46
33
  type: :development
47
34
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: bundler
51
- requirement: &id004 !ruby/object:Gem::Requirement
35
+ version_requirements: *70213468333820
36
+ - !ruby/object:Gem::Dependency
37
+ name: bson_ext
38
+ requirement: &70213468332900 !ruby/object:Gem::Requirement
52
39
  none: false
53
- requirements:
40
+ requirements:
54
41
  - - ~>
55
- - !ruby/object:Gem::Version
56
- version: 1.0.0
42
+ - !ruby/object:Gem::Version
43
+ version: '1.5'
57
44
  type: :development
58
45
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: jeweler
62
- requirement: &id005 !ruby/object:Gem::Requirement
46
+ version_requirements: *70213468332900
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: &70213468332440 !ruby/object:Gem::Requirement
63
50
  none: false
64
- requirements:
65
- - - ~>
66
- - !ruby/object:Gem::Version
67
- version: 1.6.1
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
68
55
  type: :development
69
56
  prerelease: false
70
- version_requirements: *id005
71
- description: Streama is a simple activity stream gem for use with the Mongoid ODM framework.
72
- email: christos.pappas@gmail.com
57
+ version_requirements: *70213468332440
58
+ description: Streama is a simple activity stream gem for use with the Mongoid ODM
59
+ framework
60
+ email:
61
+ - christos.pappas@gmail.com
73
62
  executables: []
74
-
75
63
  extensions: []
76
-
77
- extra_rdoc_files:
78
- - LICENSE.txt
79
- - README.rdoc
80
- files:
64
+ extra_rdoc_files: []
65
+ files:
81
66
  - .document
67
+ - .gitignore
82
68
  - .rspec
69
+ - .travis.yml
83
70
  - Gemfile
84
71
  - Gemfile.lock
85
72
  - LICENSE.txt
86
- - README.rdoc
73
+ - README.md
87
74
  - Rakefile
88
- - VERSION
89
75
  - lib/streama.rb
90
76
  - lib/streama/activity.rb
91
77
  - lib/streama/actor.rb
92
78
  - lib/streama/definition.rb
93
79
  - lib/streama/definition_dsl.rb
94
80
  - lib/streama/errors.rb
81
+ - lib/streama/version.rb
82
+ - spec/app/models/activity.rb
83
+ - spec/app/models/album.rb
84
+ - spec/app/models/photo.rb
85
+ - spec/app/models/user.rb
95
86
  - spec/lib/activity_spec.rb
96
87
  - spec/lib/actor_spec.rb
97
88
  - spec/lib/definition_dsl_spec.rb
98
89
  - spec/lib/definition_spec.rb
99
90
  - spec/spec_helper.rb
100
- - spec/support/models/activity.rb
101
- - spec/support/models/enquiry.rb
102
- - spec/support/models/listing.rb
103
- - spec/support/models/user.rb
104
91
  - streama.gemspec
105
- has_rdoc: true
106
- homepage: http://github.com/christospappas/streama
107
- licenses:
108
- - MIT
92
+ homepage: ''
93
+ licenses: []
109
94
  post_install_message:
110
95
  rdoc_options: []
111
-
112
- require_paths:
96
+ require_paths:
113
97
  - lib
114
- required_ruby_version: !ruby/object:Gem::Requirement
98
+ required_ruby_version: !ruby/object:Gem::Requirement
115
99
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- hash: 1536933183991159388
120
- segments:
121
- - 0
122
- version: "0"
123
- required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
105
  none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- version: "0"
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
129
110
  requirements: []
130
-
131
- rubyforge_project:
132
- rubygems_version: 1.6.2
111
+ rubyforge_project: streama
112
+ rubygems_version: 1.8.16
133
113
  signing_key:
134
114
  specification_version: 3
135
- summary: Streama is a simple activity stream gem for use with the Mongoid ODM framework.
136
- test_files: []
137
-
115
+ summary: Activity Streams for Mongoid
116
+ test_files:
117
+ - spec/app/models/activity.rb
118
+ - spec/app/models/album.rb
119
+ - spec/app/models/photo.rb
120
+ - spec/app/models/user.rb
121
+ - spec/lib/activity_spec.rb
122
+ - spec/lib/actor_spec.rb
123
+ - spec/lib/definition_dsl_spec.rb
124
+ - spec/lib/definition_spec.rb
125
+ - spec/spec_helper.rb
@@ -1,114 +0,0 @@
1
- = Streama
2
-
3
- Streama is a simple Ruby activity stream gem for use with the Mongoid ODM framework.
4
-
5
- **UPDATE: Streama now conforms to the activitystrea.ms specification. Version 0.3.0 breaks compatibility with previous versions.**
6
-
7
- == Install
8
-
9
- $ gem install streama
10
-
11
- == Usage
12
-
13
- === Define Activities
14
-
15
- Create an Activity model and define the activities and the fields you would like to cache within the activity.
16
-
17
- An activity consists of an actor, a verb, an object, and a target.
18
-
19
- class Activity
20
- include Streama::Activity
21
-
22
- activity :new_enquiry do
23
- actor :user, :cache => [:full_name]
24
- object :enquiry, :cache => [:subject, :comment]
25
- target :listing, :cache => [:title]
26
- end
27
-
28
- end
29
-
30
- The activity verb is implied from the activity name, in the above example the verb is :new_enquiry
31
-
32
- The object may be the entity performing the activity, or the entity on which the activity was performed.
33
- e.g John(actor) shared a video(object)
34
-
35
- The target is the object that the verb is enacted on.
36
- e.g. Geraldine(actor) posted a photo(object) to her album(target)
37
-
38
- This is based on the Activity Streams 1.0 specification (http://activitystrea.ms)
39
-
40
- === Setup Actors
41
-
42
- Include the Actor module in a class and override the default followers method.
43
-
44
- class User
45
- include Mongoid::Document
46
- include Streama::Actor
47
-
48
- field :full_name, :type => String
49
-
50
- def followers
51
- User.excludes(:id => self.id).all
52
- end
53
- end
54
-
55
- === Setup Indexes
56
-
57
- Create the indexes for the Activities collection. You can do so by calling the create_indexes method.
58
-
59
- Activity.create_indexes
60
-
61
- === Publishing Activity
62
-
63
- In your controller or background worker:
64
-
65
- current_user.publish_activity(:new_enquiry, :object => @enquiry, :target => @listing)
66
-
67
- This will publish the activity to the mongoid objects returned by the #followers method in the Actor.
68
-
69
- To send your activity to different receievers, pass in an additional :receivers parameter.
70
-
71
- current_user.publish_activity(:new_enquiry, :object => @enquiry, :target => @listing, :receivers => :friends) # calls friends method
72
- current_user.publish_activity(:new_enquiry, :object => @enquiry, :target => @listing, :receivers => current_user.find(:all, :conditions => {:group_id => mygroup}))
73
-
74
- == Retrieving Activity
75
-
76
- To retrieve all activity for an actor
77
-
78
- current_user.activity_stream
79
-
80
- To retrieve and filter to a particular activity type
81
-
82
- current_user.activity_stream(:type => :activity_verb)
83
-
84
- If you need to return the instance of an :actor, :object or :target from an activity call the Activity#load_instance method
85
-
86
- activity.load_instance(:actor)
87
-
88
- You can also refresh the cached activity data by calling the Activity#refresh_data method
89
-
90
- activity.refresh_data
91
-
92
- == Compatibility
93
-
94
- Streama is developed against Ruby 1.9.2 and Mongoid 2
95
-
96
- == TODO
97
-
98
- * Write more documentation, YARD
99
- * Write more tests
100
- * Benchmarks
101
-
102
- = License
103
-
104
- Copyright © 2011 Christos Pappas
105
-
106
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
107
-
108
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
109
-
110
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
111
-
112
- = Credits
113
-
114
- Christos Pappas: christos dot pappas at gmail dot com
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.2
@@ -1,10 +0,0 @@
1
- class Activity
2
- include Streama::Activity
3
-
4
- activity :enquiry do
5
- actor :user, :cache => [:full_name]
6
- object :enquiry, :cache => [:subject]
7
- target :listing, :cache => [:title]
8
- end
9
-
10
- end