Merge branch 'master' of git://github.com/diaspora/diaspora into migration_with_tmp_post_id
This commit is contained in:
commit
eddc3eb012
23 changed files with 132 additions and 85 deletions
|
|
@ -6,7 +6,7 @@ class HomeController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if current_user
|
if current_user
|
||||||
redirect_to :controller => 'aspects', :action => 'index'
|
redirect_to multi_path
|
||||||
elsif is_mobile_device?
|
elsif is_mobile_device?
|
||||||
redirect_to user_session_path
|
redirect_to user_session_path
|
||||||
else
|
else
|
||||||
|
|
|
||||||
11
app/controllers/multis_controller.rb
Normal file
11
app/controllers/multis_controller.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||||
|
# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
|
require File.join(Rails.root, 'lib', 'stream', 'multi')
|
||||||
|
|
||||||
|
class MultisController < ApplicationController
|
||||||
|
def index
|
||||||
|
default_stream_action(Stream::Multi)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
require File.join(Rails.root, 'lib', 'stream', 'soup')
|
|
||||||
|
|
||||||
class SoupsController < ApplicationController
|
|
||||||
#before_filter :redirect_unless_admin
|
|
||||||
|
|
||||||
def index
|
|
||||||
default_stream_action(Stream::Soup)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -44,7 +44,7 @@ class UsersController < ApplicationController
|
||||||
elsif u[:show_community_spotlight_in_stream]
|
elsif u[:show_community_spotlight_in_stream]
|
||||||
if @user.update_attributes(u)
|
if @user.update_attributes(u)
|
||||||
flash[:notice] = I18n.t 'users.update.settings_updated'
|
flash[:notice] = I18n.t 'users.update.settings_updated'
|
||||||
redirect_to soup_path
|
redirect_to multi_path
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
flash[:notice] = I18n.t 'users.update.settings_not_updated'
|
flash[:notice] = I18n.t 'users.update.settings_not_updated'
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,15 @@ module InterimStreamHackinessHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def from_group(post)
|
def from_group(post)
|
||||||
if defined?(@stream) && params[:controller]== 'soups'
|
if defined?(@stream) && params[:controller] == 'multis'
|
||||||
@stream.post_from_group(post)
|
@stream.post_from_group(post)
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def what_soup_sentence(post)
|
def what_stream_sentence(post)
|
||||||
from_group(post).map{|x| x.to_s.gsub("_soup", '').gsub('_',' ').titleize}.to_sentence
|
from_group(post).map{|x| I18n.t("streams.#{x.to_s}")}.to_sentence
|
||||||
end
|
end
|
||||||
|
|
||||||
def stream_settings_link(post)
|
def stream_settings_link(post)
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ module StreamHelper
|
||||||
spotlight_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
spotlight_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(MentionsController)
|
elsif controller.instance_of?(MentionsController)
|
||||||
mentions_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
mentions_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(SoupsController)
|
elsif controller.instance_of?(MultisController)
|
||||||
soup_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
multi_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(PostsController)
|
elsif controller.instance_of?(PostsController)
|
||||||
public_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
public_stream_path(:max_time => time_for_scroll(opts[:ajax_stream], @stream), :sort_order => session[:sort_order])
|
||||||
elsif controller.instance_of?(AspectsController)
|
elsif controller.instance_of?(AspectsController)
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
#aspect_stream_header
|
#aspect_stream_header
|
||||||
#sort_by
|
#sort_by
|
||||||
= t('.recently')
|
= t('streams.recently')
|
||||||
%span.controls
|
%span.controls
|
||||||
= link_to_if(session[:sort_order] == 'created_at', t('.commented_on'), stream.link(:sort_order => 'updated_at'))
|
= link_to_if(session[:sort_order] == 'created_at', t('streams.commented_on'), stream.link(:sort_order => 'updated_at'))
|
||||||
·
|
·
|
||||||
= link_to_if(session[:sort_order] == 'updated_at', t('.posted'), stream.link(:sort_order => 'created_at' ))
|
= link_to_if(session[:sort_order] == 'updated_at', t('streams.posted'), stream.link(:sort_order => 'created_at' ))
|
||||||
|
|
||||||
%h3
|
%h3
|
||||||
= stream.title
|
= stream.title
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,13 @@
|
||||||
.section
|
.section
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
= link_to "Welcome", getting_started_path, :class => "home_selector"
|
= link_to t(".welcome"), getting_started_path, :class => "home_selector"
|
||||||
|
|
||||||
.section
|
.section
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
%b
|
%b
|
||||||
= link_to "Soup", soup_path, :class => 'home_selector'
|
= link_to t("streams.multi.title"), multi_path, :class => 'home_selector'
|
||||||
|
|
||||||
.section
|
.section
|
||||||
= render 'aspects/aspect_listings', :stream => @stream
|
= render 'aspects/aspect_listings', :stream => @stream
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
%b
|
%b
|
||||||
= link_to t('.mentions'), mentions_path, :class => 'home_selector'
|
= link_to t('streams.mentions.title'), mentions_path, :class => 'home_selector'
|
||||||
|
|
||||||
.section#followed_tags_listing
|
.section#followed_tags_listing
|
||||||
= render 'tags/followed_tags_listings'
|
= render 'tags/followed_tags_listings'
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
= t('share_visibilites.update.see_it_on_their_profile', :name => person_link(post.author)).html_safe
|
= t('share_visibilites.update.see_it_on_their_profile', :name => person_link(post.author)).html_safe
|
||||||
= link_to t('undo'), share_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true
|
= link_to t('undo'), share_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true
|
||||||
|
|
||||||
.indicator{:title => "from #{what_soup_sentence(post)}"}
|
.indicator{:title => "#{what_stream_sentence(post)}"}
|
||||||
= stream_settings_link(post)
|
= stream_settings_link(post)
|
||||||
|
|
||||||
.sm_body
|
.sm_body
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
%b=link_to t('aspects.index.tags_following'), tag_followings_path, :class => 'home_selector'
|
%b=link_to t('streams.followed_tag.title'), tag_followings_path, :class => 'home_selector'
|
||||||
|
|
||||||
%ul.sub_nav
|
%ul.sub_nav
|
||||||
- if tags.size > 0
|
- if tags.size > 0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
#this breaks seed scripts
|
#this breaks seed scripts
|
||||||
|
|
||||||
|
if AppConfig[:featured_users].present? && AppConfig[:community_spotlight].blank?
|
||||||
|
AppConfig[:community_spotlight] = AppConfig[:featured_users]
|
||||||
|
puts "DEPRICATION WARNING (10/21/11): Please change `featured_users` in your applicaiton.yml to `community_spotlight`. Thanks!"
|
||||||
|
end
|
||||||
|
|
||||||
unless !ActiveRecord::Base.connection.table_exists?('people') || Rails.env == 'test' || AppConfig[:community_spotlight].nil? || AppConfig[:community_spotlight].count == Person.community_spotlight.count
|
unless !ActiveRecord::Base.connection.table_exists?('people') || Rails.env == 'test' || AppConfig[:community_spotlight].nil? || AppConfig[:community_spotlight].count == Person.community_spotlight.count
|
||||||
print "Fetching community spotlight users from remote servers"
|
print "Fetching community spotlight users from remote servers"
|
||||||
AppConfig[:community_spotlight].each do |x|
|
AppConfig[:community_spotlight].each do |x|
|
||||||
|
|
|
||||||
|
|
@ -104,12 +104,6 @@ en:
|
||||||
updating: "updating"
|
updating: "updating"
|
||||||
aspect_contacts:
|
aspect_contacts:
|
||||||
done_editing: "done editing"
|
done_editing: "done editing"
|
||||||
aspect_stream:
|
|
||||||
stream: "Stream"
|
|
||||||
mentions: "Mentions"
|
|
||||||
recently: "recently:"
|
|
||||||
commented_on: "commented on"
|
|
||||||
posted: "posted"
|
|
||||||
show:
|
show:
|
||||||
edit_aspect: "edit aspect"
|
edit_aspect: "edit aspect"
|
||||||
no_posts_message:
|
no_posts_message:
|
||||||
|
|
@ -129,7 +123,6 @@ en:
|
||||||
view_all_contacts: "View all contacts"
|
view_all_contacts: "View all contacts"
|
||||||
no_contacts: "You don't have any contacts here yet."
|
no_contacts: "You don't have any contacts here yet."
|
||||||
manage_your_aspects: "Manage your aspects."
|
manage_your_aspects: "Manage your aspects."
|
||||||
|
|
||||||
new:
|
new:
|
||||||
name: "Name (only visible to you)"
|
name: "Name (only visible to you)"
|
||||||
create: "Create"
|
create: "Create"
|
||||||
|
|
@ -159,13 +152,12 @@ en:
|
||||||
acquaintances: "Acquaintances"
|
acquaintances: "Acquaintances"
|
||||||
friends: "Friends"
|
friends: "Friends"
|
||||||
index:
|
index:
|
||||||
mentions: "Mentions"
|
welcome: "Welcome"
|
||||||
community_spotlight: "Community Spotlight"
|
community_spotlight: "Community Spotlight"
|
||||||
see_more_from_us: "See more of the D* community."
|
see_more_from_us: "See more of the D* community."
|
||||||
donate: "Donate"
|
donate: "Donate"
|
||||||
keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
|
keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
|
||||||
your_aspects: "Your Aspects"
|
your_aspects: "Your Aspects"
|
||||||
tags_following: "Followed Tags"
|
|
||||||
no_tags: "+ Find a tag to follow"
|
no_tags: "+ Find a tag to follow"
|
||||||
unfollow_tag: "Stop following #%{tag}"
|
unfollow_tag: "Stop following #%{tag}"
|
||||||
handle_explanation: "This is your diaspora id. Like an email address, you can give this to people to reach you."
|
handle_explanation: "This is your diaspora id. Like an email address, you can give this to people to reach you."
|
||||||
|
|
@ -833,18 +825,36 @@ en:
|
||||||
no_applications: "You haven't registered any applications yet."
|
no_applications: "You haven't registered any applications yet."
|
||||||
|
|
||||||
streams:
|
streams:
|
||||||
|
recently: "recently:"
|
||||||
|
commented_on: "commented on"
|
||||||
|
posted: "posted"
|
||||||
|
community_spotlight_stream: "Community Spotlight"
|
||||||
|
aspects_stream: "Aspects"
|
||||||
|
mentioned_stream: "@Mentions"
|
||||||
|
followed_tags_stream: "#Followed Tags"
|
||||||
|
|
||||||
mentions:
|
mentions:
|
||||||
title: "Your Mentions"
|
title: "@Mentions"
|
||||||
contacts_title: "People who mentioned you"
|
contacts_title: "People who mentioned you"
|
||||||
|
|
||||||
|
followed_tag:
|
||||||
|
title: "#Followed Tags"
|
||||||
|
contacts_title: "People who dig these tags"
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
title: "Posts tagged: %{tags}"
|
title: "Posts tagged: %{tags}"
|
||||||
contacts_title: "People who dig these tags"
|
contacts_title: "People who dig this tag"
|
||||||
|
|
||||||
public:
|
public:
|
||||||
title: "Public Activity"
|
title: "Public Activity"
|
||||||
contacts_title: "Recent Posters"
|
contacts_title: "Recent Posters"
|
||||||
soup:
|
|
||||||
title: "The Soup"
|
multi:
|
||||||
contacts_title: "People in your Soup"
|
title: "Stream"
|
||||||
|
contacts_title: "People in your Stream"
|
||||||
|
|
||||||
|
aspects:
|
||||||
|
title: "Your Aspects"
|
||||||
|
|
||||||
users:
|
users:
|
||||||
logged_out:
|
logged_out:
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ Diaspora::Application.routes.draw do
|
||||||
|
|
||||||
get 'community_spotlight' => "contacts#spotlight", :as => 'community_spotlight'
|
get 'community_spotlight' => "contacts#spotlight", :as => 'community_spotlight'
|
||||||
|
|
||||||
get 'soup' => "soups#index", :as => 'soup'
|
get 'stream' => "multis#index", :as => 'multi'
|
||||||
|
|
||||||
resources :people, :except => [:edit, :update] do
|
resources :people, :except => [:edit, :update] do
|
||||||
resources :status_messages
|
resources :status_messages
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,8 @@ ActiveRecord::Schema.define(:version => 20111021184041) do
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "aspect_visibilities", ["aspect_id"], :name => "index_aspect_visibilities_on_aspect_id"
|
add_index "aspect_visibilities", ["aspect_id"], :name => "index_aspect_visibilities_on_aspect_id"
|
||||||
add_index "aspect_visibilities", ["shareable_id", "aspect_id"], :name => "index_aspect_visibilities_on_post_id_and_aspect_id", :unique => true
|
|
||||||
add_index "aspect_visibilities", ["shareable_id", "shareable_type", "aspect_id"], :name => "shareable_and_aspect_id"
|
add_index "aspect_visibilities", ["shareable_id", "shareable_type", "aspect_id"], :name => "shareable_and_aspect_id"
|
||||||
add_index "aspect_visibilities", ["shareable_id", "shareable_type"], :name => "index_aspect_visibilities_on_shareable_id_and_shareable_type"
|
add_index "aspect_visibilities", ["shareable_id", "shareable_type"], :name => "index_aspect_visibilities_on_shareable_id_and_shareable_type"
|
||||||
add_index "aspect_visibilities", ["shareable_id"], :name => "index_aspect_visibilities_on_post_id"
|
|
||||||
|
|
||||||
create_table "aspects", :force => true do |t|
|
create_table "aspects", :force => true do |t|
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
|
|
@ -61,7 +59,7 @@ ActiveRecord::Schema.define(:version => 20111021184041) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.integer "likes_count", :default => 0, :null => false
|
t.integer "likes_count", :default => 0, :null => false
|
||||||
t.string "commentable_type", :default => "Post", :null => false
|
t.string "commentable_type", :limit => 60, :default => "Post", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "comments", ["author_id"], :name => "index_comments_on_person_id"
|
add_index "comments", ["author_id"], :name => "index_comments_on_person_id"
|
||||||
|
|
@ -373,12 +371,10 @@ ActiveRecord::Schema.define(:version => 20111021184041) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.boolean "hidden", :default => false, :null => false
|
t.boolean "hidden", :default => false, :null => false
|
||||||
t.integer "contact_id", :null => false
|
t.integer "contact_id", :null => false
|
||||||
t.string "shareable_type", :default => "Post", :null => false
|
t.string "shareable_type", :limit => 60, :default => "Post", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "share_visibilities", ["contact_id", "shareable_id"], :name => "index_post_visibilities_on_contact_id_and_post_id", :unique => true
|
|
||||||
add_index "share_visibilities", ["contact_id"], :name => "index_post_visibilities_on_contact_id"
|
add_index "share_visibilities", ["contact_id"], :name => "index_post_visibilities_on_contact_id"
|
||||||
add_index "share_visibilities", ["shareable_id", "hidden", "contact_id"], :name => "index_post_visibilities_on_post_id_and_hidden_and_contact_id", :unique => true
|
|
||||||
add_index "share_visibilities", ["shareable_id", "shareable_type", "contact_id"], :name => "shareable_and_contact_id"
|
add_index "share_visibilities", ["shareable_id", "shareable_type", "contact_id"], :name => "shareable_and_contact_id"
|
||||||
add_index "share_visibilities", ["shareable_id", "shareable_type", "hidden", "contact_id"], :name => "shareable_and_hidden_and_contact_id"
|
add_index "share_visibilities", ["shareable_id", "shareable_type", "hidden", "contact_id"], :name => "shareable_and_hidden_and_contact_id"
|
||||||
add_index "share_visibilities", ["shareable_id"], :name => "index_post_visibilities_on_post_id"
|
add_index "share_visibilities", ["shareable_id"], :name => "index_post_visibilities_on_post_id"
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class Stream::Aspect < Stream::Base
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def title
|
def title
|
||||||
if self.for_all_aspects?
|
if self.for_all_aspects?
|
||||||
I18n.t('aspects.aspect_stream.stream')
|
I18n.t('streams.aspects.title')
|
||||||
else
|
else
|
||||||
self.aspects.to_sentence
|
self.aspects.to_sentence
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class Stream::FollowedTag < Stream::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
I18n.t('aspects.index.tags_following')
|
I18n.t('streams.followed_tag.title')
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [ActiveRecord::Association<Post>] AR association of posts
|
# @return [ActiveRecord::Association<Post>] AR association of posts
|
||||||
|
|
@ -19,11 +19,9 @@ class Stream::FollowedTag < Stream::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def contacts_title
|
def contacts_title
|
||||||
I18n.translate('streams.tags.contacts_title')
|
I18n.translate('streams.followed_tag.contacts_title')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def tag_string
|
def tag_string
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
class Stream::Soup < Stream::Base
|
class Stream::Multi < Stream::Base
|
||||||
|
|
||||||
|
# @return [String] URL
|
||||||
def link(opts)
|
def link(opts)
|
||||||
Rails.application.routes.url_helpers.soup_path
|
Rails.application.routes.url_helpers.multi_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [String]
|
||||||
def title
|
def title
|
||||||
I18n.t('streams.soup.title')
|
I18n.t('streams.multi.title')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [String]
|
||||||
def contacts_title
|
def contacts_title
|
||||||
I18n.t('streams.soup.contacts_title')
|
I18n.t('streams.multi.contacts_title')
|
||||||
end
|
end
|
||||||
|
|
||||||
def posts
|
def posts
|
||||||
|
|
@ -19,6 +23,7 @@ class Stream::Soup < Stream::Base
|
||||||
end.call
|
end.call
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
def ajax_stream?
|
def ajax_stream?
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
@ -26,21 +31,32 @@ class Stream::Soup < Stream::Base
|
||||||
#emits an enum of the groups which the post appeared
|
#emits an enum of the groups which the post appeared
|
||||||
# :spotlight, :aspects, :tags, :mentioned
|
# :spotlight, :aspects, :tags, :mentioned
|
||||||
def post_from_group(post)
|
def post_from_group(post)
|
||||||
[:mentioned, :aspects, :followed_tags, :community_spotlight].collect do |source|
|
streams_included.collect do |source|
|
||||||
is_in?(source, post)
|
is_in?(source, post)
|
||||||
end.compact
|
end.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
# @return [Array<Symbol>]
|
||||||
|
def streams_included
|
||||||
|
@streams_included ||= lambda do
|
||||||
|
array = [:mentioned, :aspects, :followed_tags]
|
||||||
|
array << :community_spotlight if include_community_spotlight?
|
||||||
|
array
|
||||||
|
end.call
|
||||||
|
end
|
||||||
|
|
||||||
|
# @return [Symbol]
|
||||||
def is_in?(sym, post)
|
def is_in?(sym, post)
|
||||||
if self.send("#{sym.to_s}_post_ids").find{|x| x == post.id}
|
if self.send("#{sym.to_s}_post_ids").find{|x| x == post.id}
|
||||||
"#{sym.to_s}_soup".to_sym
|
"#{sym.to_s}_stream".to_sym
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
def include_community_spotlight?
|
def include_community_spotlight?
|
||||||
user.show_community_spotlight_in_stream?
|
AppConfig[:community_spotlight].present? && user.show_community_spotlight_in_stream?
|
||||||
end
|
end
|
||||||
|
|
||||||
def aspects_post_ids
|
def aspects_post_ids
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
Diaspora.Pages.SoupsIndex = function() {
|
Diaspora.Pages.MultisIndex = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.subscribe("page/ready", function(evt, document) {
|
this.subscribe("page/ready", function(evt, document) {
|
||||||
|
|
@ -3507,15 +3507,15 @@ ul#getting_started
|
||||||
:padding 0
|
:padding 0
|
||||||
:margin 0
|
:margin 0
|
||||||
|
|
||||||
.community_spotlight_soup
|
.community_spotlight_stream
|
||||||
.indicator
|
.indicator
|
||||||
:background-color #DE5099
|
:background-color #DE5099
|
||||||
.followed_tags_soup
|
.followed_tags_stream
|
||||||
.indicator
|
.indicator
|
||||||
:background-color $blue
|
:background-color $blue
|
||||||
.aspects_soup
|
.aspects_stream
|
||||||
.indicator
|
.indicator
|
||||||
:background-color $green
|
:background-color $green
|
||||||
.mentioned_soup
|
.mentioned_stream
|
||||||
.indicator
|
.indicator
|
||||||
:background-color #E3E856
|
:background-color #E3E856
|
||||||
|
|
|
||||||
|
|
@ -12,20 +12,10 @@ describe HomeController do
|
||||||
response.should_not be_redirect
|
response.should_not be_redirect
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'redirects to aspects index if user is logged in' do
|
it 'redirects to multis index if user is logged in' do
|
||||||
sign_in alice
|
sign_in alice
|
||||||
get :show, :home => true
|
get :show, :home => true
|
||||||
response.should redirect_to( :controller => 'aspects', :action => 'index')
|
response.should redirect_to(multi_path)
|
||||||
end
|
|
||||||
|
|
||||||
it 'redirects to aspects index with stored aspects' do
|
|
||||||
sign_in alice
|
|
||||||
@aspect0 = alice.aspects.all[0]
|
|
||||||
@aspect1 = alice.aspects.create(:name => "Yeaaaah!")
|
|
||||||
@index_params = {:a_ids => [@aspect0.id.to_s, @aspect1.id.to_s]}
|
|
||||||
alice.save
|
|
||||||
get :show
|
|
||||||
response.should redirect_to( :controller => 'aspects', :action => 'index')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "custom logging on success" do
|
describe "custom logging on success" do
|
||||||
|
|
|
||||||
30
spec/controllers/multis_controller_spec.rb
Normal file
30
spec/controllers/multis_controller_spec.rb
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||||
|
# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe MultisController do
|
||||||
|
describe '#index' do
|
||||||
|
before do
|
||||||
|
@old_spotlight_value = AppConfig[:community_spotlight]
|
||||||
|
sign_in :user, alice
|
||||||
|
end
|
||||||
|
|
||||||
|
after do
|
||||||
|
AppConfig[:community_spotlight] = @old_spotlight_value
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'succeeds' do
|
||||||
|
AppConfig[:community_spotlight] = [bob.person.diaspora_handle]
|
||||||
|
get :index
|
||||||
|
response.should be_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'succeeds without AppConfig[:community_spotlight]' do
|
||||||
|
AppConfig[:community_spotlight] = nil
|
||||||
|
get :index
|
||||||
|
response.should be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require File.join(Rails.root, 'spec', 'shared_behaviors', 'stream')
|
require File.join(Rails.root, 'spec', 'shared_behaviors', 'stream')
|
||||||
|
|
||||||
describe Stream::Soup do
|
describe Stream::Multi do
|
||||||
before do
|
before do
|
||||||
@stream = Stream::Soup.new(Factory(:user), :max_time => Time.now, :order => 'updated_at')
|
@stream = Stream::Multi.new(Factory(:user), :max_time => Time.now, :order => 'updated_at')
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'shared behaviors' do
|
describe 'shared behaviors' do
|
||||||
Loading…
Reference in a new issue