social_stream 0.27.0 → 0.27.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+ language: ruby
1
2
  rvm:
2
3
  - 1.8.7
3
4
  - 1.9.2
@@ -8,3 +9,8 @@ env:
8
9
  before_script:
9
10
  - "mysql -e 'create database social_stream_test;'"
10
11
  - "psql -c 'create database social_stream_test;' -U postgres"
12
+
13
+ # blacklist
14
+ branches:
15
+ except:
16
+ - staging
@@ -70,59 +70,6 @@ class Activity < ActiveRecord::Base
70
70
  merge(Audience.where(:relation_id => Relation.ids_shared_with(subject)))
71
71
  }
72
72
 
73
- scope :wall, lambda { |args|
74
- q =
75
- select("DISTINCT activities.*").
76
- joins(:audiences).
77
- joins(:relations).
78
- roots
79
-
80
- if args[:object_type].present?
81
- q = q.joins(:activity_objects).
82
- where('activity_objects.object_type' => args[:object_type])
83
- end
84
-
85
- audiences = Audience.arel_table
86
- relations = Relation.arel_table
87
-
88
- owner_conditions =
89
- arel_table[:author_id].eq(Actor.normalize_id(args[:owner])).
90
- or(arel_table[:user_author_id].eq(Actor.normalize_id(args[:owner]))).
91
- or(arel_table[:owner_id].eq(Actor.normalize_id(args[:owner])))
92
-
93
- audience_conditions =
94
- audiences[:relation_id].in(args[:relation_ids]).
95
- or(relations[:type].eq('Relation::Public'))
96
-
97
- conds =
98
- case args[:type]
99
- when :home
100
- followed_conditions =
101
- arel_table[:author_id].in(args[:followed]).
102
- or(arel_table[:owner_id].in(args[:followed]))
103
-
104
- owner_conditions.
105
- or(followed_conditions.and(audience_conditions))
106
- when :profile
107
- if args[:for].present?
108
- visitor_conditions =
109
- arel_table[:author_id].eq(Actor.normalize_id(args[:for])).
110
- or(arel_table[:owner_id].eq(Actor.normalize_id(args[:for])))
111
-
112
- owner_conditions.
113
- and(visitor_conditions.or(audience_conditions))
114
- else
115
- owner_conditions.
116
- and(audience_conditions)
117
- end
118
- else
119
- raise "Unknown wall type: #{ args[:type] }"
120
- end
121
-
122
- q.where(conds).
123
- order("created_at desc")
124
- }
125
-
126
73
  after_create :increment_like_count
127
74
  after_destroy :decrement_like_count, :delete_notifications
128
75
 
@@ -55,6 +55,8 @@ class Relation < ActiveRecord::Base
55
55
  has_many :audiences, :dependent => :destroy
56
56
  has_many :activities, :through => :audiences
57
57
 
58
+ has_many :activity_object_audiences, :dependent => :destroy
59
+
58
60
  scope :actor, lambda { |a|
59
61
  where(:actor_id => Actor.normalize_id(a))
60
62
  }
@@ -1,6 +1,6 @@
1
1
  <% if @profile.valid? %>
2
2
  <% flash[:notice] = t('profile.update.success') %>
3
- document.location.href="<%= resource_path(@profile) %>";
3
+ document.location.href="<%= polymorphic_path([ current_subject, :profile ]) %>";
4
4
  <% else %>
5
5
  if ($("#profile_notice").length == 0){
6
6
  $("#profile_form").prepend('<div id="profile_notice" class="notice"></div>');
@@ -38,7 +38,7 @@ en:
38
38
  public:
39
39
  summary: "Public"
40
40
  full: "Shared with all the Internet"
41
- show: "Mostrar"
41
+ show: "Show"
42
42
  visible:
43
43
  summary: "Restricted"
44
44
  full: "Shared with %{audience}"
@@ -38,7 +38,7 @@ es:
38
38
  public:
39
39
  summary: "Público"
40
40
  full: "Accesible por toda Internet"
41
- show: "Show"
41
+ show: "Mostrar"
42
42
  visible:
43
43
  summary: "Restringido"
44
44
  full: "Compartido con %{audience}"
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.21.0".freeze
3
+ VERSION = "0.21.1".freeze
4
4
  end
5
5
  end
@@ -38,6 +38,13 @@ describe ProfilesController do
38
38
  response.should redirect_to([@user, :profile])
39
39
  end
40
40
 
41
+ it "should update via AJAX" do
42
+ put :update, :user_id => @user.to_param, :profile => { :organization => "Social Stream" }, :format => :js
43
+
44
+ response.should be_success
45
+ end
46
+
47
+
41
48
  it "should not update other's" do
42
49
  begin
43
50
  put :update, :user_id => Factory(:user).to_param, :profile => { :organization => "Social Stream" }
@@ -38,6 +38,8 @@ class DocumentsController < ApplicationController
38
38
  format.any {
39
39
  path = resource.file.path(params[:style] || params[:format])
40
40
 
41
+ head(:not_found) and return unless File.exist?(path)
42
+
41
43
  send_file path,
42
44
  :filename => resource.file_file_name,
43
45
  :disposition => "inline",
@@ -50,7 +52,7 @@ class DocumentsController < ApplicationController
50
52
  def download
51
53
  path = @document.file.path(params[:style])
52
54
 
53
- head(:bad_request) and return unless File.exist?(path)
55
+ head(:not_found) and return unless File.exist?(path)
54
56
 
55
57
  send_file_options = {
56
58
  :filename => @document.file_file_name,
@@ -1,2 +1,2 @@
1
1
  <%= render :partial => 'documents/document_with_details',
2
- :locals => {:document => video} %>
2
+ :locals => {:document => document} %>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.15.0".freeze
3
+ VERSION = "0.15.1".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.21.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.1')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  s.add_runtime_dependency('paperclip','= 2.4.5')
18
18
  s.add_runtime_dependency('delayed_paperclip','2.4.5.1')
@@ -27,10 +27,10 @@
27
27
  </div>
28
28
 
29
29
 
30
- <% if profile_subject.rooms.any? %>
30
+ <% if f.object.owner.rooms.any? %>
31
31
  <div class="form_row">
32
32
  <%= f.label :room %>
33
- <%= f.select :room_id, profile_subject.rooms.map{ |r| [r.name, r.id] }, { :include_blank => true } %>
33
+ <%= f.select :room_id, f.object.owner.rooms.map{ |r| [r.name, r.id] }, { :include_blank => true } %>
34
34
  </div>
35
35
  <% end %>
36
36
 
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Events
3
- VERSION = "0.13.0".freeze
3
+ VERSION = "0.13.1".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.21.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.1')
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.27.0".freeze
2
+ VERSION = "0.27.1".freeze
3
3
  end
@@ -11,9 +11,9 @@ 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.21.0')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.15.0')
16
- s.add_runtime_dependency('social_stream-events', '~> 0.13.0')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.1')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.15.1')
16
+ s.add_runtime_dependency('social_stream-events', '~> 0.13.1')
17
17
  s.add_runtime_dependency('social_stream-linkser', '~> 0.12.0')
18
18
  s.add_runtime_dependency('social_stream-presence', '~> 0.14.0')
19
19
 
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.27.0
4
+ version: 0.27.1
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-27 00:00:00.000000000 Z
13
+ date: 2012-06-06 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.21.0
22
+ version: 0.21.1
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.21.0
30
+ version: 0.21.1
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.15.0
38
+ version: 0.15.1
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.15.0
46
+ version: 0.15.1
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.13.0
54
+ version: 0.13.1
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.13.0
62
+ version: 0.13.1
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: social_stream-linkser
65
65
  requirement: !ruby/object:Gem::Requirement