social_stream 0.4.1 → 0.4.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.
- data/Rakefile +0 -12
- data/app/controllers/activities_controller.rb +17 -1
- data/app/controllers/api_controller.rb +2 -2
- data/app/controllers/avatars_controller.rb +44 -0
- data/app/controllers/contacts_controller.rb +13 -21
- data/app/controllers/conversations_controller.rb +107 -0
- data/app/controllers/groups_controller.rb +7 -11
- data/app/controllers/messages_controller.rb +21 -88
- data/app/controllers/profiles_controller.rb +3 -1
- data/app/controllers/pshb_controller.rb +37 -1
- data/app/controllers/ties_controller.rb +7 -8
- data/app/controllers/users_controller.rb +19 -43
- data/app/helpers/location_helper.rb +34 -0
- data/app/helpers/subjects_helper.rb +18 -1
- data/app/models/activity.rb +67 -27
- data/app/models/activity_verb.rb +1 -1
- data/app/models/actor.rb +85 -37
- data/app/models/avatar.rb +90 -0
- data/app/models/group.rb +2 -2
- data/app/models/profile.rb +8 -0
- data/app/models/tie.rb +20 -22
- data/app/models/user.rb +2 -8
- data/app/views/activities/_index.html.erb +22 -0
- data/app/views/activities/_options.html.erb +3 -1
- data/app/views/activities/_root.html.erb +4 -2
- data/app/views/activities/_walls.html.erb +34 -0
- data/app/views/activities/index.js.erb +1 -0
- data/app/views/avatars/_form.html.erb +23 -0
- data/app/views/{logos → avatars}/_precrop.html.erb +23 -15
- data/app/views/avatars/edit.html.erb +6 -0
- data/app/views/avatars/index.html.erb +42 -0
- data/app/views/{logos → avatars}/new.html.erb +7 -11
- data/app/views/avatars/show.html.erb +5 -0
- data/app/views/contacts/_index.html.erb +33 -0
- data/app/views/contacts/index.html.erb +35 -2
- data/app/views/contacts/index.js.erb +1 -0
- data/app/views/conversations/_conversation.html.erb +37 -0
- data/app/views/conversations/_conversation_full.html.erb +52 -0
- data/app/views/{messages → conversations}/_conversations.html.erb +2 -1
- data/app/views/conversations/_index.html.erb +23 -0
- data/app/views/{messages → conversations}/_menu_options.html.erb +2 -2
- data/app/views/conversations/_show.html.erb +21 -0
- data/app/views/{messages → conversations}/edit.html.erb +0 -0
- data/app/views/{messages → conversations}/index.html.erb +1 -3
- data/app/views/conversations/index.js.erb +7 -0
- data/app/views/conversations/show.html.erb +47 -0
- data/app/views/conversations/show.js.erb +39 -0
- data/app/views/frontpage/_header.html.erb +5 -1
- data/app/views/groups/_new.html.erb +50 -48
- data/app/views/groups/_sidebar_show.html.erb +1 -1
- data/app/views/groups/index.html.erb +1 -1
- data/app/views/groups/new.html.erb +6 -1
- data/app/views/groups/show.html.erb +1 -3
- data/app/views/home/_menu.html.erb +46 -0
- data/app/views/home/_sidebar.html.erb +12 -0
- data/app/views/home/index.html.erb +3 -3
- data/app/views/layouts/application.html.erb +1 -1
- data/app/views/layouts/test.html +58 -41
- data/app/views/location/_location.html.erb +3 -0
- data/app/views/messages/_form.html.erb +5 -52
- data/app/views/messages/_message.html.erb +31 -0
- data/app/views/messages/_new.html.erb +10 -16
- data/app/views/messages/new.html.erb +48 -3
- data/app/views/messages/new.js.erb +38 -1
- data/app/views/profiles/_profile.html.erb +194 -0
- data/app/views/profiles/edit.html.erb +168 -0
- data/app/views/profiles/show.html.erb +2 -175
- data/app/views/{users → profiles}/update.js.erb +12 -15
- data/app/views/subjects/_contacts.html.erb +2 -3
- data/app/views/subjects/_toolbar_home.html.erb +1 -1
- data/app/views/subjects/_toolbar_home_menu.html.erb +4 -1
- data/app/views/subjects/_toolbar_home_menu_options.html.erb +4 -7
- data/app/views/subjects/_toolbar_home_menu_options_subjects.html.erb +0 -3
- data/app/views/subjects/_toolbar_logo.html.erb +1 -1
- data/app/views/subjects/_toolbar_message_menu.html.erb +17 -0
- data/app/views/subjects/_toolbar_profile.html.erb +4 -12
- data/app/views/subjects/_toolbar_profile_menu.html.erb +9 -10
- data/app/views/subjects/_toolbar_profile_menu_basic_options.html.erb +6 -5
- data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +13 -13
- data/app/views/ties/_new.html.erb +30 -25
- data/app/views/ties/_suggestions.html.erb +1 -0
- data/app/views/ties/new.js.erb +2 -0
- data/app/views/users/_index.html.erb +1 -1
- data/app/views/users/index.html.erb +1 -3
- data/app/views/users/show.html.erb +4 -3
- data/config/locales/en.yml +79 -24
- data/config/routes.rb +8 -2
- data/lib/generators/social_stream/install_generator.rb +1 -1
- data/lib/generators/social_stream/templates/migration.rb +17 -11
- data/lib/generators/social_stream/templates/public/images/btn/message_conversation.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_inbox.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_new.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_sentbox.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_trash.png +0 -0
- data/lib/generators/social_stream/templates/public/javascripts/ajax.paginate.js +1 -1
- data/lib/generators/social_stream/templates/public/javascripts/menu.js +9 -99
- data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +14 -5
- data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +1 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/jquery-ui.css +13 -10
- data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +5 -11
- data/lib/generators/social_stream/templates/public/stylesheets/default/messages.css +96 -20
- data/lib/generators/social_stream/templates/relations.yml +1 -0
- data/lib/paperclip/social_stream.rb +1 -1
- data/lib/social_stream/ability.rb +1 -0
- data/lib/social_stream/controllers/helpers.rb +20 -0
- data/lib/social_stream/models/subject.rb +13 -12
- data/lib/social_stream/rails.rb +4 -1
- data/lib/social_stream/version.rb +1 -1
- data/lib/tasks/db/populate.rake +14 -4
- data/social_stream.gemspec +31 -5
- data/spec/controllers/contacts_controller_spec.rb +6 -0
- data/spec/controllers/profiles_controller_spec.rb +3 -4
- data/spec/dummy/config/initializers/devise.rb +4 -1
- data/spec/dummy/config/relations.yml +1 -0
- data/spec/models/activity_spec.rb +24 -0
- metadata +91 -89
- data/app/controllers/logos_controller.rb +0 -37
- data/app/models/logo.rb +0 -88
- data/app/views/activities/_activities.html.erb +0 -46
- data/app/views/groups/_profile.html.erb +0 -142
- data/app/views/groups/edit.html.erb +0 -135
- data/app/views/groups/update.js.erb +0 -39
- data/app/views/logos/_form.html.erb +0 -33
- data/app/views/logos/edit.html.erb +0 -6
- data/app/views/logos/index.html.erb +0 -27
- data/app/views/logos/show.html.erb +0 -5
- data/app/views/menu/_group.html.erb +0 -15
- data/app/views/menu/_home_user.html.erb +0 -0
- data/app/views/menu/_optionsGroups.html.erb +0 -11
- data/app/views/menu/_optionsUser.html.erb +0 -11
- data/app/views/menu/_services.html.erb +0 -11
- data/app/views/menu/_tiesGroup.html.erb +0 -14
- data/app/views/menu/_tiesUser.html.erb +0 -11
- data/app/views/menu/_user.html.erb +0 -15
- data/app/views/messages/_conversation.html.erb +0 -34
- data/app/views/messages/_conversation_full.html.erb +0 -65
- data/app/views/messages/_index.html.erb +0 -19
- data/app/views/messages/_location.html.erb +0 -3
- data/app/views/messages/_show.html.erb +0 -22
- data/app/views/messages/index.js.erb +0 -1
- data/app/views/messages/show.html.erb +0 -10
- data/app/views/messages/show.js.erb +0 -1
- data/app/views/users/_profile.html.erb +0 -171
- data/app/views/users/_sidebar_show.html.erb +0 -1
- data/app/views/users/edit.html.erb +0 -194
|
@@ -36,6 +36,7 @@ group:
|
|
|
36
36
|
- [ read, activity, star_ties ] # read activities from other members
|
|
37
37
|
- [ update, activity, weak_star_ties ] # update and destroy activities to members,
|
|
38
38
|
- [ destroy, activity, weak_star_ties ] # acquaintance and public
|
|
39
|
+
- [ read, tie, weak_star_ties ]
|
|
39
40
|
partner:
|
|
40
41
|
name: partner
|
|
41
42
|
parent: member # member is stronger than partner
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Create new Paperclip::Interpolations method for subtype class
|
|
2
2
|
module Paperclip::Interpolations #:nodoc:
|
|
3
3
|
def subtype_class attachment, style_name
|
|
4
|
-
attachment.instance.subject_type.to_s.underscore
|
|
4
|
+
attachment.instance.actor.subject_type.to_s.underscore
|
|
5
5
|
end
|
|
6
6
|
end
|
|
@@ -8,6 +8,26 @@ module SocialStream
|
|
|
8
8
|
helper_method :current_subject
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
module ClassMethods
|
|
12
|
+
# Add to controllers that have nested subjects. Examples are:
|
|
13
|
+
#
|
|
14
|
+
# class ProfilesController < InheritedResources::Base
|
|
15
|
+
# belongs_to_subjects(:singleton => true) # provides /users/demo/profile
|
|
16
|
+
# end
|
|
17
|
+
#
|
|
18
|
+
# class ActivitiesController < InheritedResources::Base
|
|
19
|
+
# belongs_to_subjects # provides /users/demo/activities
|
|
20
|
+
# end
|
|
21
|
+
#
|
|
22
|
+
def belongs_to_subjects(options = {})
|
|
23
|
+
opts = { :polymorphic => true, :finder => :find_by_slug! }.update(options)
|
|
24
|
+
|
|
25
|
+
args = SocialStream.subjects + [ opts ]
|
|
26
|
+
|
|
27
|
+
belongs_to *args
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
11
31
|
module InstanceMethods
|
|
12
32
|
# Current subject represented by the user. Defaults to the own user
|
|
13
33
|
def current_subject
|
|
@@ -30,17 +30,22 @@ module SocialStream
|
|
|
30
30
|
|
|
31
31
|
has_one :profile, :through => :actor
|
|
32
32
|
|
|
33
|
-
accepts_nested_attributes_for :profile
|
|
34
|
-
|
|
35
33
|
validates_presence_of :name
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
accepts_nested_attributes_for :profile
|
|
36
|
+
|
|
37
|
+
scope :alphabetic, joins(:actor).merge(Actor.alphabetic)
|
|
38
|
+
|
|
39
|
+
scope :letter, lambda{ |param|
|
|
40
|
+
joins(:actor).merge(Actor.letter(param))
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
scope :search, lambda{ |param|
|
|
39
|
-
joins(:actor).
|
|
44
|
+
joins(:actor).merge(Actor.search(param))
|
|
40
45
|
}
|
|
41
|
-
|
|
42
|
-
scope :
|
|
43
|
-
|
|
46
|
+
|
|
47
|
+
scope :distinct_initials, joins(:actor).merge(Actor.distinct_initials)
|
|
48
|
+
|
|
44
49
|
scope :popular, lambda {
|
|
45
50
|
joins(:actor => :received_ties).
|
|
46
51
|
select("DISTINCT #{ table_name }.*, COUNT(#{ table_name}.id) AS popularity").
|
|
@@ -62,11 +67,7 @@ module SocialStream
|
|
|
62
67
|
def method_missing(method, *args, &block)
|
|
63
68
|
super
|
|
64
69
|
rescue NameError => subject_error
|
|
65
|
-
|
|
66
|
-
actor!.__send__ method, *args, &block
|
|
67
|
-
rescue NameError
|
|
68
|
-
raise subject_error
|
|
69
|
-
end
|
|
70
|
+
actor!.__send__ method, *args, &block
|
|
70
71
|
end
|
|
71
72
|
|
|
72
73
|
# {Actor} handles some methods
|
data/lib/social_stream/rails.rb
CHANGED
|
@@ -16,6 +16,8 @@ require 'devise'
|
|
|
16
16
|
require 'cancan'
|
|
17
17
|
# REST controllers
|
|
18
18
|
require 'inherited_resources'
|
|
19
|
+
# Scopes in controllers
|
|
20
|
+
require 'has_scope'
|
|
19
21
|
# Logo attachments
|
|
20
22
|
require 'paperclip'
|
|
21
23
|
require 'paperclip/social_stream'
|
|
@@ -29,7 +31,7 @@ require 'rails_css_themes'
|
|
|
29
31
|
module SocialStream
|
|
30
32
|
class Engine < ::Rails::Engine #:nodoc:
|
|
31
33
|
config.app_generators.authentication :devise
|
|
32
|
-
config.app_generators.
|
|
34
|
+
config.app_generators.messages :mailboxer
|
|
33
35
|
|
|
34
36
|
config.to_prepare do
|
|
35
37
|
%w( actor activity_object ).each do |supertype|
|
|
@@ -40,6 +42,7 @@ module SocialStream
|
|
|
40
42
|
ApplicationController.helper ActivitiesHelper
|
|
41
43
|
ApplicationController.helper SubjectsHelper
|
|
42
44
|
ApplicationController.helper TiesHelper
|
|
45
|
+
ApplicationController.helper LocationHelper
|
|
43
46
|
end
|
|
44
47
|
|
|
45
48
|
initializer "social_stream.inflections" do
|
data/lib/tasks/db/populate.rake
CHANGED
|
@@ -15,11 +15,21 @@ namespace :db do
|
|
|
15
15
|
def set_logos(klass)
|
|
16
16
|
klass.all.each do |i|
|
|
17
17
|
logo = Dir[File.join(LOGOS_PATH, klass.to_s.tableize, "#{ i.id }.*")].first
|
|
18
|
-
|
|
18
|
+
avatar = Dir[File.join(LOGOS_PATH, klass.to_s.tableize, "#{ i.id }.*")].first
|
|
19
|
+
=begin
|
|
19
20
|
if logo.present? && File.exists?(logo)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
i.
|
|
21
|
+
Logo.copy_to_temp_file(logo)
|
|
22
|
+
dimensions = Logo.get_image_dimensions(logo)
|
|
23
|
+
l = Logo.new(:actor => i.actor,:logo => File.open(logo), :name => File.basename(logo), :crop_x => 0, :crop_y => 0, :crop_w => dimensions[:width], :crop_h => dimensions[:height] )
|
|
24
|
+
l.save(false)
|
|
25
|
+
end
|
|
26
|
+
=end
|
|
27
|
+
if avatar.present? && File.exists?(avatar)
|
|
28
|
+
Avatar.copy_to_temp_file(avatar)
|
|
29
|
+
dimensions = Avatar.get_image_dimensions(avatar)
|
|
30
|
+
l = Avatar.new(:actor => i.actor,:logo => File.open(avatar), :name => File.basename(avatar), :crop_x => 0, :crop_y => 0, :crop_w => dimensions[:width], :crop_h => dimensions[:height] )
|
|
31
|
+
l.active = true
|
|
32
|
+
l.save(false)
|
|
23
33
|
end
|
|
24
34
|
end
|
|
25
35
|
end
|
data/social_stream.gemspec
CHANGED
|
@@ -9,33 +9,59 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
"CISE - ESPOL" ]
|
|
10
10
|
s.homepage = "http://social-stream.dit.upm.es/"
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
|
12
|
+
|
|
13
|
+
# Gem dependencies
|
|
14
|
+
#
|
|
15
|
+
# Activity hierarchies
|
|
12
16
|
s.add_runtime_dependency('atd-ancestry', '1.3.0')
|
|
17
|
+
# Relation hierarchies
|
|
13
18
|
s.add_runtime_dependency('nested_set', '~> 1.5.3')
|
|
19
|
+
# SQL foreign keys
|
|
14
20
|
s.add_runtime_dependency('foreigner', '~> 0.9.1')
|
|
21
|
+
# Authentication
|
|
15
22
|
s.add_runtime_dependency('devise', '~> 1.2.rc')
|
|
23
|
+
# CRUD controllers
|
|
16
24
|
s.add_runtime_dependency('inherited_resources', '~> 1.1.2')
|
|
25
|
+
# Slug generation
|
|
17
26
|
s.add_runtime_dependency('stringex', '~> 1.2.0')
|
|
27
|
+
# Avatar attachments
|
|
18
28
|
s.add_runtime_dependency('paperclip', '~> 2.3.4')
|
|
29
|
+
# jQuery
|
|
19
30
|
s.add_runtime_dependency('jquery-rails', '~> 0.2.5')
|
|
31
|
+
# Authorization
|
|
20
32
|
s.add_runtime_dependency('cancan', '~> 1.6.2')
|
|
33
|
+
# Pagination
|
|
21
34
|
s.add_runtime_dependency('will_paginate', '~> 3.0.pre2')
|
|
35
|
+
# OAuth client
|
|
22
36
|
s.add_runtime_dependency('omniauth','~> 0.2.0.beta5')
|
|
37
|
+
# OAuth provider
|
|
23
38
|
s.add_runtime_dependency('oauth-plugin','~> 0.4.0.pre1')
|
|
39
|
+
# Theme support
|
|
24
40
|
s.add_runtime_dependency('rails_css_themes','~> 1.0.0')
|
|
41
|
+
# Messages
|
|
42
|
+
s.add_runtime_dependency('mailboxer','~> 0.0.14')
|
|
43
|
+
# Avatar manipulation
|
|
44
|
+
s.add_runtime_dependency('rmagick','~> 2.13.1')
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Development Gem dependencies
|
|
25
48
|
s.add_development_dependency('rails', '~> 3.0.5')
|
|
49
|
+
# Integration testing
|
|
26
50
|
s.add_development_dependency('capybara', '~> 0.3.9')
|
|
51
|
+
# Testing database
|
|
27
52
|
s.add_development_dependency('sqlite3-ruby')
|
|
53
|
+
# Debugging
|
|
28
54
|
if RUBY_VERSION < '1.9'
|
|
29
55
|
s.add_development_dependency('ruby-debug', '~> 0.10.3')
|
|
30
56
|
end
|
|
57
|
+
# Specs
|
|
31
58
|
s.add_development_dependency('rspec-rails', '~> 2.5.0')
|
|
59
|
+
# Fixtures
|
|
32
60
|
s.add_development_dependency('factory_girl', '~> 1.3.2')
|
|
61
|
+
# Population
|
|
33
62
|
s.add_development_dependency('forgery', '~> 0.3.6')
|
|
63
|
+
# Continous integration
|
|
34
64
|
s.add_development_dependency('ci_reporter', '~> 1.6.4')
|
|
65
|
+
# Scaffold generator
|
|
35
66
|
s.add_development_dependency('nifty-generators','~> 0.4.5')
|
|
36
|
-
|
|
37
|
-
#mailboxer
|
|
38
|
-
s.add_runtime_dependency('mailboxer','~> 0.0.11')
|
|
39
|
-
s.add_runtime_dependency('rmagick','~> 2.13.1')
|
|
40
|
-
|
|
41
67
|
end
|
|
@@ -2,6 +2,12 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
|
2
2
|
|
|
3
3
|
describe ContactsController do
|
|
4
4
|
|
|
5
|
+
render_views
|
|
6
|
+
|
|
7
|
+
before do
|
|
8
|
+
sign_in Factory(:friend).sender_subject
|
|
9
|
+
end
|
|
10
|
+
|
|
5
11
|
describe "GET 'index'" do
|
|
6
12
|
it "should be successful" do
|
|
7
13
|
get 'index'
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
2
|
|
|
3
3
|
describe ProfilesController do
|
|
4
|
+
include SocialStream::TestHelpers
|
|
4
5
|
render_views
|
|
5
6
|
|
|
6
7
|
context "for a user" do
|
|
7
8
|
before do
|
|
8
9
|
@user = Factory(:user)
|
|
10
|
+
sign_in @user
|
|
9
11
|
end
|
|
10
12
|
|
|
11
13
|
it "should render show" do
|
|
@@ -15,8 +17,6 @@ describe ProfilesController do
|
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
it "should render edit" do
|
|
18
|
-
pending
|
|
19
|
-
|
|
20
20
|
get :edit, :user_id => @user.to_param
|
|
21
21
|
|
|
22
22
|
assert_response :success
|
|
@@ -26,6 +26,7 @@ describe ProfilesController do
|
|
|
26
26
|
context "for a group" do
|
|
27
27
|
before do
|
|
28
28
|
@group = Factory(:group)
|
|
29
|
+
represent @group
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
it "should render show" do
|
|
@@ -35,8 +36,6 @@ describe ProfilesController do
|
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
it "should render edit" do
|
|
38
|
-
pending
|
|
39
|
-
|
|
40
39
|
get :edit, :group_id => @group.to_param
|
|
41
40
|
|
|
42
41
|
assert_response :success
|
|
@@ -160,7 +160,10 @@ Devise.setup do |config|
|
|
|
160
160
|
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
|
161
161
|
# up on your models and hooks.
|
|
162
162
|
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
|
163
|
-
|
|
163
|
+
config.omniauth :linked_in, "ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB", "WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY"
|
|
164
|
+
|
|
165
|
+
config.omniauth :facebook, "129571360447856","eef39dce5e20e76f77495c59623bdb38"
|
|
166
|
+
|
|
164
167
|
# ==> Warden configuration
|
|
165
168
|
# If you want to use other strategies, that are not supported by Devise, or
|
|
166
169
|
# change the failure app, you can configure them inside the config.warden block.
|
|
@@ -36,6 +36,7 @@ group:
|
|
|
36
36
|
- [ read, activity, star_ties ] # read activities from other members
|
|
37
37
|
- [ update, activity, weak_star_ties ] # update and destroy activities to members,
|
|
38
38
|
- [ destroy, activity, weak_star_ties ] # acquaintance and public
|
|
39
|
+
- [ read, tie, weak_star_ties ]
|
|
39
40
|
partner:
|
|
40
41
|
name: partner
|
|
41
42
|
parent: member # member is stronger than partner
|
|
@@ -89,6 +89,30 @@ describe Activity do
|
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
describe "wall" do
|
|
93
|
+
before do
|
|
94
|
+
@activity = Factory(:activity)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
describe "type home" do
|
|
98
|
+
it "should include activity" do
|
|
99
|
+
@activity.sender.wall(:home).should include(@activity)
|
|
100
|
+
@activity.receiver.wall(:home).should include(@activity)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
describe "type profile" do
|
|
105
|
+
it "should include activity" do
|
|
106
|
+
@activity.sender.wall(:profile, :for => @activity.sender).should include(@activity)
|
|
107
|
+
@activity.sender.wall(:profile, :for => @activity.receiver).should include(@activity)
|
|
108
|
+
@activity.sender.wall(:profile,
|
|
109
|
+
:for => @activity.receiver,
|
|
110
|
+
:relation => @activity.tie.relation).should include(@activity)
|
|
111
|
+
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
92
116
|
describe "belonging to friend" do
|
|
93
117
|
before do
|
|
94
118
|
create_activity_assigned_to(Factory(:friend))
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: social_stream
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 11
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 4
|
|
9
|
-
-
|
|
10
|
-
version: 0.4.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.4.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- GING - DIT - UPM
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2011-03-
|
|
19
|
+
date: 2011-03-31 00:00:00 +02:00
|
|
20
20
|
default_executable:
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
@@ -230,9 +230,41 @@ dependencies:
|
|
|
230
230
|
type: :runtime
|
|
231
231
|
version_requirements: *id013
|
|
232
232
|
- !ruby/object:Gem::Dependency
|
|
233
|
-
name:
|
|
233
|
+
name: mailboxer
|
|
234
234
|
prerelease: false
|
|
235
235
|
requirement: &id014 !ruby/object:Gem::Requirement
|
|
236
|
+
none: false
|
|
237
|
+
requirements:
|
|
238
|
+
- - ~>
|
|
239
|
+
- !ruby/object:Gem::Version
|
|
240
|
+
hash: 3
|
|
241
|
+
segments:
|
|
242
|
+
- 0
|
|
243
|
+
- 0
|
|
244
|
+
- 14
|
|
245
|
+
version: 0.0.14
|
|
246
|
+
type: :runtime
|
|
247
|
+
version_requirements: *id014
|
|
248
|
+
- !ruby/object:Gem::Dependency
|
|
249
|
+
name: rmagick
|
|
250
|
+
prerelease: false
|
|
251
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
|
252
|
+
none: false
|
|
253
|
+
requirements:
|
|
254
|
+
- - ~>
|
|
255
|
+
- !ruby/object:Gem::Version
|
|
256
|
+
hash: 57
|
|
257
|
+
segments:
|
|
258
|
+
- 2
|
|
259
|
+
- 13
|
|
260
|
+
- 1
|
|
261
|
+
version: 2.13.1
|
|
262
|
+
type: :runtime
|
|
263
|
+
version_requirements: *id015
|
|
264
|
+
- !ruby/object:Gem::Dependency
|
|
265
|
+
name: rails
|
|
266
|
+
prerelease: false
|
|
267
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
|
236
268
|
none: false
|
|
237
269
|
requirements:
|
|
238
270
|
- - ~>
|
|
@@ -244,11 +276,11 @@ dependencies:
|
|
|
244
276
|
- 5
|
|
245
277
|
version: 3.0.5
|
|
246
278
|
type: :development
|
|
247
|
-
version_requirements: *
|
|
279
|
+
version_requirements: *id016
|
|
248
280
|
- !ruby/object:Gem::Dependency
|
|
249
281
|
name: capybara
|
|
250
282
|
prerelease: false
|
|
251
|
-
requirement: &
|
|
283
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
|
252
284
|
none: false
|
|
253
285
|
requirements:
|
|
254
286
|
- - ~>
|
|
@@ -260,11 +292,11 @@ dependencies:
|
|
|
260
292
|
- 9
|
|
261
293
|
version: 0.3.9
|
|
262
294
|
type: :development
|
|
263
|
-
version_requirements: *
|
|
295
|
+
version_requirements: *id017
|
|
264
296
|
- !ruby/object:Gem::Dependency
|
|
265
297
|
name: sqlite3-ruby
|
|
266
298
|
prerelease: false
|
|
267
|
-
requirement: &
|
|
299
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
|
268
300
|
none: false
|
|
269
301
|
requirements:
|
|
270
302
|
- - ">="
|
|
@@ -274,11 +306,11 @@ dependencies:
|
|
|
274
306
|
- 0
|
|
275
307
|
version: "0"
|
|
276
308
|
type: :development
|
|
277
|
-
version_requirements: *
|
|
309
|
+
version_requirements: *id018
|
|
278
310
|
- !ruby/object:Gem::Dependency
|
|
279
311
|
name: ruby-debug
|
|
280
312
|
prerelease: false
|
|
281
|
-
requirement: &
|
|
313
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
|
282
314
|
none: false
|
|
283
315
|
requirements:
|
|
284
316
|
- - ~>
|
|
@@ -290,11 +322,11 @@ dependencies:
|
|
|
290
322
|
- 3
|
|
291
323
|
version: 0.10.3
|
|
292
324
|
type: :development
|
|
293
|
-
version_requirements: *
|
|
325
|
+
version_requirements: *id019
|
|
294
326
|
- !ruby/object:Gem::Dependency
|
|
295
327
|
name: rspec-rails
|
|
296
328
|
prerelease: false
|
|
297
|
-
requirement: &
|
|
329
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
|
298
330
|
none: false
|
|
299
331
|
requirements:
|
|
300
332
|
- - ~>
|
|
@@ -306,11 +338,11 @@ dependencies:
|
|
|
306
338
|
- 0
|
|
307
339
|
version: 2.5.0
|
|
308
340
|
type: :development
|
|
309
|
-
version_requirements: *
|
|
341
|
+
version_requirements: *id020
|
|
310
342
|
- !ruby/object:Gem::Dependency
|
|
311
343
|
name: factory_girl
|
|
312
344
|
prerelease: false
|
|
313
|
-
requirement: &
|
|
345
|
+
requirement: &id021 !ruby/object:Gem::Requirement
|
|
314
346
|
none: false
|
|
315
347
|
requirements:
|
|
316
348
|
- - ~>
|
|
@@ -322,11 +354,11 @@ dependencies:
|
|
|
322
354
|
- 2
|
|
323
355
|
version: 1.3.2
|
|
324
356
|
type: :development
|
|
325
|
-
version_requirements: *
|
|
357
|
+
version_requirements: *id021
|
|
326
358
|
- !ruby/object:Gem::Dependency
|
|
327
359
|
name: forgery
|
|
328
360
|
prerelease: false
|
|
329
|
-
requirement: &
|
|
361
|
+
requirement: &id022 !ruby/object:Gem::Requirement
|
|
330
362
|
none: false
|
|
331
363
|
requirements:
|
|
332
364
|
- - ~>
|
|
@@ -338,11 +370,11 @@ dependencies:
|
|
|
338
370
|
- 6
|
|
339
371
|
version: 0.3.6
|
|
340
372
|
type: :development
|
|
341
|
-
version_requirements: *
|
|
373
|
+
version_requirements: *id022
|
|
342
374
|
- !ruby/object:Gem::Dependency
|
|
343
375
|
name: ci_reporter
|
|
344
376
|
prerelease: false
|
|
345
|
-
requirement: &
|
|
377
|
+
requirement: &id023 !ruby/object:Gem::Requirement
|
|
346
378
|
none: false
|
|
347
379
|
requirements:
|
|
348
380
|
- - ~>
|
|
@@ -354,11 +386,11 @@ dependencies:
|
|
|
354
386
|
- 4
|
|
355
387
|
version: 1.6.4
|
|
356
388
|
type: :development
|
|
357
|
-
version_requirements: *
|
|
389
|
+
version_requirements: *id023
|
|
358
390
|
- !ruby/object:Gem::Dependency
|
|
359
391
|
name: nifty-generators
|
|
360
392
|
prerelease: false
|
|
361
|
-
requirement: &
|
|
393
|
+
requirement: &id024 !ruby/object:Gem::Requirement
|
|
362
394
|
none: false
|
|
363
395
|
requirements:
|
|
364
396
|
- - ~>
|
|
@@ -370,38 +402,6 @@ dependencies:
|
|
|
370
402
|
- 5
|
|
371
403
|
version: 0.4.5
|
|
372
404
|
type: :development
|
|
373
|
-
version_requirements: *id022
|
|
374
|
-
- !ruby/object:Gem::Dependency
|
|
375
|
-
name: mailboxer
|
|
376
|
-
prerelease: false
|
|
377
|
-
requirement: &id023 !ruby/object:Gem::Requirement
|
|
378
|
-
none: false
|
|
379
|
-
requirements:
|
|
380
|
-
- - ~>
|
|
381
|
-
- !ruby/object:Gem::Version
|
|
382
|
-
hash: 9
|
|
383
|
-
segments:
|
|
384
|
-
- 0
|
|
385
|
-
- 0
|
|
386
|
-
- 11
|
|
387
|
-
version: 0.0.11
|
|
388
|
-
type: :runtime
|
|
389
|
-
version_requirements: *id023
|
|
390
|
-
- !ruby/object:Gem::Dependency
|
|
391
|
-
name: rmagick
|
|
392
|
-
prerelease: false
|
|
393
|
-
requirement: &id024 !ruby/object:Gem::Requirement
|
|
394
|
-
none: false
|
|
395
|
-
requirements:
|
|
396
|
-
- - ~>
|
|
397
|
-
- !ruby/object:Gem::Version
|
|
398
|
-
hash: 57
|
|
399
|
-
segments:
|
|
400
|
-
- 2
|
|
401
|
-
- 13
|
|
402
|
-
- 1
|
|
403
|
-
version: 2.13.1
|
|
404
|
-
type: :runtime
|
|
405
405
|
version_requirements: *id024
|
|
406
406
|
description: Ruby on Rails engine supporting social networking features and activity streams.
|
|
407
407
|
email:
|
|
@@ -422,13 +422,14 @@ files:
|
|
|
422
422
|
- app/controllers/activities_controller.rb
|
|
423
423
|
- app/controllers/api_controller.rb
|
|
424
424
|
- app/controllers/authentications_controller.rb
|
|
425
|
+
- app/controllers/avatars_controller.rb
|
|
425
426
|
- app/controllers/comments_controller.rb
|
|
426
427
|
- app/controllers/contacts_controller.rb
|
|
428
|
+
- app/controllers/conversations_controller.rb
|
|
427
429
|
- app/controllers/frontpage_controller.rb
|
|
428
430
|
- app/controllers/groups_controller.rb
|
|
429
431
|
- app/controllers/home_controller.rb
|
|
430
432
|
- app/controllers/likes_controller.rb
|
|
431
|
-
- app/controllers/logos_controller.rb
|
|
432
433
|
- app/controllers/messages_controller.rb
|
|
433
434
|
- app/controllers/omniauth_callbacks_controller.rb
|
|
434
435
|
- app/controllers/posts_controller.rb
|
|
@@ -441,6 +442,7 @@ files:
|
|
|
441
442
|
- app/helpers/activities_helper.rb
|
|
442
443
|
- app/helpers/contacts_helper.rb
|
|
443
444
|
- app/helpers/groups_helper.rb
|
|
445
|
+
- app/helpers/location_helper.rb
|
|
444
446
|
- app/helpers/subjects_helper.rb
|
|
445
447
|
- app/helpers/ties_helper.rb
|
|
446
448
|
- app/helpers/users_helper.rb
|
|
@@ -451,10 +453,10 @@ files:
|
|
|
451
453
|
- app/models/activity_verb.rb
|
|
452
454
|
- app/models/actor.rb
|
|
453
455
|
- app/models/authentication.rb
|
|
456
|
+
- app/models/avatar.rb
|
|
454
457
|
- app/models/comment.rb
|
|
455
458
|
- app/models/group.rb
|
|
456
459
|
- app/models/like.rb
|
|
457
|
-
- app/models/logo.rb
|
|
458
460
|
- app/models/permission.rb
|
|
459
461
|
- app/models/post.rb
|
|
460
462
|
- app/models/profile.rb
|
|
@@ -464,21 +466,42 @@ files:
|
|
|
464
466
|
- app/models/tie.rb
|
|
465
467
|
- app/models/tie_activity.rb
|
|
466
468
|
- app/models/user.rb
|
|
467
|
-
- app/views/activities/_activities.html.erb
|
|
468
469
|
- app/views/activities/_activity.html.erb
|
|
469
470
|
- app/views/activities/_child.html.erb
|
|
470
471
|
- app/views/activities/_comments.html.erb
|
|
472
|
+
- app/views/activities/_index.html.erb
|
|
471
473
|
- app/views/activities/_jquery.html.erb
|
|
472
474
|
- app/views/activities/_new.html.erb
|
|
473
475
|
- app/views/activities/_options.html.erb
|
|
474
476
|
- app/views/activities/_root.html.erb
|
|
477
|
+
- app/views/activities/_walls.html.erb
|
|
478
|
+
- app/views/activities/index.js.erb
|
|
475
479
|
- app/views/activity_objects/_activity_object.html.erb
|
|
476
480
|
- app/views/api/activity_atom_feed.atom.builder
|
|
481
|
+
- app/views/avatars/_form.html.erb
|
|
482
|
+
- app/views/avatars/_precrop.html.erb
|
|
483
|
+
- app/views/avatars/edit.html.erb
|
|
484
|
+
- app/views/avatars/index.html.erb
|
|
485
|
+
- app/views/avatars/new.html.erb
|
|
486
|
+
- app/views/avatars/show.html.erb
|
|
477
487
|
- app/views/comments/_comment.html.erb
|
|
478
488
|
- app/views/comments/_new.html.erb
|
|
479
489
|
- app/views/comments/create.js.erb
|
|
480
490
|
- app/views/comments/destroy.js.erb
|
|
491
|
+
- app/views/contacts/_index.html.erb
|
|
481
492
|
- app/views/contacts/index.html.erb
|
|
493
|
+
- app/views/contacts/index.js.erb
|
|
494
|
+
- app/views/conversations/_conversation.html.erb
|
|
495
|
+
- app/views/conversations/_conversation_full.html.erb
|
|
496
|
+
- app/views/conversations/_conversations.html.erb
|
|
497
|
+
- app/views/conversations/_index.html.erb
|
|
498
|
+
- app/views/conversations/_menu_options.html.erb
|
|
499
|
+
- app/views/conversations/_show.html.erb
|
|
500
|
+
- app/views/conversations/edit.html.erb
|
|
501
|
+
- app/views/conversations/index.html.erb
|
|
502
|
+
- app/views/conversations/index.js.erb
|
|
503
|
+
- app/views/conversations/show.html.erb
|
|
504
|
+
- app/views/conversations/show.js.erb
|
|
482
505
|
- app/views/devise/passwords/edit.html.erb
|
|
483
506
|
- app/views/devise/passwords/new.html.erb
|
|
484
507
|
- app/views/devise/registrations/new.html.erb
|
|
@@ -493,17 +516,15 @@ files:
|
|
|
493
516
|
- app/views/groups/_location.html.erb
|
|
494
517
|
- app/views/groups/_logo.html.erb
|
|
495
518
|
- app/views/groups/_new.html.erb
|
|
496
|
-
- app/views/groups/_profile.html.erb
|
|
497
519
|
- app/views/groups/_sidebar_index.html.erb
|
|
498
520
|
- app/views/groups/_sidebar_show.html.erb
|
|
499
|
-
- app/views/groups/edit.html.erb
|
|
500
521
|
- app/views/groups/index.html.erb
|
|
501
522
|
- app/views/groups/index.js.erb
|
|
502
523
|
- app/views/groups/new.html.erb
|
|
503
524
|
- app/views/groups/show.html.erb
|
|
504
|
-
- app/views/groups/update.js.erb
|
|
505
525
|
- app/views/home/_groups.html.erb
|
|
506
526
|
- app/views/home/_location.html.erb
|
|
527
|
+
- app/views/home/_menu.html.erb
|
|
507
528
|
- app/views/home/_sidebar.html.erb
|
|
508
529
|
- app/views/home/index.html.erb
|
|
509
530
|
- app/views/layouts/_footer.html.erb
|
|
@@ -514,40 +535,19 @@ files:
|
|
|
514
535
|
- app/views/layouts/test.html
|
|
515
536
|
- app/views/likes/create.js.erb
|
|
516
537
|
- app/views/likes/destroy.js.erb
|
|
517
|
-
- app/views/
|
|
518
|
-
- app/views/logos/_precrop.html.erb
|
|
519
|
-
- app/views/logos/edit.html.erb
|
|
520
|
-
- app/views/logos/index.html.erb
|
|
521
|
-
- app/views/logos/new.html.erb
|
|
522
|
-
- app/views/logos/show.html.erb
|
|
523
|
-
- app/views/menu/_group.html.erb
|
|
524
|
-
- app/views/menu/_home_user.html.erb
|
|
525
|
-
- app/views/menu/_optionsGroups.html.erb
|
|
526
|
-
- app/views/menu/_optionsUser.html.erb
|
|
527
|
-
- app/views/menu/_services.html.erb
|
|
528
|
-
- app/views/menu/_tiesGroup.html.erb
|
|
529
|
-
- app/views/menu/_tiesUser.html.erb
|
|
530
|
-
- app/views/menu/_user.html.erb
|
|
531
|
-
- app/views/messages/_conversation.html.erb
|
|
532
|
-
- app/views/messages/_conversation_full.html.erb
|
|
533
|
-
- app/views/messages/_conversations.html.erb
|
|
538
|
+
- app/views/location/_location.html.erb
|
|
534
539
|
- app/views/messages/_form.html.erb
|
|
535
|
-
- app/views/messages/
|
|
536
|
-
- app/views/messages/_location.html.erb
|
|
537
|
-
- app/views/messages/_menu_options.html.erb
|
|
540
|
+
- app/views/messages/_message.html.erb
|
|
538
541
|
- app/views/messages/_new.html.erb
|
|
539
|
-
- app/views/messages/_show.html.erb
|
|
540
|
-
- app/views/messages/edit.html.erb
|
|
541
|
-
- app/views/messages/index.html.erb
|
|
542
|
-
- app/views/messages/index.js.erb
|
|
543
542
|
- app/views/messages/new.html.erb
|
|
544
543
|
- app/views/messages/new.js.erb
|
|
545
|
-
- app/views/messages/show.html.erb
|
|
546
|
-
- app/views/messages/show.js.erb
|
|
547
544
|
- app/views/posts/_post.html.erb
|
|
548
545
|
- app/views/posts/create.js.erb
|
|
549
546
|
- app/views/posts/destroy.js.erb
|
|
547
|
+
- app/views/profiles/_profile.html.erb
|
|
548
|
+
- app/views/profiles/edit.html.erb
|
|
550
549
|
- app/views/profiles/show.html.erb
|
|
550
|
+
- app/views/profiles/update.js.erb
|
|
551
551
|
- app/views/subjects/_contacts.html.erb
|
|
552
552
|
- app/views/subjects/_tabs.html.erb
|
|
553
553
|
- app/views/subjects/_toolbar_home.html.erb
|
|
@@ -555,6 +555,7 @@ files:
|
|
|
555
555
|
- app/views/subjects/_toolbar_home_menu_options.html.erb
|
|
556
556
|
- app/views/subjects/_toolbar_home_menu_options_subjects.html.erb
|
|
557
557
|
- app/views/subjects/_toolbar_logo.html.erb
|
|
558
|
+
- app/views/subjects/_toolbar_message_menu.html.erb
|
|
558
559
|
- app/views/subjects/_toolbar_profile.html.erb
|
|
559
560
|
- app/views/subjects/_toolbar_profile_menu.html.erb
|
|
560
561
|
- app/views/subjects/_toolbar_profile_menu_basic_options.html.erb
|
|
@@ -572,16 +573,12 @@ files:
|
|
|
572
573
|
- app/views/users/_groups.html.erb
|
|
573
574
|
- app/views/users/_index.html.erb
|
|
574
575
|
- app/views/users/_location.html.erb
|
|
575
|
-
- app/views/users/_profile.html.erb
|
|
576
576
|
- app/views/users/_sidebar_index.html.erb
|
|
577
|
-
- app/views/users/_sidebar_show.html.erb
|
|
578
|
-
- app/views/users/edit.html.erb
|
|
579
577
|
- app/views/users/index.html.erb
|
|
580
578
|
- app/views/users/index.js.erb
|
|
581
579
|
- app/views/users/info.html.erb
|
|
582
580
|
- app/views/users/show.html.erb
|
|
583
581
|
- app/views/users/show.xml.builder
|
|
584
|
-
- app/views/users/update.js.erb
|
|
585
582
|
- bin/social_stream
|
|
586
583
|
- bin/social_stream_heroku
|
|
587
584
|
- config/locales/en.yml
|
|
@@ -655,6 +652,11 @@ files:
|
|
|
655
652
|
- lib/generators/social_stream/templates/public/images/btn/keynote.png
|
|
656
653
|
- lib/generators/social_stream/templates/public/images/btn/linkedin.png
|
|
657
654
|
- lib/generators/social_stream/templates/public/images/btn/live.png
|
|
655
|
+
- lib/generators/social_stream/templates/public/images/btn/message_conversation.png
|
|
656
|
+
- lib/generators/social_stream/templates/public/images/btn/message_inbox.png
|
|
657
|
+
- lib/generators/social_stream/templates/public/images/btn/message_new.png
|
|
658
|
+
- lib/generators/social_stream/templates/public/images/btn/message_sentbox.png
|
|
659
|
+
- lib/generators/social_stream/templates/public/images/btn/message_trash.png
|
|
658
660
|
- lib/generators/social_stream/templates/public/images/btn/new.png
|
|
659
661
|
- lib/generators/social_stream/templates/public/images/btn/next_conference.png
|
|
660
662
|
- lib/generators/social_stream/templates/public/images/btn/next_space.png
|