social_stream-base 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,20 @@ $(function() {
9
9
  $('#security').chosen();
10
10
  });
11
11
 
12
+
13
+ $(document).ready(function() {
14
+ $('#new_post').submit(function() {
15
+ $("#input_activities").blur();
16
+ $("#masterSubmitButton").val("<%= I18n.t('activity.sending') %>...");
17
+ $('#new_post').attr("disabled", true);
18
+ $('#masterSubmitButton').attr("disabled", true);
19
+ $('#input_activities').attr('readonly', true);
20
+ return true;
21
+ });
22
+ });
23
+
24
+
25
+
12
26
  //clicks form selector
13
27
  $('.activity_form_selector').live('click',function(){
14
28
  $('.activity_form_selector').removeClass('selected');
@@ -34,18 +48,8 @@ $('#masterSubmitButton').live('click',function(){
34
48
 
35
49
  //javascript for main activities input
36
50
  $(function() {
37
- activity_input = "<%= I18n.t('activity.input') %>";
38
51
  $("#input_activities").click(function(){
39
- if(this.value == activity_input){
40
- this.value = "";
41
52
  $("#masterSubmitButton").show();
42
- }
43
- });
44
- event_input = "<%= I18n.t('event.input') %>";
45
- $("#event_name").click(function(){
46
- if(this.value == event_input){
47
- this.value = "";
48
- }
49
53
  });
50
54
  });
51
55
 
@@ -53,7 +57,8 @@ $(function() {
53
57
  //javascript for comments
54
58
  $(function() {
55
59
  //"write new comment..." text in every text field for comments
56
- $(".input_new_comments").val("<%= I18n.t('comment.input') %>");
60
+ $("#input_activities").Watermark("<%= I18n.t('activity.input') %>","#666");
61
+ $(".input_new_comments").Watermark("<%= I18n.t('comment.input') %>","#666");
57
62
 
58
63
  //show only the text fields for new comment if there are any comment to the post
59
64
  $(".activity_new_comment").each(function(){
@@ -84,42 +89,18 @@ showAllComments = function(id){
84
89
 
85
90
  //usa livequery para usar el javascript luego de una accion con AJAX
86
91
  $(".input_new_comments").live("click",function(){
87
- if(this.value == "<%= I18n.t('comment.input') %>"){
88
- $(this).val("");
89
- }
90
92
  $(".activities_comment_btn").hide();
91
93
  $(this).parent(".new_comment").children(".activities_comment_btn").show();
92
94
  });
93
95
 
94
- /* this function works but it finishes and no other event is done
95
- * I mean: when you click in other button the blur happens but the click is not done
96
- $(".input_new_comments").live("blur",function(){
97
- if(this.value == ""){
98
- $(".activities_comment_btn").hide();
99
- $(this).val("<%= I18n.t('comment.input') %>");
100
- }
101
- return true;
102
- });
103
- */
104
-
105
96
  //javascript for tocomment option
106
97
  $(".to_comment").live("click", function(){
107
98
  $(this).parents(".activity_content").find(".activity_new_comment").show();
108
- $(".input_new_comments").val("<%= I18n.t('comment.input') %>");
109
99
  $(this).parents(".activity_content").find(".input_new_comments").click();
110
100
  $(this).parents(".activity_content").find(".input_new_comments").focus();
111
101
  return false;
112
102
  });
113
103
 
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
104
  //move he last list item before the first item. The purpose of this is if the user clicks to slide left he will be able to see the last item.
124
105
  $('#carousel_ul li:first').before($('#carousel_ul li:last'));
125
106
 
@@ -60,7 +60,7 @@
60
60
  border: thin solid #D4E4E4; width:100%; padding-top: 3px; padding-bottom: 3px;display:none;}
61
61
  .actor_logo_subactivity { width: 40px; padding: 5px 3px 5px 2px; display: inline-block;
62
62
  vertical-align: top;}
63
- .input_new_comments{ border:1px solid #BDC7D8; width:98%; padding: 2px;}
63
+ .input_new_comments{ border:1px solid #BDC7D8; width:98%; padding: 2px; color:#2A3890;}
64
64
  .subactivity{ font-size: 11px; padding: 0px 0px 0px 5px; background: #deeff8;
65
65
  border: thin solid #D4E4E4; width: 100%; }
66
66
  .space_comments { padding-top: 1px; padding-bottom: 1px;}
@@ -67,7 +67,7 @@ textarea.new_contact_text_area{ height: 100px; color: #2A3890;}
67
67
  color-stop(0.16, rgb(0,122,193)), color-stop(0.58, rgb(56,148,209)), color-stop(0.79, rgb(168,222,249)) );
68
68
  background-image: -moz-linear-gradient(center bottom,
69
69
  rgb(0,122,193) 16%, rgb(56,148,209) 58%, rgb(168,222,249) 79%);
70
- border-radius: 0.2em; color: #fff; width: 60px; height: 22px; border: none;}
70
+ border-radius: 0.2em; color: #fff; padding: 0 10px; height: 22px; border: none;}
71
71
  .myButtonBlue span { display: block; line-height: 14px; padding: 3px 0 3px 10px;}
72
72
  .myButtonBlue:active { background-position: bottom right; color: #000; outline: none; }
73
73
  .myButtonBlue:active span { background-position: bottom left; padding: 3px 0 2px 18px; }
@@ -14,9 +14,11 @@
14
14
  span.find{ padding-right:5px;}
15
15
 
16
16
  /************** sub structure Frontpage **************/
17
+ #devise_links {padding: 5px 0 5px 0;}
18
+ #devise_links a{font-weight: bold;line-height: 15px; }
17
19
  #login{ padding-top: 5px;}
18
- #welcome{ margin-top:50px; margin-left:300px; width:330px; padding:20px; border: thin solid #2A3890;
19
- position: absolute; text-align:center;}
20
+ #welcome{ margin: 50px auto 50px auto; width:330px; padding:20px; border: thin solid #2A3890;
21
+ text-align:center;}
20
22
  #wrapper_left{ vertical-align:top; width:49%; display:inline-block; padding-left: 20px;}
21
23
  #wrapper_right{ vertical-align:top; width:48%; display:inline-block;}
22
24
 
@@ -46,7 +46,7 @@
46
46
  height: 35px;
47
47
  background: whiteSmoke;
48
48
  overflow: hidden;
49
- text-align: left;
49
+ text-align: center;
50
50
  }
51
51
  #global_search_display li .logo{
52
52
  float:left;
@@ -62,4 +62,15 @@
62
62
  background: #CFDEFF;
63
63
  color: #2A3890;
64
64
  }
65
+
66
+
67
+ #global_search_display span{
68
+ float:left;
69
+ margin-top: 10px;
70
+ }
71
+
72
+ #global_search_display .warning{
73
+ width:100%;
74
+ }
75
+
65
76
  /******************** Search box css END ***********************/
@@ -32,13 +32,15 @@ class NotificationsController < ApplicationController
32
32
  @actor.unread @notification
33
33
  end
34
34
  end
35
- redirect_to notifications_path(:page => params[:page])
35
+ @notifications = @mailbox.notifications.not_trashed.page(params[:page]).per(10)
36
+ render :action => :index
36
37
  end
37
38
 
38
39
  def update_all
39
40
  @notifications= @mailbox.notifications.all
40
41
  @actor.read @notifications
41
- redirect_to notifications_path(:page => params[:page])
42
+ @notifications = @mailbox.notifications.not_trashed.page(params[:page]).per(10)
43
+ render :action => :index
42
44
  end
43
45
 
44
46
  def destroy
@@ -1,6 +1,6 @@
1
1
  module ContactsHelper
2
- def contact_brief(contact)
3
- "N contacts in common"
2
+ def contact_brief(subject)
3
+ t 'contact.in_common', :count => current_subject.common_contacts_count(subject)
4
4
  end
5
5
 
6
6
  def contact_link(c)
data/app/models/actor.rb CHANGED
@@ -268,7 +268,8 @@ class Actor < ActiveRecord::Base
268
268
  end
269
269
 
270
270
  def sent_active_contact_ids
271
- sent_contacts.active.map(&:receiver_id)
271
+ @sent_active_contact_ids ||=
272
+ load_sent_active_contact_ids
272
273
  end
273
274
 
274
275
  # By now, it returns a suggested {Contact} to another {Actor} without any current {Tie}
@@ -359,6 +360,11 @@ class Actor < ActiveRecord::Base
359
360
  c.receiver.contact_to!(c.sender)
360
361
  end
361
362
  end
363
+
364
+ # Count the contacts in common between this {Actor} and subject
365
+ def common_contacts_count(subject)
366
+ (sent_active_contact_ids & subject.sent_active_contact_ids).size
367
+ end
362
368
 
363
369
  # The set of {Activity activities} in the wall of this {Actor}.
364
370
  #
@@ -480,4 +486,9 @@ class Actor < ActiveRecord::Base
480
486
 
481
487
  ties + second_grade_ties
482
488
  end
489
+
490
+ # Calculate {#sent_active_contact_ids}
491
+ def load_sent_active_contact_ids
492
+ sent_contacts.active.map(&:receiver_id)
493
+ end
483
494
  end
@@ -11,7 +11,7 @@
11
11
  <div id="activity_form_select">
12
12
  <% SocialStream.activity_forms.each do |element| %>
13
13
  <div id="select_<%= element %>" class="activity_form_selector">
14
- <%= image_tag "btn/#{ element }.png", :title => t("#{ element }.form.title") %>
14
+ <%= t("#{ element }.form.title") %>
15
15
  </div>
16
16
  <% end %>
17
17
  </div>
@@ -21,6 +21,6 @@
21
21
  <% end %>
22
22
 
23
23
  <div id="activities_share_btn">
24
- <%= submit_tag(t('share'), :class => "myButtonBlue", :id => "masterSubmitButton") %>
24
+ <%= submit_tag(t('share'), :class => "myButtonBlue submitActivity", :id => "masterSubmitButton") %>
25
25
  </div>
26
26
  <% end %>
@@ -11,12 +11,25 @@
11
11
  <%= f.hidden_field :_contact_id %>
12
12
  <%= f.hidden_field :_activity_parent_id %>
13
13
 
14
- <%= f.text_field :text, :class =>"input_new_comments" , :id => "comment_text_"+dom_id(activity) %>
14
+ <%= f.text_field :text, :class =>"input_new_comments", :id => "comment_text_"+dom_id(activity) %>
15
15
 
16
16
  <div class="activities_comment_btn">
17
17
  <div class="activities_security"></div>
18
- <%= f.submit t('share'), :class =>"myButtonBlue", :id => "comment_submit"+dom_id(activity) %>
18
+ <%= f.submit t('share'), :class =>"myButtonBlue submitActivity", :id => "comment_submit_"+dom_id(activity) %>
19
19
  </div>
20
20
  <% end %>
21
21
  </div>
22
22
  <% end %>
23
+
24
+ <%= javascript_tag do %>
25
+ $(document).ready(function() {
26
+ $('#new_comment<%= dom_id(activity) %>').submit(function() {
27
+ $('#comment_text_<%= dom_id(activity) %>').blur();
28
+ $('#comment_submit_<%= dom_id(activity) %>').val("<%= I18n.t('activity.sending') %>...");
29
+ $('#new_comment<%= dom_id(activity) %>').attr("disabled", true);
30
+ $('#comment_submit_<%= dom_id(activity) %>').attr("disabled", true);
31
+ $('#comment_text_<%= dom_id(activity) %>').attr('readonly', true);
32
+ return true;
33
+ });
34
+ });
35
+ <% end %>
@@ -1,4 +1,10 @@
1
+ $(".submitActivity").val("<%= I18n.t('share') %>");
2
+ $('.input_new_comments').val("");
3
+ $('.input_new_comments').blur();
4
+ $(".submitActivity").removeAttr("disabled");
5
+ $('.input_new_comments').removeAttr('readonly');
6
+ $('.new_comment').removeAttr("disabled");
7
+
1
8
  //Display the new comment
2
9
  $("#comments_activity_<%= @comment.post_activity.parent.id %>").append("<%= escape_javascript(render @comment.post_activity) %>");
3
- $(".input_new_comments").val("<%= t('comment.input') %>");
4
10
  $(".activities_comment_btn").hide();
@@ -1,19 +1,26 @@
1
1
  <% toolbar :profile => current_subject %>
2
2
 
3
3
  <%= location(image_tag("btn/btn_account.png", :class => "menu_icon")+t('account.one'),
4
- link_to (t('account.edit'), edit_user_registration_path)
4
+ link_to(t('account.edit'), edit_user_registration_path)
5
5
  ) %>
6
6
 
7
7
  <%= devise_error_messages! %>
8
8
 
9
+ <% content_for :javascript do %>
10
+ $(".user_edit").validate();
11
+ <%end%>
12
+
9
13
  <div class="space_center"></div>
10
14
  <h2><%= t('account.edit') %></h2>
11
15
  <div class="space_center"></div>
12
16
 
13
17
  <div class="block" id="password_form">
14
18
  <div class="header">
15
- Change password
19
+ <div class="header_text">
20
+ <%=t("account.password.change")%>
21
+ </div>
16
22
  </div>
23
+ <div class="space_center"></div>
17
24
  <div >
18
25
  <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
19
26
  <div class="form_row">
@@ -51,8 +58,11 @@
51
58
  </div>
52
59
  <div class="block" id="email_form">
53
60
  <div class="header">
54
- Change email address
61
+ <div class="header_text">
62
+ <%=t("account.email.change")%>
63
+ </div>
55
64
  </div>
65
+ <div class="space_center"></div>
56
66
  <div >
57
67
  <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
58
68
  <div class="form_row">
@@ -60,7 +70,7 @@
60
70
  <%= f.label :email %>
61
71
  </div>
62
72
  <div class="form_field">
63
- <%= f.email_field :email, :class => "form_tag" %>
73
+ <%= f.email_field :email, :class => "required form_tag" %>
64
74
  </div>
65
75
  </div>
66
76
  <div class="form_row">
@@ -82,9 +92,13 @@
82
92
  </div>
83
93
  <div class="block" id="cancel_account">
84
94
  <div class="header">
85
- Cancel account
95
+ <div class="header_text">
96
+ <%=t("account.cancel")%>
97
+ </div>
86
98
  </div>
99
+ <div class="space_center"></div>
87
100
  <div class="form_row">
88
101
  Unhappy? <b><%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</b>
89
102
  </div>
90
103
  </div>
104
+ <div class="space_center"></div>
@@ -9,21 +9,22 @@
9
9
  <%= devise_error_messages! %>
10
10
  <div class="form_row">
11
11
  <div class="form_label"><%= f.label :email %></div>
12
- <div class="form_field"><%= f.email_field :email %></div>
12
+ <div class="form_field"><%= f.email_field :email, :class => "form_tag" %></div>
13
13
  </div>
14
14
  <div class="form_row">
15
15
  <div class="form_label"><%= f.label :password %></div>
16
- <div class="form_field"><%= f.password_field :password %></div>
16
+ <div class="form_field"><%= f.password_field :password, :class => "form_tag" %></div>
17
17
  </div>
18
18
 
19
- <div class="form_row">
19
+
20
+ <div id="devise_links">
20
21
  <% if devise_mapping.rememberable? -%>
21
- <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
22
+ <%= f.check_box :remember_me %> <%= f.label :remember_me %>
22
23
  <% end -%>
24
+ <div class="space_center"></div>
25
+ <%= render :partial => "devise/shared/links" %>
23
26
  </div>
24
27
 
25
- <%= render :partial => "devise/shared/links" %>
26
-
27
28
  <div class="btn_login">
28
29
  <%= f.submit t('action.send'), :class =>"myButton" %>
29
30
  </div>
@@ -10,7 +10,7 @@
10
10
  <%= link_to t('account.edit'), edit_user_registration_path %>
11
11
  </li>
12
12
  <li class="btn_menu_exit">
13
- <%= link_to t('sign_out'), destroy_user_session_path, :id => "btn_menu_account_logout" %>
13
+ <%= link_to t('sign_out'), destroy_user_session_path, :method => :delete, :id => "btn_menu_account_logout" %>
14
14
  </li>
15
15
  </ul>
16
16
  </li>
@@ -28,11 +28,11 @@ $(document).ready(function() {
28
28
  $("#global_search_display").hide();
29
29
  }
30
30
  else if(searchstring.length < 2) {
31
- $("#global_search_display").hide();
31
+ $("#global_search_display").html("<ul><li><%= escape_javascript(content_tag(:span,I18n.t('search.at_least'), :class => :warning)) %></li></ul>").show();
32
32
  } else {
33
33
  if (last_search!=searchstring){
34
34
  last_search=searchstring;
35
- $("#global_search_display").html("<%= escape_javascript(image_tag('loading.gif', :class => :loading)) %>").show();
35
+ $("#global_search_display").html("<ul><li><%= escape_javascript(image_tag('loading.gif', :class => :loading)) %></li></ul>").show();
36
36
  $.ajax({
37
37
  type : "GET",
38
38
  url : "<%= search_url %>?id=" + searchstring + "&mode=header_search",
@@ -1,4 +1,4 @@
1
- <% if activity.direct_object.is_a? Actor %>
1
+ <% if activity.direct_object.is_a? Actor or activity.direct_object.respond_to? :actor %>
2
2
  %{look}
3
3
  <% else %>
4
4
  "%{object.text}"
@@ -1,5 +1,5 @@
1
- <% if activity.direct_object.is_a? Actor %>
1
+ <% if activity.direct_object.is_a? Actor or activity.direct_object.respond_to? :actor %>
2
2
  %{sender} is now %{whose} fan.
3
3
  <% else %>
4
- %{sender} likes %{whose} %{object.name}
4
+ %{sender} likes %{whose} %{object.name}%>
5
5
  <% end %>
@@ -2,4 +2,6 @@ $("#content").html("<%=escape_javascript(render :partial => 'index') %>");
2
2
 
3
3
  <%= location(link_to(image_tag("btn/btn_notification.png", :class => "menu_icon")+t('notification.other'), notifications_path,:remote => true)) %>
4
4
 
5
+ <%= toolbar %>
6
+
5
7
  $('.pagination a').attr('data-remote', 'true');
@@ -1,5 +1,10 @@
1
- //set a new value to input field with javascript
2
- $("#input_activities").val("<%= t('activity.input') %>");
1
+ $(".submitActivity").val("<%= I18n.t('share') %>");
2
+ $('#input_activities').val("");
3
+ $('#input_activities').blur();
4
+ $(".submitActivity").removeAttr("disabled");
5
+ $('#input_activities').removeAttr('readonly');
6
+ $('#new_post').removeAttr("disabled");
7
+
3
8
  //Display the new post
4
9
  $("#wall").prepend("<%= escape_javascript(render @post.post_activity) %>");
5
10
 
@@ -8,3 +8,8 @@
8
8
  <% end %>
9
9
  <% end %>
10
10
  </ul>
11
+
12
+
13
+ <% if search_result.empty? %>
14
+ <ul><li><%= content_tag(:span,I18n.t('search.actor.none'), :class => :warning) %></li></ul>
15
+ <% end %>
@@ -5,9 +5,13 @@ en:
5
5
  send: "Send"
6
6
  accept: "Accept"
7
7
  account:
8
- edit: "Edit user"
8
+ cancel: "Cancel account"
9
+ edit: "Edit account"
10
+ email:
11
+ change: "Change email address"
9
12
  one: "Account"
10
13
  password:
14
+ change: "Change password"
11
15
  new: "New password"
12
16
  retype: "Retype new password"
13
17
  privacy: "Privacy"
@@ -22,6 +26,7 @@ en:
22
26
  like: "I like"
23
27
  one: "Activity"
24
28
  other: "Activities"
29
+ sending: "Sending"
25
30
  title: "Activities"
26
31
  to_comment: "Comment"
27
32
  unlike: "I do not like anymore"
@@ -90,6 +95,9 @@ en:
90
95
  edit:
91
96
  title: "Edit contact to %{name}"
92
97
  submit: "Edit Contact"
98
+ in_common:
99
+ one: "1 contact in common"
100
+ other: "%{count} contacts in common"
93
101
  new:
94
102
  link: "+ Add contact"
95
103
  title: "Add %{name} to your contacts"
@@ -311,6 +319,10 @@ en:
311
319
  relation_public:
312
320
  name: "Public"
313
321
  required: "(*) These fields are required"
322
+ search:
323
+ actor:
324
+ none: "Nothing found"
325
+ at_least: "Write at least two characters"
314
326
  settings:
315
327
  error: "Some errors raised when saving your changes"
316
328
  for: "Settings for"
@@ -29,6 +29,10 @@ class SocialStream::Base::InstallGenerator < Rails::Generators::Base #:nodoc:
29
29
  copy_file 'relations.yml', 'config/relations.yml'
30
30
  end
31
31
 
32
+ def create_config_sphinx_file
33
+ copy_file 'sphinx.yml', 'config/sphinx.yml'
34
+ end
35
+
32
36
  def remove_public_index
33
37
  remove_file 'public/index.html'
34
38
  end
@@ -0,0 +1,9 @@
1
+ development:
2
+ enable_star: 1
3
+ min_infix_len: 2
4
+ test:
5
+ enable_star: 1
6
+ min_infix_len: 2
7
+ production:
8
+ enable_star: 1
9
+ min_infix_len: 2
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.9.0".freeze
3
+ VERSION = "0.9.1".freeze
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  # SQL foreign keys
20
20
  s.add_runtime_dependency('foreigner', '~> 0.9.1')
21
21
  # Authentication
22
- s.add_runtime_dependency('devise', '~> 1.4.3')
22
+ s.add_runtime_dependency('devise', '~> 1.4.5')
23
23
  # CRUD controllers
24
24
  s.add_runtime_dependency('inherited_resources', '~> 1.3.0')
25
25
  # Slug generation
@@ -20,13 +20,13 @@ describe NotificationsController do
20
20
  it "should update read" do
21
21
  put :update, :id => @receipt.notification.to_param, :read => "Read"
22
22
  @receipt.notification.is_unread?(@actor).should==false
23
- response.should redirect_to notifications_path
23
+ assert_response :success
24
24
  end
25
25
 
26
26
  it "should update unread" do
27
27
  put :update, :id => @receipt.notification.to_param, :read => "Unread"
28
28
  @receipt.notification.is_unread?(@actor).should==true
29
- response.should redirect_to notifications_path
29
+ assert_response :success
30
30
  end
31
31
 
32
32
  it "should update all" do
@@ -34,7 +34,7 @@ describe NotificationsController do
34
34
  put :update_all
35
35
  @receipt.notification.is_unread?(@actor).should==false
36
36
  @receipt2.notification.is_unread?(@actor).should==false
37
- response.should redirect_to notifications_path
37
+ assert_response :success
38
38
  end
39
39
 
40
40
  it "should send to trash" do
@@ -2,8 +2,9 @@
2
2
  # four configuration values can also be set straight in your models.
3
3
  Devise.setup do |config|
4
4
  # ==> Mailer Configuration
5
- # Configure the e-mail address which will be shown in DeviseMailer.
6
- config.mailer_sender = "please-change-me@config-initializers-devise.com"
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
7
8
 
8
9
  # Configure the class responsible to send e-mails.
9
10
  # config.mailer = "Devise::Mailer"
@@ -34,7 +35,12 @@ Devise.setup do |config|
34
35
  # Configure which authentication keys should be case-insensitive.
35
36
  # These keys will be downcased upon creating or modifying a user and when used
36
37
  # to authenticate or find a user. Default is :email.
37
- # config.case_insensitive_keys = [ :email ]
38
+ config.case_insensitive_keys = [ :email ]
39
+
40
+ # Configure which authentication keys should have whitespace stripped.
41
+ # These keys will have whitespace before and after removed upon creating or
42
+ # modifying a user and when used to authenticate or find a user. Default is :email.
43
+ config.strip_whitespace_keys = [ :email ]
38
44
 
39
45
  # Tell if authentication through request.params is enabled. True by default.
40
46
  # config.params_authenticatable = true
@@ -48,10 +54,22 @@ Devise.setup do |config|
48
54
  # The realm used in Http Basic Authentication. "Application" by default.
49
55
  # config.http_authentication_realm = "Application"
50
56
 
57
+ # It will change confirmation, password recovery and other workflows
58
+ # to behave the same regardless if the e-mail provided was right or wrong.
59
+ # Does not affect registerable.
60
+ # config.paranoid = true
61
+
51
62
  # ==> Configuration for :database_authenticatable
52
63
  # For bcrypt, this is the cost for hashing the password and defaults to 10. If
53
64
  # using other encryptors, it sets how many times you want the password re-encrypted.
54
- config.stretches = 10
65
+ #
66
+ # Limiting the stretches to just one in testing will increase the performance of
67
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
68
+ # a value less than 10 in other environments.
69
+ config.stretches = Rails.env.test? ? 1 : 10
70
+
71
+ # Setup a pepper to generate the encrypted password.
72
+ # config.pepper = "6bcafeb00da5bc1cd324c5155e7ddfc9c611ae53faf8f534a0603480a6a8a5e3ad1ce172123dfda4f5f8fb81d81e1bdfa119be34333baf2406304d2ae6355377"
55
73
 
56
74
  # ==> Configuration for :confirmable
57
75
  # The time you want to give your user to confirm his account. During this time
@@ -62,6 +80,9 @@ Devise.setup do |config|
62
80
  # (ie 2 days).
63
81
  # config.confirm_within = 2.days
64
82
 
83
+ # Defines which key will be used when confirming an account
84
+ # config.confirmation_keys = [ :email ]
85
+
65
86
  # ==> Configuration for :rememberable
66
87
  # The time the user will be remembered without asking for credentials again.
67
88
  # config.remember_for = 2.weeks
@@ -76,12 +97,18 @@ Devise.setup do |config|
76
97
  # to false if you are not using database authenticatable.
77
98
  config.use_salt_as_remember_token = true
78
99
 
100
+ # Options to be passed to the created cookie. For instance, you can set
101
+ # :secure => true in order to force SSL only cookies.
102
+ # config.cookie_options = {}
103
+
79
104
  # ==> Configuration for :validatable
80
- # Range for password length. Default is 6..20.
81
- # config.password_length = 6..20
105
+ # Range for password length. Default is 6..128.
106
+ # config.password_length = 6..128
82
107
 
83
- # Regex to use to validate the email address
84
- # config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
108
+ # Email regex used to validate email formats. It simply asserts that
109
+ # an one (and only one) @ exists in the given string. This is mainly
110
+ # to give user feedback and not to assert the e-mail validity.
111
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
85
112
 
86
113
  # ==> Configuration for :timeoutable
87
114
  # The time you want to timeout the user session without activity. After this
@@ -94,6 +121,9 @@ Devise.setup do |config|
94
121
  # :none = No lock strategy. You should handle locking by yourself.
95
122
  # config.lock_strategy = :failed_attempts
96
123
 
124
+ # Defines which key will be used when locking and unlocking an account
125
+ # config.unlock_keys = [ :email ]
126
+
97
127
  # Defines which strategy will be used to unlock an account.
98
128
  # :email = Sends an unlock link to the user email
99
129
  # :time = Re-enables login after a certain amount of time (see :unlock_in below)
@@ -108,6 +138,16 @@ Devise.setup do |config|
108
138
  # Time interval to unlock the account if :time is enabled as unlock_strategy.
109
139
  # config.unlock_in = 1.hour
110
140
 
141
+ # ==> Configuration for :recoverable
142
+ #
143
+ # Defines which key will be used when recovering the password for an account
144
+ # config.reset_password_keys = [ :email ]
145
+
146
+ # Time interval you can reset your password with a reset password key.
147
+ # Don't put a too small interval or your users won't have the time to
148
+ # change their passwords.
149
+ config.reset_password_within = 2.hours
150
+
111
151
  # ==> Configuration for :encryptable
112
152
  # Allow you to use another encryption algorithm besides bcrypt (default). You can use
113
153
  # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
@@ -116,9 +156,6 @@ Devise.setup do |config|
116
156
  # REST_AUTH_SITE_KEY to pepper)
117
157
  # config.encryptor = :sha512
118
158
 
119
- # Setup a pepper to generate the encrypted password.
120
- # config.pepper = "6efecaefd488a07abded679d45be30dc97935d74c44825b647149a6fa30ee8cd5e05bb3a426ce8a87fcd75b04079b1bac68a079acdcc175800c4131dde7961f0"
121
-
122
159
  # ==> Configuration for :token_authenticatable
123
160
  # Defines name of the authentication token params key
124
161
  # config.token_authentication_key = :auth_token
@@ -150,11 +187,12 @@ Devise.setup do |config|
150
187
  # If you have any extra navigational formats, like :iphone or :mobile, you
151
188
  # should add them to the navigational formats lists.
152
189
  #
153
- # The :"*/*" format below is required to match Internet Explorer requests.
154
- # config.navigational_formats = [:"*/*", :html]
190
+ # The :"*/*" and "*/*" formats below is required to match Internet
191
+ # Explorer requests.
192
+ # config.navigational_formats = [:"*/*", "*/*", :html]
155
193
 
156
- # The default HTTP method used to sign out a resource. Default is :get.
157
- # config.sign_out_via = :get
194
+ # The default HTTP method used to sign out a resource. Default is :delete.
195
+ config.sign_out_via = :delete
158
196
 
159
197
  # ==> OmniAuth
160
198
  # Add a new OmniAuth provider. Check the wiki for more information on setting
@@ -163,7 +201,13 @@ Devise.setup do |config|
163
201
  config.omniauth :linked_in, "ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB", "WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY"
164
202
 
165
203
  config.omniauth :facebook, "129571360447856","eef39dce5e20e76f77495c59623bdb38"
166
-
204
+
205
+ #config.omniauth :twitter, "wgTxO0fTpjTeSnjKC9ZHA","JepulVWwLcuAnGfWjwCu47yEP0TcJJfKtvISPBsilI"
206
+
207
+ config.token_authentication_key = :auth_token
208
+
209
+ config.stateless_token = true
210
+
167
211
  # ==> Warden configuration
168
212
  # If you want to use other strategies, that are not supported by Devise, or
169
213
  # change the failure app, you can configure them inside the config.warden block.
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: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
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-09-12 00:00:00 +02:00
19
+ date: 2011-09-13 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -75,12 +75,12 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- hash: 1
78
+ hash: 13
79
79
  segments:
80
80
  - 1
81
81
  - 4
82
- - 3
83
- version: 1.4.3
82
+ - 5
83
+ version: 1.4.5
84
84
  type: :runtime
85
85
  version_requirements: *id004
86
86
  - !ruby/object:Gem::Dependency
@@ -887,6 +887,7 @@ files:
887
887
  - lib/generators/social_stream/base/templates/initializer.rb
888
888
  - lib/generators/social_stream/base/templates/navigation.rb
889
889
  - lib/generators/social_stream/base/templates/relations.yml
890
+ - lib/generators/social_stream/base/templates/sphinx.yml
890
891
  - lib/mailboxer/notification_decoder.rb
891
892
  - lib/paperclip/social_stream.rb
892
893
  - lib/social_stream-base.rb