social_stream 0.26.2 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/base/app/assets/images/btn/public.png +0 -0
  2. data/base/app/assets/images/btn/restricted.png +0 -0
  3. data/base/app/assets/javascripts/social_stream.timeline.js +2 -0
  4. data/base/app/assets/javascripts/social_stream.wall.js.erb +10 -1
  5. data/base/app/assets/stylesheets/activities.css.scss.erb +13 -2
  6. data/base/app/assets/stylesheets/base.css.scss +1 -1
  7. data/base/app/controllers/audience_controller.rb +16 -0
  8. data/base/app/models/activity.rb +111 -39
  9. data/base/app/models/activity_object.rb +1 -9
  10. data/base/app/models/actor.rb +42 -53
  11. data/base/app/models/contact.rb +0 -21
  12. data/base/app/models/tie.rb +1 -1
  13. data/base/app/views/activities/_new.html.erb +2 -2
  14. data/base/app/views/activities/_options.html.erb +7 -1
  15. data/base/app/views/audience/_list.html.erb +8 -0
  16. data/base/app/views/audience/index.js.erb +1 -0
  17. data/base/config/locales/en.yml +1 -0
  18. data/base/config/locales/es.yml +1 -0
  19. data/base/config/routes.rb +2 -0
  20. data/base/db/migrate/20120526171311_remove_activity_channels.rb +35 -0
  21. data/base/lib/social_stream-base.rb +0 -1
  22. data/base/lib/social_stream/ability/base.rb +3 -1
  23. data/base/lib/social_stream/base/engine.rb +0 -1
  24. data/base/lib/social_stream/base/version.rb +1 -1
  25. data/base/lib/tasks/db/populate.rake +6 -4
  26. data/base/spec/controllers/audience_controller_spec.rb +40 -0
  27. data/base/spec/controllers/comments_controller_spec.rb +3 -3
  28. data/base/spec/factories/activity.rb +12 -6
  29. data/base/spec/models/tie_spec.rb +7 -4
  30. data/documents/lib/social_stream/documents/version.rb +1 -1
  31. data/documents/social_stream-documents.gemspec +1 -1
  32. data/events/app/assets/stylesheets/events.css.scss +3 -8
  33. data/events/app/views/events/_event.html.erb +5 -2
  34. data/events/config/locales/en.yml +1 -0
  35. data/events/config/locales/es.yml +1 -0
  36. data/events/lib/social_stream/events/version.rb +1 -1
  37. data/events/social_stream-events.gemspec +1 -1
  38. data/lib/social_stream/version.rb +1 -1
  39. data/linkser/lib/social_stream/linkser/version.rb +1 -1
  40. data/linkser/social_stream-linkser.gemspec +1 -1
  41. data/presence/lib/social_stream/presence/version.rb +1 -1
  42. data/presence/social_stream-presence.gemspec +1 -1
  43. data/social_stream.gemspec +5 -5
  44. metadata +19 -15
  45. data/base/app/assets/images/btn/btn_security.png +0 -0
  46. data/base/app/models/channel.rb +0 -64
  47. data/base/lib/social_stream/models/channeled.rb +0 -56
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.20.1')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.0')
16
16
  s.add_runtime_dependency('rails-scheduler', '~> 0.0.8')
17
17
 
18
18
  # Development Gem dependencies
@@ -1,3 +1,3 @@
1
1
  module SocialStream
2
- VERSION = "0.26.2".freeze
2
+ VERSION = "0.27.0".freeze
3
3
  end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Linkser
3
- VERSION = "0.11.1".freeze
3
+ VERSION = "0.12.0".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.20.1')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.0')
16
16
  s.add_runtime_dependency('linkser', '~> 0.0.12')
17
17
  # Development Gem dependencies
18
18
  s.add_development_dependency('sqlite3-ruby')
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Presence
3
- VERSION = "0.13.3"
3
+ VERSION = "0.14.0"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency('social_stream-base', '~> 0.20.1')
22
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.0')
23
23
 
24
24
  s.add_runtime_dependency "xmpp4r"
25
25
 
@@ -11,11 +11,11 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files`.split("\n")
12
12
 
13
13
  # Gem dependencies
14
- s.add_runtime_dependency('social_stream-base', '~> 0.20.2')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.14.1')
16
- s.add_runtime_dependency('social_stream-events', '~> 0.12.1')
17
- s.add_runtime_dependency('social_stream-linkser', '~> 0.11.1')
18
- s.add_runtime_dependency('social_stream-presence', '~> 0.13.3')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.0')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.15.0')
16
+ s.add_runtime_dependency('social_stream-events', '~> 0.13.0')
17
+ s.add_runtime_dependency('social_stream-linkser', '~> 0.12.0')
18
+ s.add_runtime_dependency('social_stream-presence', '~> 0.14.0')
19
19
 
20
20
  # Development Gem dependencies
21
21
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.2
4
+ version: 0.27.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-17 00:00:00.000000000 Z
13
+ date: 2012-05-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.20.2
22
+ version: 0.21.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 0.20.2
30
+ version: 0.21.0
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: social_stream-documents
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 0.14.1
38
+ version: 0.15.0
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 0.14.1
46
+ version: 0.15.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: social_stream-events
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.12.1
54
+ version: 0.13.0
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: 0.12.1
62
+ version: 0.13.0
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: social_stream-linkser
65
65
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: 0.11.1
70
+ version: 0.12.0
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 0.11.1
78
+ version: 0.12.0
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: social_stream-presence
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ dependencies:
83
83
  requirements:
84
84
  - - ~>
85
85
  - !ruby/object:Gem::Version
86
- version: 0.13.3
86
+ version: 0.14.0
87
87
  type: :runtime
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,7 +91,7 @@ dependencies:
91
91
  requirements:
92
92
  - - ~>
93
93
  - !ruby/object:Gem::Version
94
- version: 0.13.3
94
+ version: 0.14.0
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: capybara
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +280,6 @@ files:
280
280
  - base/app/assets/images/btn/btn_profile.png
281
281
  - base/app/assets/images/btn/btn_rank.png
282
282
  - base/app/assets/images/btn/btn_read.png
283
- - base/app/assets/images/btn/btn_security.png
284
283
  - base/app/assets/images/btn/btn_send.png
285
284
  - base/app/assets/images/btn/btn_spam.png
286
285
  - base/app/assets/images/btn/btn_star.png
@@ -320,6 +319,8 @@ files:
320
319
  - base/app/assets/images/btn/point_blue.png
321
320
  - base/app/assets/images/btn/point_gray.png
322
321
  - base/app/assets/images/btn/post.png
322
+ - base/app/assets/images/btn/public.png
323
+ - base/app/assets/images/btn/restricted.png
323
324
  - base/app/assets/images/btn/search.png
324
325
  - base/app/assets/images/btn/search_icon.png
325
326
  - base/app/assets/images/btn/shadow.png
@@ -454,6 +455,7 @@ files:
454
455
  - base/app/controllers/activities_controller.rb
455
456
  - base/app/controllers/activity_actions_controller.rb
456
457
  - base/app/controllers/api_controller.rb
458
+ - base/app/controllers/audience_controller.rb
457
459
  - base/app/controllers/authentications_controller.rb
458
460
  - base/app/controllers/cheesecake_controller.rb
459
461
  - base/app/controllers/comments_controller.rb
@@ -505,7 +507,6 @@ files:
505
507
  - base/app/models/actor.rb
506
508
  - base/app/models/audience.rb
507
509
  - base/app/models/authentication.rb
508
- - base/app/models/channel.rb
509
510
  - base/app/models/comment.rb
510
511
  - base/app/models/contact.rb
511
512
  - base/app/models/group.rb
@@ -542,6 +543,8 @@ files:
542
543
  - base/app/views/actors/_actor.html.erb
543
544
  - base/app/views/actors/_actor_cheesecake.html.erb
544
545
  - base/app/views/api/activity_atom_feed.atom.builder
546
+ - base/app/views/audience/_list.html.erb
547
+ - base/app/views/audience/index.js.erb
545
548
  - base/app/views/avatars/index.html.erb
546
549
  - base/app/views/avatars/update.js.erb
547
550
  - base/app/views/cheesecake/_cheesecake.html.erb
@@ -739,6 +742,7 @@ files:
739
742
  - base/db/migrate/20120403175913_create_activity_object_audiences.rb
740
743
  - base/db/migrate/20120411132550_add_visit_count_to_activity_object.rb
741
744
  - base/db/migrate/20120411151413_relation_public_permissions.rb
745
+ - base/db/migrate/20120526171311_remove_activity_channels.rb
742
746
  - base/lib/acts_as_taggable_on/acts_as_taggable_on/dirty.rb
743
747
  - base/lib/acts_as_taggable_on/social_stream.rb
744
748
  - base/lib/generators/social_stream/base/install_generator.rb
@@ -793,7 +797,6 @@ files:
793
797
  - base/lib/social_stream/d3.rb
794
798
  - base/lib/social_stream/migrations/base.rb
795
799
  - base/lib/social_stream/migrations/components.rb
796
- - base/lib/social_stream/models/channeled.rb
797
800
  - base/lib/social_stream/models/object.rb
798
801
  - base/lib/social_stream/models/subject.rb
799
802
  - base/lib/social_stream/models/subtype.rb
@@ -816,6 +819,7 @@ files:
816
819
  - base/lib/tasks/workers.rake
817
820
  - base/lib/thinking-sphinx/social_stream.rb
818
821
  - base/social_stream-base.gemspec
822
+ - base/spec/controllers/audience_controller_spec.rb
819
823
  - base/spec/controllers/comments_controller_spec.rb
820
824
  - base/spec/controllers/contacts_controller_spec.rb
821
825
  - base/spec/controllers/followers_controller_spec.rb
@@ -1,64 +0,0 @@
1
- # A {Channel} is the union of the three {Actors} that are involved in an {Activity}:
2
- #
3
- # * The author that creates a post, comment, etc. This can be a {User}, {Group}
4
- # or any kind of {SocialStream::Models::Subject subject}
5
- # * The user_author representing the author. When users change session and
6
- # act in behalf of a {Group}, Social Stream still records which user is responsible
7
- # for an {Activity}
8
- # * The owner in whose wall the Activity is performed.
9
- #
10
- class Channel < ActiveRecord::Base
11
- # Author can be any type of Actor: User, Group, etc.
12
- belongs_to :author,
13
- :class_name => "Actor"
14
- # Owner is the wall's subject this object is posted to
15
- belongs_to :owner,
16
- :class_name => "Actor"
17
-
18
- # UserAuthor is the real user behind the Author
19
- belongs_to :user_author,
20
- :class_name => "Actor"
21
-
22
- has_many :activities, :dependent => :destroy
23
-
24
- validates_uniqueness_of :author_id, :scope => [ :owner_id, :user_author_id ]
25
- validates_uniqueness_of :owner_id, :scope => [ :author_id, :user_author_id ]
26
- validates_uniqueness_of :user_author_id, :scope => [ :author_id, :owner_id ]
27
-
28
- scope :authored_by, lambda { |subject|
29
- id = Actor.normalize_id subject
30
-
31
- where(arel_table[:author_id].eq(id).or(arel_table[:user_author_id].eq(id)))
32
- }
33
-
34
- scope :subject_authored_by, lambda { |subject|
35
- id = Actor.normalize_id subject
36
-
37
- where(:author_id => id)
38
- }
39
-
40
- # The {SocialStream::Models::Subject subject} author
41
- def author_subject
42
- author.subject
43
- end
44
-
45
- # The {SocialStream::Models::Subject subject} owner
46
- def owner_subject
47
- owner.subject
48
- end
49
-
50
- # The {SocialStream::Models::Subject subject} user actor
51
- def user_author_subject
52
- user_author.subject
53
- end
54
-
55
- # Does this {Channel} have the same sender and receiver?
56
- def reflexive?
57
- author_id == owner_id
58
- end
59
-
60
- # Is the author represented in this {Channel}?
61
- def represented_author?
62
- author_id != user_author_id
63
- end
64
- end
@@ -1,56 +0,0 @@
1
- module SocialStream
2
- module Models
3
- # Models that have author, user_author and owner, properties saved in {Channel}.
4
- # Currently {Activity} and {ActivityObject}
5
- module Channeled
6
- # Add the method {#channeled} to ActiveRecord
7
- module ActiveRecord
8
- extend ActiveSupport::Concern
9
-
10
- module ClassMethods
11
- # This class is channeled. See {Channel}
12
- def channeled
13
- include SocialStream::Models::Channeled
14
- end
15
- end
16
- end
17
-
18
- extend ActiveSupport::Concern
19
-
20
- included do
21
- # Channeled models are subtypes of {Channel}
22
- # Author, owner and user_author are defined in its channel
23
- subtype_of :channel,
24
- :belongs => { :dependent => nil }
25
-
26
- # before_validation :set_owner_id, :on => :create
27
-
28
- before_validation :check_existing_channel
29
- end
30
-
31
- protected
32
-
33
- # Use existing channel, do not create a new one
34
- def check_existing_channel
35
- return unless channel!.new_record?
36
-
37
- existing_channel =
38
- Channel.
39
- where(:author_id => author_id,
40
- :owner_id => owner_id,
41
- :user_author_id => user_author_id).
42
- first
43
-
44
- return if existing_channel.blank?
45
-
46
- self.channel = existing_channel
47
- end
48
-
49
- private
50
-
51
- def set_owner_id
52
- self.owner_id ||= author_id
53
- end
54
- end
55
- end
56
- end