social_stream-base 0.10.7 → 0.10.8

Sign up to get free protection for your applications and to get access to all the features.
data/app/models/actor.rb CHANGED
@@ -1,14 +1,18 @@
1
- # An {Actor} is a social entity. This includes individuals, but also groups, departments,
1
+ # An {Actor} represents a social entity. This includes individuals, but also groups, departments,
2
2
  # organizations even nations or states.
3
3
  #
4
- # Actors are the nodes of a social network. Two actors are linked by a {Tie}. The
5
- # type of a {tie} is a {Relation}. Each actor can define and customize their relations.
4
+ # Actors are the nodes of a social network. Two actors are linked by {Tie Ties}. The
5
+ # type of a {Tie} is a {Relation}. Each actor can define and customize their relations own
6
+ # {Relation Relations}.
7
+ #
8
+ # Every {Actor} has an Avatar, a {Profile} with personal o group information, contact data, etc.
6
9
  #
7
10
  # = Actor subtypes
8
11
  # An actor subtype is called a {SocialStream::Models::Subject Subject}.
9
- # {SocialStream} provides 2 actor subtypes, {User} and {Group}, but the
12
+ # {SocialStream} provides two actor subtypes, {User} and {Group}, but the
10
13
  # application developer can define as many actor subtypes as required.
11
- # Actors subtypes are added to +config/initializers/social_stream.rb+
14
+ # Actor subtypes are added to +config/initializers/social_stream.rb+
15
+ #
12
16
  #
13
17
  class Actor < ActiveRecord::Base
14
18
  @subtypes_name = :subject
@@ -1,8 +1,15 @@
1
- # The link between two {Actor actors}
1
+ # A {Contact} is an ordered pair of {Actor Actors},
2
+ # and therefore two {SocialStream::Models::Subject Subjects}.
2
3
  #
3
- # Each {Contact} has many {Tie ties}, which determine the kind of the link through {Relation relations}
4
+ # {Contact Contacts} are created at convenience (in the case of {Actor#suggestions suggestions},
5
+ # for instance), and they do not mean that there is a real link between those two
6
+ # {SocialStream::Models::Subject Subjects}. Link existance is stored as {Tie Ties}.
4
7
  #
5
8
  # = {Contact Contacts} and {Activity activities}
9
+ #
10
+ # WARNING: This will be change soon to direct references to author, owner and user_author,
11
+ # in the same way as {ActivityObject}
12
+ #
6
13
  # Each {Activity} is attached to a {Contact}. When _Alice_ post in _Bob_'s wall,
7
14
  # the {Activity} is attached to the {Contact} from _Alice_ to _Bob_
8
15
  #
@@ -1,26 +1,43 @@
1
- # A relation defines a type of {Tie tie}. Relations are affective (friendship, liking,
2
- # respect), formal or biological (authority, kinship), transfer of material
3
- # resources (transactions, lending and borrowing), messages or conversations,
4
- # physical connection and affiliation to same organizations.
1
+ # A relation defines a type of {Tie} between two {Actor Actors}. From social literature,
2
+ # {Relation Relations} can be affective (friendship, liking, respect), formal or biological
3
+ # (authority, kinship), transfer of material resources (transactions, lending and borrowing),
4
+ # messages or conversations, physical connection and affiliation to same organizations.
5
5
  #
6
- # = Strength hierarchies
6
+ # = Relation types defined in {SocialStream Social Stream}
7
7
  #
8
- # Relations are arranged in strength hierarchies, denoting that some ties between
9
- # two actors are stronger than others. For example, a "friend" relation is stronger than
10
- # an "acquaintance" relation.
8
+ # All the above cases could be supported in {SocialStream Social Stream}.
9
+ # Nevertheless, the following {Relation Relations} are defined. All of them inherit from the
10
+ # {Relation} class:
11
11
  #
12
- # When a strong tie is established, ties with weaker relations are establised as well
12
+ # {Relation::Custom}:: user-defined {Relation}. Every {SocialStream::Models::Subject Subject}
13
+ # is able to define their own {Relation::Custom Custom relation},
14
+ # giving them a custom name
15
+ # (for instance: friend, colleague, partner, buddy) and {Permission Permissions}.
16
+ # {Relation::Public}:: default {Relation} for ocassional {Tie Ties}.
17
+ # {Relation::Reject}:: the {SocialStream::Models::Subject Subject} does not want to add the other
18
+ # as a contact. A new {Tie} is created using this {Relation}
19
+ #
20
+ # You can define new {Relation Relations} in your application. Just create a new class and
21
+ # inherit from {Relation}. This class already supports
22
+ # {http://api.rubyonrails.org/classes/ActiveRecord/Base.html#label-Single+table+inheritance Single Table Inheritance (STI)}.
23
+ #
24
+ # = Relations and link building
25
+ #
26
+ # When a {SocialStream::Models::Subject Subject} creates a new link to other
27
+ # {SocialStream::Models::Subject Subject}, she must specify one or serveral {Relation Relations}
28
+ # for that link. (friend, colleague, {Relation::Public} or {Relation::Reject}.
29
+ # A new {Tie} will be created for each {Relation}
13
30
  #
14
31
  # = Permissions
15
32
  #
16
- # {SocialStream::Models::Subject Subjects} assign {Permission permissions} to relations.
33
+ # {SocialStream::Models::Subject Subjects} assign {Permission permissions} to {Relation Relations}.
17
34
  # This way, when establishing {Tie ties}, they are granting permissions to their contacts.
18
35
  #
19
36
  # See the documentation of {Permission} for more details on permission definition.
20
37
  #
21
- # = {Activity Activities} and {Relation relations}
38
+ # = {Activity Activities} and {Relation Relations}
39
+ #
22
40
  # Each {Activity} can be attached to one or more {Relation relations}.
23
- # The {Relation} sets up the mode in which the {Activity} is shared.
24
41
  # It sets the {Audience} that has access to it, and the {Permission Permissions} that rule that access.
25
42
  #
26
43
  class Relation < ActiveRecord::Base
data/app/models/tie.rb CHANGED
@@ -1,25 +1,17 @@
1
- # A {Tie} is a link between two {Actor Actors} ({Contact}) with a {Relation}.
2
- #
3
- # The first {Actor} is the sender of the {Tie}. The second {Actor}
4
- # is the receiver of the {Tie}.
5
- #
6
- # = Tie strengh
7
- #
8
- # Because each {Tie} belongs to a {Relation} and {Relation Relations} have strength
9
- # hierarchies, {Tie Ties} also have them. A {Tie} is stronger than other if its
10
- # {Relation} is stronger than the other's. For example, if _Alice_ has a _friend_ {Tie}
11
- # with _Bob_, and an _acquaintance_ {Tie} with _Charlie_, given that _friend_ {Relation}
12
- # is stronger than _acquaintance_, the {Tie} with _Bob_ is stronger than the {Tie} with
13
- # _Charlie_.
1
+ # A {Tie} is a link between two {Actor Actors},
2
+ # and therefore, two {SocialStream::Models::Subject Subjects}.
14
3
  #
4
+ # It is made up with a {Contact} and a {Relation}. The {Contact} defines the sender
5
+ # or {Actor} that declares the link, and the receiver or {Actor} that is pointed by
6
+ # the declaration. The {Relation} defines the type of link (friend, colleague,
7
+ # {Relation::Reject}, etc)
8
+
15
9
  # = Authorization
16
10
  # When an {Actor} establishes a {Tie} with other, she is granting a set of
17
11
  # {Permission Permissions} to them (posting to her wall, reading her posts, etc..)
18
12
  # The set of {Permission Permissions} granted are associated with the {Relation} of
19
13
  # the {Tie}.
20
14
  #
21
- # Usually, stronger ties (and relations) have more permissions than weaker ones.
22
- #
23
15
  # = Scopes
24
16
  # There are several scopes defined:
25
17
  #
@@ -28,6 +20,7 @@
28
20
  # sent_or_received_by(actor):: the union of the former
29
21
  # related_by(relation):: ties with this relation. Accepts relation, relation_name,
30
22
  # integer, array
23
+ #
31
24
  class Tie < ActiveRecord::Base
32
25
 
33
26
  belongs_to :contact, :counter_cache => true
@@ -9,6 +9,14 @@
9
9
  newel: false,
10
10
  height: 6
11
11
  });
12
+ $("#group_actor_tag_list").fcbkcomplete({
13
+ json_url: "<%= tags_path(:format => :json) %>",
14
+ cache: false,
15
+ filter_case: true,
16
+ filter_hide: true,
17
+ newel: false,
18
+ height: 6
19
+ });
12
20
  <% end %>
13
21
 
14
22
  <%= location(
@@ -52,6 +60,16 @@
52
60
  <%= f.select :_participants, [], :class => "form_tag" %>
53
61
  </div>
54
62
  </div>
63
+ <div class="form_row">
64
+ <div class="form_label" id="form_tags">
65
+ <%= f.label t('group.tags')%>
66
+ </div>
67
+ <div class="form_field">
68
+ <%= f.fields_for :actor do |actor_form| %>
69
+ <%= actor_form.select :tag_list, [], :class => "form_tag" %>
70
+ <%end%>
71
+ </div>
72
+ </div>
55
73
  <div class="form_row form_label">
56
74
  <%= f.label :description %>
57
75
  </div>
@@ -6,6 +6,7 @@
6
6
  <title><%= yield(:title).empty? ? t('site.name') : yield(:title)%></title>
7
7
  <meta name="keywords" content="<%= t('profile.tags.default') %><%= yield(:keywords) %>" >
8
8
  <meta name="description" content= "<%= yield(:description).empty? ? t('frontpage.main_title') : yield(:description) %>" >
9
+ <meta name="generator" content="SocialStream" />
9
10
 
10
11
  <%= stylesheet_link_tag "application" %>
11
12
  <%= javascript_include_tag "application" %>
@@ -166,6 +166,16 @@ end %>
166
166
  <%= f.text_field :address, :class => "form_tag" %>
167
167
  </div>
168
168
  </div>
169
+ <%= f.fields_for :actor do |actor_form| %>
170
+ <div class="form_row">
171
+ <div class="form_label">
172
+ <%= actor_form.label t('profile.email')%>
173
+ </div>
174
+ <div class="form_field">
175
+ <%= actor_form.text_field :email, :class => "email form_tag" %>
176
+ </div>
177
+ </div>
178
+ <%end%>
169
179
  <div class="form_row">
170
180
  <div class="form_label">
171
181
  <%= f.label t('profile.website')%>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.10.7".freeze
3
+ VERSION = "0.10.8".freeze
4
4
  end
5
5
  end
@@ -2,15 +2,11 @@ require 'active_support/concern'
2
2
 
3
3
  module SocialStream
4
4
  module Models
5
- # {Subject Subjects} are subtypes of {Actor}. {SocialStream} provides two
5
+ # {Subject Subjects} are subtypes of {Actor Actors}. {SocialStream Social Stream} provides two
6
6
  # {Subject Subjects}, {User} and {Group}
7
7
  #
8
- # Each {Subject} is defined in +config/initializers/social_stream.rb+
9
- #
10
- # This module provides additional features for models that are subjects,
11
- # extending them. Including the module in each {Subject} model is not required!
12
- # After declared in +config/initializers/social_stream.rb+, {SocialStream} is
13
- # responsible for adding subject features to each model.
8
+ # Each {Subject} must defined in +config/initializers/social_stream.rb+ in order to be
9
+ # included in the application.
14
10
  #
15
11
  # = Scopes
16
12
  # There are several scopes available for subjects
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-base
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 39
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 7
10
- version: 0.10.7
9
+ - 8
10
+ version: 0.10.8
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-12-09 00:00:00 +01:00
19
+ date: 2011-12-13 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency