streama 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/lib/streama/activity.rb +20 -21
- data/lib/streama/definition_dsl.rb +15 -10
- data/lib/streama/version.rb +1 -1
- data/spec/app/models/activity.rb +16 -5
- data/spec/app/models/mars/user.rb +15 -0
- data/spec/lib/activity_spec.rb +29 -22
- data/spec/lib/actor_spec.rb +21 -12
- data/spec/spec_helper.rb +7 -5
- data/streama.gemspec +3 -1
- metadata +53 -20
data/.travis.yml
CHANGED
data/lib/streama/activity.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Streama
|
2
2
|
module Activity
|
3
3
|
extend ActiveSupport::Concern
|
4
|
-
|
4
|
+
|
5
5
|
included do
|
6
|
-
|
6
|
+
|
7
7
|
include Mongoid::Document
|
8
8
|
include Mongoid::Timestamps
|
9
9
|
|
@@ -13,7 +13,6 @@ module Streama
|
|
13
13
|
field :target_object
|
14
14
|
field :receivers, :type => Array
|
15
15
|
|
16
|
-
index :name => 1
|
17
16
|
index({ 'actor._id' => 1, 'actor._type' => 1 })
|
18
17
|
index({ 'object._id' => 1, 'object._type' => 1 })
|
19
18
|
index({ 'target_object._id' => 1, 'target_object._type' => 1 })
|
@@ -21,9 +20,9 @@ module Streama
|
|
21
20
|
|
22
21
|
validates_presence_of :actor, :verb
|
23
22
|
before_save :assign_data
|
24
|
-
|
23
|
+
|
25
24
|
end
|
26
|
-
|
25
|
+
|
27
26
|
module ClassMethods
|
28
27
|
|
29
28
|
# Defines a new activity type and registers a definition
|
@@ -54,33 +53,33 @@ module Streama
|
|
54
53
|
receivers = data.delete(:receivers)
|
55
54
|
new({:verb => verb}.merge(data)).publish(:receivers => receivers)
|
56
55
|
end
|
57
|
-
|
56
|
+
|
58
57
|
def stream_for(actor, options={})
|
59
58
|
query = {:receivers => {'$elemMatch' => {:id => actor.id, :type => actor.class.to_s}}}
|
60
|
-
query.merge!({:verb => options[:type]}) if options[:type]
|
59
|
+
query.merge!({:verb.in => [*options[:type]]}) if options[:type]
|
61
60
|
self.where(query).without(:receivers).desc(:created_at)
|
62
61
|
end
|
63
62
|
|
64
63
|
def stream_of(actor, options={})
|
65
64
|
query = {'actor.id' => actor.id, 'actor.type' => actor.class.to_s}
|
66
|
-
query.merge!({:verb => options[:type]}) if options[:type]
|
65
|
+
query.merge!({:verb.in => [*options[:type]]}) if options[:type]
|
67
66
|
self.where(query).without(:receivers).desc(:created_at)
|
68
67
|
end
|
69
|
-
|
68
|
+
|
70
69
|
end
|
71
70
|
|
72
|
-
|
71
|
+
|
73
72
|
# Publishes the activity to the receivers
|
74
73
|
#
|
75
74
|
# @param [ Hash ] options The options to publish with.
|
76
75
|
#
|
77
76
|
def publish(options = {})
|
78
|
-
actor = load_instance(:actor)
|
77
|
+
actor = load_instance(:actor)
|
79
78
|
self.receivers = (options[:receivers] || actor.followers).map { |r| { :id => r.id, :type => r.class.to_s } }
|
80
79
|
self.save
|
81
80
|
self
|
82
81
|
end
|
83
|
-
|
82
|
+
|
84
83
|
# Returns an instance of an actor, object or target
|
85
84
|
#
|
86
85
|
# @param [ Symbol ] type The data type (actor, object, target) to return an instance for.
|
@@ -89,38 +88,38 @@ module Streama
|
|
89
88
|
def load_instance(type)
|
90
89
|
(data = self.read_attribute(type)).is_a?(Hash) ? data['type'].to_s.camelcase.constantize.find(data['id']) : data
|
91
90
|
end
|
92
|
-
|
91
|
+
|
93
92
|
def refresh_data
|
94
93
|
assign_data
|
95
94
|
save(:validates_presence_of => false)
|
96
95
|
end
|
97
|
-
|
96
|
+
|
98
97
|
protected
|
99
|
-
|
98
|
+
|
100
99
|
def assign_data
|
101
|
-
|
100
|
+
|
102
101
|
[:actor, :object, :target_object].each do |type|
|
103
102
|
next unless object = load_instance(type)
|
104
103
|
|
105
104
|
class_sym = object.class.name.underscore.to_sym
|
106
105
|
|
107
106
|
raise Errors::InvalidData.new(class_sym) unless definition.send(type).has_key?(class_sym)
|
108
|
-
|
107
|
+
|
109
108
|
hash = {'id' => object.id, 'type' => object.class.name}
|
110
|
-
|
109
|
+
|
111
110
|
if fields = definition.send(type)[class_sym].try(:[],:cache)
|
112
111
|
fields.each do |field|
|
113
112
|
raise Errors::InvalidField.new(field) unless object.respond_to?(field)
|
114
113
|
hash[field.to_s] = object.send(field)
|
115
114
|
end
|
116
115
|
end
|
117
|
-
write_attribute(type, hash)
|
116
|
+
write_attribute(type, hash)
|
118
117
|
end
|
119
118
|
end
|
120
|
-
|
119
|
+
|
121
120
|
def definition
|
122
121
|
@definition ||= Streama::Definition.find(verb)
|
123
122
|
end
|
124
|
-
|
123
|
+
|
125
124
|
end
|
126
125
|
end
|
@@ -1,29 +1,34 @@
|
|
1
1
|
module Streama
|
2
|
-
|
2
|
+
|
3
3
|
class DefinitionDSL
|
4
|
-
|
4
|
+
|
5
5
|
attr_reader :attributes
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(name)
|
8
8
|
@attributes = {
|
9
9
|
:name => name.to_sym,
|
10
|
-
:actor => {},
|
11
|
-
:object => {},
|
10
|
+
:actor => {},
|
11
|
+
:object => {},
|
12
12
|
:target_object => {}
|
13
13
|
}
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
delegate :[], :to => :@attributes
|
17
|
-
|
17
|
+
|
18
18
|
def self.data_methods(*args)
|
19
19
|
args.each do |method|
|
20
20
|
define_method method do |*args|
|
21
|
-
|
21
|
+
class_sym = if class_name = args[1].try(:delete,:class_name)
|
22
|
+
class_name.underscore.to_sym
|
23
|
+
else
|
24
|
+
args[0].is_a?(Symbol) ? args[0] : args[0].class.to_sym
|
25
|
+
end
|
26
|
+
@attributes[method].store(class_sym, args[1])
|
22
27
|
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
data_methods :actor, :object, :target_object
|
26
31
|
|
27
32
|
end
|
28
|
-
|
29
|
-
end
|
33
|
+
|
34
|
+
end
|
data/lib/streama/version.rb
CHANGED
data/spec/app/models/activity.rb
CHANGED
@@ -1,21 +1,32 @@
|
|
1
1
|
class Activity
|
2
2
|
include Streama::Activity
|
3
|
-
|
3
|
+
|
4
4
|
activity :new_photo do
|
5
5
|
actor :user, :cache => [:full_name]
|
6
6
|
object :photo, :cache => [:file]
|
7
7
|
target_object :album, :cache => [:title]
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
activity :new_photo_without_cache do
|
11
11
|
actor :user
|
12
12
|
object :photo
|
13
13
|
target_object :album
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
activity :new_comment do
|
17
17
|
actor :user, :cache => [:full_name]
|
18
18
|
object :photo
|
19
19
|
end
|
20
|
-
|
21
|
-
|
20
|
+
|
21
|
+
activity :new_tag do
|
22
|
+
actor :user, :cache => [:full_name]
|
23
|
+
object :photo
|
24
|
+
end
|
25
|
+
|
26
|
+
activity :new_mars_photo do
|
27
|
+
actor :user, :cache => [:full_name], :class_name => 'Mars::User'
|
28
|
+
object :photo
|
29
|
+
target_object :album, :cache => [:title]
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/spec/lib/activity_spec.rb
CHANGED
@@ -5,6 +5,7 @@ describe "Activity" do
|
|
5
5
|
let(:photo) { Photo.create(:file => "image.jpg") }
|
6
6
|
let(:album) { Album.create(:title => "A test album") }
|
7
7
|
let(:user) { User.create(:full_name => "Christos") }
|
8
|
+
let(:mars_user) { Mars::User.create(:full_name => "Mars User") }
|
8
9
|
|
9
10
|
describe ".activity" do
|
10
11
|
it "registers and return a valid definition" do
|
@@ -13,12 +14,12 @@ describe "Activity" do
|
|
13
14
|
object :photo, :cache => [:file]
|
14
15
|
target_object :album, :cache => [:title]
|
15
16
|
end
|
16
|
-
|
17
|
+
|
17
18
|
@definition.is_a?(Streama::Definition).should be true
|
18
19
|
end
|
19
|
-
|
20
|
+
|
20
21
|
end
|
21
|
-
|
22
|
+
|
22
23
|
describe "#publish" do
|
23
24
|
|
24
25
|
before :each do
|
@@ -26,7 +27,7 @@ describe "Activity" do
|
|
26
27
|
2.times { |n| @send_to << User.create(:full_name => "Custom Receiver #{n}") }
|
27
28
|
5.times { |n| User.create(:full_name => "Receiver #{n}") }
|
28
29
|
end
|
29
|
-
|
30
|
+
|
30
31
|
it "pushes activity to receivers" do
|
31
32
|
@activity = Activity.publish(:new_photo, {:actor => user, :object => photo, :target_object => album, :receivers => @send_to})
|
32
33
|
@activity.receivers.size.should == 2
|
@@ -34,28 +35,28 @@ describe "Activity" do
|
|
34
35
|
|
35
36
|
|
36
37
|
context "when activity not cached" do
|
37
|
-
|
38
|
+
|
38
39
|
it "pushes activity to receivers" do
|
39
40
|
@activity = Activity.publish(:new_photo_without_cache, {:actor => user, :object => photo, :target_object => album, :receivers => @send_to})
|
40
41
|
@activity.receivers.size.should == 2
|
41
42
|
end
|
42
|
-
|
43
|
+
|
43
44
|
end
|
44
|
-
|
45
|
+
|
45
46
|
it "overrides the recievers if option passed" do
|
46
47
|
@activity = Activity.publish(:new_photo, {:actor => user, :object => photo, :target_object => album, :receivers => @send_to})
|
47
48
|
@activity.receivers.size.should == 2
|
48
49
|
end
|
49
|
-
|
50
50
|
|
51
|
-
|
51
|
+
|
52
|
+
|
52
53
|
context "when republishing"
|
53
54
|
before :each do
|
54
55
|
@actor = user
|
55
56
|
@activity = Activity.publish(:new_photo, {:actor => @actor, :object => photo, :target_object => album})
|
56
57
|
@activity.publish
|
57
58
|
end
|
58
|
-
|
59
|
+
|
59
60
|
it "updates metadata" do
|
60
61
|
@actor.full_name = "testing"
|
61
62
|
@actor.save
|
@@ -63,52 +64,58 @@ describe "Activity" do
|
|
63
64
|
@activity.actor['full_name'].should eq "testing"
|
64
65
|
end
|
65
66
|
end
|
66
|
-
|
67
|
+
|
67
68
|
describe ".publish" do
|
68
69
|
it "creates a new activity" do
|
69
70
|
activity = Activity.publish(:new_photo, {:actor => user, :object => photo, :target_object => album})
|
70
71
|
activity.should be_an_instance_of Activity
|
71
72
|
end
|
73
|
+
|
74
|
+
it " creates a new activity when actor has namespace" do
|
75
|
+
activity = Activity.publish(:new_mars_photo, {:actor => mars_user, :object => photo, :target_object => album})
|
76
|
+
activity.should be_an_instance_of Activity
|
77
|
+
end
|
78
|
+
|
72
79
|
end
|
73
80
|
|
74
81
|
describe "#refresh" do
|
75
|
-
|
82
|
+
|
76
83
|
before :each do
|
77
84
|
@user = user
|
78
85
|
@activity = Activity.publish(:new_photo, {:actor => @user, :object => photo, :target_object => album})
|
79
86
|
end
|
80
|
-
|
87
|
+
|
81
88
|
it "reloads instances and updates activities stored data" do
|
82
89
|
@activity.save
|
83
|
-
@activity = Activity.last
|
84
|
-
|
90
|
+
@activity = Activity.last
|
91
|
+
|
85
92
|
expect do
|
86
93
|
@user.update_attribute(:full_name, "Test")
|
87
94
|
@activity.refresh_data
|
88
95
|
end.to change{ @activity.load_instance(:actor).full_name}.from("Christos").to("Test")
|
89
96
|
end
|
90
|
-
|
97
|
+
|
91
98
|
end
|
92
99
|
|
93
100
|
describe "#load_instance" do
|
94
|
-
|
101
|
+
|
95
102
|
before :each do
|
96
103
|
@activity = Activity.publish(:new_photo, {:actor => user, :object => photo, :target_object => album})
|
97
104
|
@activity = Activity.last
|
98
105
|
end
|
99
|
-
|
106
|
+
|
100
107
|
it "loads an actor instance" do
|
101
108
|
@activity.load_instance(:actor).should be_instance_of User
|
102
109
|
end
|
103
|
-
|
110
|
+
|
104
111
|
it "loads an object instance" do
|
105
112
|
@activity.load_instance(:object).should be_instance_of Photo
|
106
113
|
end
|
107
|
-
|
114
|
+
|
108
115
|
it "loads a target instance" do
|
109
116
|
@activity.load_instance(:target_object).should be_instance_of Album
|
110
117
|
end
|
111
|
-
|
118
|
+
|
112
119
|
end
|
113
|
-
|
120
|
+
|
114
121
|
end
|
data/spec/lib/actor_spec.rb
CHANGED
@@ -5,7 +5,7 @@ describe "Actor" do
|
|
5
5
|
let(:photo) { Photo.create(:comment => "I'm interested") }
|
6
6
|
let(:album) { Album.create(:title => "A test album") }
|
7
7
|
let(:user) { User.create(:full_name => "Christos") }
|
8
|
-
|
8
|
+
|
9
9
|
it "raises an exception if the class is not a mongoid document" do
|
10
10
|
lambda { NoMongoid.new }.should raise_error Streama::Errors::NotMongoid
|
11
11
|
end
|
@@ -24,48 +24,57 @@ describe "Actor" do
|
|
24
24
|
activity = user.publish_activity(:new_photo, :object => photo, :target_object => album, :receivers => :friends)
|
25
25
|
activity.receivers.size == 6
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
end
|
29
29
|
|
30
30
|
describe "#activity_stream" do
|
31
|
-
|
31
|
+
|
32
32
|
before :each do
|
33
33
|
user.publish_activity(:new_photo, :object => photo, :target_object => album)
|
34
34
|
user.publish_activity(:new_comment, :object => photo)
|
35
35
|
|
36
36
|
u = User.create(:full_name => "Other User")
|
37
37
|
u.publish_activity(:new_photo, :object => photo, :target_object => album)
|
38
|
+
u.publish_activity(:new_tag, :object => photo)
|
38
39
|
|
39
40
|
end
|
40
41
|
|
41
42
|
it "retrieves the stream for an actor" do
|
42
|
-
user.activity_stream.size.should eq
|
43
|
+
user.activity_stream.size.should eq 4
|
43
44
|
end
|
44
45
|
|
45
46
|
it "retrieves the stream and filters to a particular activity type" do
|
46
47
|
user.activity_stream(:type => :new_photo).size.should eq 2
|
47
48
|
end
|
48
49
|
|
50
|
+
it "retrieves the stream and filters to a couple particular activity types" do
|
51
|
+
user.activity_stream(:type => [:new_tag, :new_comment]).size.should eq 2
|
52
|
+
end
|
53
|
+
|
49
54
|
end
|
50
|
-
|
55
|
+
|
51
56
|
describe "#published_activities" do
|
52
57
|
before :each do
|
53
|
-
user.publish_activity(:new_photo, :object => photo, :target_object => album)
|
58
|
+
user.publish_activity(:new_photo, :object => photo, :target_object => album)
|
54
59
|
user.publish_activity(:new_comment, :object => photo)
|
55
|
-
|
60
|
+
user.publish_activity(:new_tag, :object => photo)
|
61
|
+
|
56
62
|
u = User.create(:full_name => "Other User")
|
57
63
|
u.publish_activity(:new_photo, :object => photo, :target_object => album)
|
58
|
-
|
59
64
|
end
|
60
|
-
|
65
|
+
|
61
66
|
it "retrieves published activities for the actor" do
|
62
|
-
user.published_activities.size.should eq
|
67
|
+
user.published_activities.size.should eq 3
|
63
68
|
end
|
64
|
-
|
69
|
+
|
65
70
|
it "retrieves and filters published activities by type for the actor" do
|
66
71
|
user.published_activities(:type => :new_photo).size.should eq 1
|
67
72
|
end
|
68
|
-
|
73
|
+
|
74
|
+
it "retrieves and filters published activities by a couple types for the actor" do
|
75
|
+
user.published_activities(:type => [:new_comment, :new_tag]).size.should eq 2
|
76
|
+
end
|
77
|
+
|
69
78
|
end
|
70
79
|
|
71
80
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "pry"
|
1
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
3
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
3
4
|
|
@@ -10,7 +11,7 @@ require 'streama'
|
|
10
11
|
require 'mongoid'
|
11
12
|
require 'rspec'
|
12
13
|
require 'database_cleaner'
|
13
|
-
|
14
|
+
|
14
15
|
LOGGER = Logger.new($stdout)
|
15
16
|
|
16
17
|
DatabaseCleaner.strategy = :truncation
|
@@ -27,6 +28,7 @@ Dir[ File.join(MODELS, "*.rb") ].sort.each do |file|
|
|
27
28
|
name = File.basename(file, ".rb")
|
28
29
|
autoload name.camelize.to_sym, name
|
29
30
|
end
|
31
|
+
require File.join(MODELS,"mars","user.rb")
|
30
32
|
|
31
33
|
Dir[ File.join(SUPPORT, "*.rb") ].each do |file|
|
32
34
|
require File.basename(file)
|
@@ -36,20 +38,20 @@ RSpec.configure do |config|
|
|
36
38
|
config.include RSpec::Matchers
|
37
39
|
config.include Mongoid::Matchers
|
38
40
|
config.mock_with :rspec
|
39
|
-
|
41
|
+
|
40
42
|
config.before(:each) do
|
41
43
|
DatabaseCleaner.start
|
42
44
|
Mongoid::IdentityMap.clear
|
43
45
|
end
|
44
|
-
|
46
|
+
|
45
47
|
config.after(:each) do
|
46
48
|
DatabaseCleaner.clean
|
47
49
|
end
|
48
|
-
|
50
|
+
|
49
51
|
config.after(:suite) do
|
50
52
|
if ENV["CI"]
|
51
53
|
Mongoid::Threaded.sessions[:default].drop
|
52
54
|
end
|
53
55
|
end
|
54
|
-
|
56
|
+
|
55
57
|
end
|
data/streama.gemspec
CHANGED
@@ -18,8 +18,10 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
+
s.add_dependency("mongoid", "~> 3.0.0")
|
22
|
+
|
21
23
|
s.add_development_dependency "rspec", "~> 2.5"
|
22
24
|
s.add_development_dependency "database_cleaner", "~> 0.8"
|
23
|
-
s.add_development_dependency "
|
25
|
+
s.add_development_dependency "pry"
|
24
26
|
s.add_development_dependency "rake"
|
25
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: streama
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mongoid
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.0.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.0.0
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: rspec
|
16
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
17
33
|
none: false
|
18
34
|
requirements:
|
19
35
|
- - ~>
|
@@ -21,10 +37,15 @@ dependencies:
|
|
21
37
|
version: '2.5'
|
22
38
|
type: :development
|
23
39
|
prerelease: false
|
24
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.5'
|
25
46
|
- !ruby/object:Gem::Dependency
|
26
47
|
name: database_cleaner
|
27
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
28
49
|
none: false
|
29
50
|
requirements:
|
30
51
|
- - ~>
|
@@ -32,21 +53,31 @@ dependencies:
|
|
32
53
|
version: '0.8'
|
33
54
|
type: :development
|
34
55
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: mongoid
|
38
|
-
requirement: &70100852274860 !ruby/object:Gem::Requirement
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
57
|
none: false
|
40
58
|
requirements:
|
41
59
|
- - ~>
|
42
60
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
61
|
+
version: '0.8'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: pry
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
44
70
|
type: :development
|
45
71
|
prerelease: false
|
46
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
47
78
|
- !ruby/object:Gem::Dependency
|
48
79
|
name: rake
|
49
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
50
81
|
none: false
|
51
82
|
requirements:
|
52
83
|
- - ! '>='
|
@@ -54,7 +85,12 @@ dependencies:
|
|
54
85
|
version: '0'
|
55
86
|
type: :development
|
56
87
|
prerelease: false
|
57
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
58
94
|
description: Streama is a simple activity stream gem for use with the Mongoid ODM
|
59
95
|
framework
|
60
96
|
email:
|
@@ -81,6 +117,7 @@ files:
|
|
81
117
|
- lib/streama/version.rb
|
82
118
|
- spec/app/models/activity.rb
|
83
119
|
- spec/app/models/album.rb
|
120
|
+
- spec/app/models/mars/user.rb
|
84
121
|
- spec/app/models/no_mongoid.rb
|
85
122
|
- spec/app/models/photo.rb
|
86
123
|
- spec/app/models/user.rb
|
@@ -102,27 +139,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
139
|
- - ! '>='
|
103
140
|
- !ruby/object:Gem::Version
|
104
141
|
version: '0'
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
hash: 4280395878127855216
|
108
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
143
|
none: false
|
110
144
|
requirements:
|
111
145
|
- - ! '>='
|
112
146
|
- !ruby/object:Gem::Version
|
113
147
|
version: '0'
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
hash: 4280395878127855216
|
117
148
|
requirements: []
|
118
149
|
rubyforge_project: streama
|
119
|
-
rubygems_version: 1.8.
|
150
|
+
rubygems_version: 1.8.23
|
120
151
|
signing_key:
|
121
152
|
specification_version: 3
|
122
153
|
summary: Activity Streams for Mongoid
|
123
154
|
test_files:
|
124
155
|
- spec/app/models/activity.rb
|
125
156
|
- spec/app/models/album.rb
|
157
|
+
- spec/app/models/mars/user.rb
|
126
158
|
- spec/app/models/no_mongoid.rb
|
127
159
|
- spec/app/models/photo.rb
|
128
160
|
- spec/app/models/user.rb
|
@@ -131,3 +163,4 @@ test_files:
|
|
131
163
|
- spec/lib/definition_dsl_spec.rb
|
132
164
|
- spec/lib/definition_spec.rb
|
133
165
|
- spec/spec_helper.rb
|
166
|
+
has_rdoc:
|