social_stream-base 0.9.33 → 0.9.34

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.
@@ -34,7 +34,7 @@
34
34
  .activity { text-align:left; display: block; vertical-align: top; padding: 10px 0px 5px 0px;
35
35
  display: inline-block; color: $sentence-color; font-size: 13px; color: $main-color;border-bottom:1px solid #E9E9E9;}
36
36
  .actor_logo { width: 38px; padding: 8px 0px 5px 5px; display: inline-block; vertical-align: top;}
37
- .activity_content { padding: 0px; display: inline-block; color: $sentence-color; width: 89%;}
37
+ .activity_content { padding: 0px; display: inline-block; color: $sentence-color; width: 89%; word-wrap: break-word; }
38
38
  .actor_name {font-size: 13px;}
39
39
  .actor_name a{font-weight: bold;}
40
40
  .post a { color: $main-color;}
@@ -77,7 +77,7 @@ button, input[type=submit]{margin: 10px 0 10px 0px;padding: 3px 20px 3px 20px;co
77
77
  .block .center{ text-align:center;}
78
78
  .block .close { float:right; vertical-align:top;}
79
79
  .block .content{ padding: 5px 4px 5px 4px; }
80
- .block .header{vertical-align: middle; background: #DEEFF8;
80
+ .block .header{vertical-align: middle; background: $secondary-color;
81
81
  padding-left: 10px; display: block; height:20px; font-weight:bold;}
82
82
  .block .header_icon{ margin-top: 2px; width:14px; height:14px; }
83
83
  .block .header_icon_right { float: right; padding-right: 5px; padding-top: 3px;}
@@ -3,6 +3,7 @@
3
3
  /******** MAIN Structure home *********/
4
4
  #center_body {
5
5
  width: 560px;
6
+ max-width: 560px;
6
7
  border-right: thin solid $separation-color;
7
8
  border-bottom: thin solid $separation-color;
8
9
  border-left: thin solid $separation-color;
@@ -326,7 +326,7 @@ es:
326
326
  age: "Edad"
327
327
  must_be_signed_id: "Debes identificarte"
328
328
  group:
329
- about: "Sobre nosotros"
329
+ about: "Sobre nosotros/as"
330
330
  birthday: "Aniversario"
331
331
  experience: "Temas que se trabajan"
332
332
  info: "Información sobre el grupo"
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.9.33".freeze
3
+ VERSION = "0.9.34".freeze
4
4
  end
5
5
  end
@@ -8,11 +8,20 @@ module SocialStream
8
8
 
9
9
  private
10
10
 
11
- # Redirect to login if the user is trying to access a protected resource
12
- # and she is not authenticated
11
+ # Catch some authorization errors:
12
+ #
13
+ # * Redirect to home when the user changes the session and the resource
14
+ # is not accesible with the new representation
15
+ #
16
+ # * Redirect to login if the user is trying to access a protected resource
17
+ # and she is not authenticated
13
18
  def rescue_from_access_denied(exception)
14
19
  if user_signed_in?
15
- raise exception
20
+ if params[:s].present? && controller_name != 'home'
21
+ redirect_to :home
22
+ else
23
+ raise exception
24
+ end
16
25
  else
17
26
  redirect_to new_user_session_path
18
27
  end
@@ -131,6 +131,7 @@ describe PostsController do
131
131
  end
132
132
  end
133
133
  end
134
+
134
135
  end
135
136
 
136
137
  context "creating post in group's wall" do
@@ -163,5 +164,25 @@ describe PostsController do
163
164
  response.should be_success
164
165
  end
165
166
  end
167
+
168
+ describe "to friend on representation change" do
169
+ before do
170
+ @post = Factory(:post)
171
+
172
+ @user = @post.post_activity.sender_subject
173
+
174
+ @group = Factory(:member, :contact => Factory(:g2g_contact, :receiver => @user.actor)).sender_subject
175
+
176
+ Factory(:friend, :contact => Factory(:g2g_contact, :sender => @user.actor))
177
+
178
+ sign_in @user
179
+ end
180
+
181
+ it "should redirect show to home" do
182
+ get :show, :id => @post.to_param, :s => @group.slug
183
+
184
+ response.should redirect_to(:home)
185
+ end
186
+ end
166
187
  end
167
188
 
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: 121
4
+ hash: 127
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 33
10
- version: 0.9.33
9
+ - 34
10
+ version: 0.9.34
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-11-17 00:00:00 +01:00
19
+ date: 2011-11-18 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency