diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cc50de1f9..5f89717c9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -88,7 +88,7 @@ class ApplicationController < ActionController::Base def redirect_unless_admin unless current_user.admin? - redirect_to explore_url, :notice => 'you need to be an admin to do that' + redirect_to stream_url, :notice => 'you need to be an admin to do that' return end end @@ -116,7 +116,7 @@ class ApplicationController < ActionController::Base end def after_sign_in_path_for(resource) - stored_location_for(:user) || (current_user.getting_started? ? getting_started_path : explore_path) + stored_location_for(:user) || (current_user.getting_started? ? getting_started_path : stream_path) end def max_time diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 3922c4372..222e9fd35 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -6,7 +6,7 @@ class HomeController < ApplicationController def show if current_user - redirect_to explore_path if current_user + redirect_to stream_path if current_user elsif is_mobile_device? redirect_to user_session_path else diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 61f35030e..cc1132c3e 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -52,7 +52,7 @@ class NotificationsController < ApplicationController def read_all Notification.where(:recipient_id => current_user.id).update_all(:unread => false) respond_to do |format| - format.html { redirect_to explore_path } + format.html { redirect_to stream_path } format.xml { render :xml => {}.to_xml } format.json { render :json => {}.to_json } end diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 99a915d65..49669558e 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -50,7 +50,7 @@ class PostsController < ApplicationController respond_to do |format| format.js {render 'destroy'} format.json { render :nothing => true, :status => 204 } - format.all {redirect_to explore_path} + format.all {redirect_to stream_path} end else Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'" diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index f9a85c785..8553fb079 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -66,7 +66,7 @@ class StatusMessagesController < ApplicationController respond_to do |format| format.html { redirect_to :back} - format.mobile{ redirect_to explore_path} + format.mobile{ redirect_to stream_path} format.json{ render :json => @status_message.as_api_response(:backbone), :status => 201 } end else diff --git a/app/controllers/streams_controller.rb b/app/controllers/streams_controller.rb index 08c37c0f3..161910c7f 100644 --- a/app/controllers/streams_controller.rb +++ b/app/controllers/streams_controller.rb @@ -8,7 +8,7 @@ require File.join(Rails.root, "lib", "stream", "comments") require File.join(Rails.root, "lib", "stream", "likes") require File.join(Rails.root, "lib", "stream", "mention") require File.join(Rails.root, "lib", "stream", "followed_tag") -require File.join(Rails.root, "lib", "stream", "participate") +require File.join(Rails.root, "lib", "stream", "activity") class StreamsController < ApplicationController @@ -31,8 +31,8 @@ class StreamsController < ApplicationController stream_responder(Stream::Public) end - def participate - stream_responder(Stream::Participate) + def activity + stream_responder(Stream::Activity) end def multi diff --git a/app/controllers/tag_followings_controller.rb b/app/controllers/tag_followings_controller.rb index 6fdd90e4b..4af054e28 100644 --- a/app/controllers/tag_followings_controller.rb +++ b/app/controllers/tag_followings_controller.rb @@ -63,6 +63,6 @@ class TagFollowingsController < ApplicationController @tag_following = current_user.tag_followings.create(:tag_id => @tag.id) end end - redirect_to explore_path + redirect_to stream_path end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2e098f03d..bd3abe67f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -87,7 +87,7 @@ class UsersController < ApplicationController if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password]) current_user.close_account! sign_out current_user - redirect_to(explore_path, :notice => I18n.t('users.destroy.success')) + redirect_to(stream_path, :notice => I18n.t('users.destroy.success')) else if params[:user].present? && params[:user][:current_password].present? flash[:error] = t 'users.destroy.wrong_password' @@ -111,7 +111,7 @@ class UsersController < ApplicationController format.any { redirect_to person_path(user.person) } end else - redirect_to explore_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username]) + redirect_to stream_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username]) end end @@ -127,14 +127,14 @@ class UsersController < ApplicationController def logged_out @page = :logged_out if user_signed_in? - redirect_to explore_path + redirect_to stream_path end end def getting_started_completed user = current_user user.update_attributes(:getting_started => false) - redirect_to explore_path + redirect_to stream_path end def export diff --git a/app/helpers/stream_helper.rb b/app/helpers/stream_helper.rb index b23bf25f1..c01579ca9 100644 --- a/app/helpers/stream_helper.rb +++ b/app/helpers/stream_helper.rb @@ -13,7 +13,7 @@ module StreamHelper elsif controller.instance_of?(PostsController) public_stream_path(:max_time => time_for_scroll(@stream)) elsif controller.instance_of?(StreamsController) - explore_path(:max_time => time_for_scroll(@stream)) + stream_path(:max_time => time_for_scroll(@stream)) else raise 'in order to use pagination for this new controller, update next_page_path in stream helper' end diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index f7fd75414..4479d4b75 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -49,7 +49,7 @@ .navbar.navbar-fixed-top .navbar-inner .container{:style => "position: relative;"} - = link_to(image_tag('header-logo2x.png', :height => 40, :width => 40, :id => 'header_title'), explore_path) + = link_to(image_tag('header-logo2x.png', :height => 40, :width => 40, :id => 'header_title'), stream_path) - if user_signed_in? .right diff --git a/app/views/layouts/main_stream.html.haml b/app/views/layouts/main_stream.html.haml index 56b72dedf..93476712f 100644 --- a/app/views/layouts/main_stream.html.haml +++ b/app/views/layouts/main_stream.html.haml @@ -31,7 +31,7 @@ .section %ul.left_nav %li - = link_to t("streams.participate.title"), participate_path, :class => 'home_selector', :rel => 'backbone' + = link_to t("streams.activity.title"), activity_stream_path, :class => 'home_selector', :rel => 'backbone' %ul.left_nav.sub %li @@ -41,7 +41,7 @@ %ul.left_nav %li - = link_to t("streams.multi.title"), explore_path, :class => 'home_selector', :rel => 'backbone' + = link_to t("streams.multi.title"), stream_path, :class => 'home_selector', :rel => 'backbone' = render 'aspects/aspect_listings', :stream => @stream diff --git a/app/views/users/logged_out.haml b/app/views/users/logged_out.haml index 3a954ff9a..99bd61e1d 100644 --- a/app/views/users/logged_out.haml +++ b/app/views/users/logged_out.haml @@ -22,7 +22,7 @@ %h4 = t('.simply_visit') %strong - = link_to AppConfig[:pod_url], explore_path + = link_to AppConfig[:pod_url], stream_path = t('.on_your_mobile_device') %p.dull diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 94ab50018..c7a691054 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -927,14 +927,13 @@ en: multi: title: "Stream" - contacts_title: "People in your Explore Stream" + contacts_title: "People in your Stream" aspects: title: "My Aspects" - participate: + activity: title: "My Activity" - users: logged_out: signed_out: "You've signed out of Diaspora*" diff --git a/config/routes.rb b/config/routes.rb index 9fb5a2fb1..4b32af38c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -22,8 +22,11 @@ Diaspora::Application.routes.draw do end # Streams - get "participate" => "streams#participate", :as => "participate" - get "explore" => "streams#multi", :as => "explore" + get "participate" => "streams#activity", :as => "activity_stream" # legacy + get "explore" => "streams#multi", :as => "stream" # legacy + + get "activity" => "streams#activity", :as => "activity_stream" + get "stream" => "streams#multi", :as => "stream" get "public" => "streams#public", :as => "public_stream" get "followed_tags" => "streams#followed_tags", :as => "followed_tags_stream" get "mentions" => "streams#mentioned", :as => "mentioned_stream" diff --git a/features/accepts_invitation.feature b/features/accepts_invitation.feature index d38c2df47..98635b492 100644 --- a/features/accepts_invitation.feature +++ b/features/accepts_invitation.feature @@ -16,7 +16,7 @@ Feature: invitation acceptance And I preemptively confirm the alert And I follow "awesome_button" - Then I should be on the explore page + Then I should be on the stream page Scenario: accept invitation from user Given I have been invited by a user @@ -34,7 +34,7 @@ Feature: invitation acceptance And I preemptively confirm the alert And I follow "awesome_button" - Then I should be on the explore page + Then I should be on the stream page Scenario: sends an invitation Given a user with email "bob@bob.bob" diff --git a/features/participate_stream.feature b/features/activity_stream.feature similarity index 87% rename from features/participate_stream.feature rename to features/activity_stream.feature index ea2b14e93..4b744a329 100644 --- a/features/participate_stream.feature +++ b/features/activity_stream.feature @@ -1,5 +1,5 @@ @javascript -Feature: The participate stream +Feature: The activity stream Scenario: Sorting Given a user with username "bob" When I sign in as "bob@bob.bob" @@ -8,7 +8,7 @@ Feature: The participate stream And I post "B- barack obama is your new bicycle" And I post "C- barack obama is a square" - When I go to the participate page + When I go to the activity stream page Then "C- barack obama is a square" should be post 1 And "B- barack obama is your new bicycle" should be post 2 And "A- I like turtles" should be post 3 @@ -20,7 +20,7 @@ Feature: The participate stream And I like the post "B- barack obama is your new bicycle" And I wait for 1 second - When I go to the participate page + When I go to the activity stream page Then "B- barack obama is your new bicycle" should be post 1 And "C- barack obama is a square" should be post 2 And "A- I like turtles" should be post 3 diff --git a/features/change_password.feature b/features/change_password.feature index 126259c65..a2e6559f8 100644 --- a/features/change_password.feature +++ b/features/change_password.feature @@ -11,7 +11,7 @@ Feature: Change password Then I should see "Password changed" Then I should be on the new user session page When I sign in with password "newsecret" - Then I should be on the explore page + Then I should be on the stream page Scenario: Reset my password Given a user with email "forgetful@users.net" diff --git a/features/logs_in_and_out.feature b/features/logs_in_and_out.feature index e41bf52bc..abd19fb61 100644 --- a/features/logs_in_and_out.feature +++ b/features/logs_in_and_out.feature @@ -6,7 +6,7 @@ Feature: user authentication And I fill in "Username" with "ohai" And I fill in "Password" with "secret" And I press "Sign in" - Then I should be on the explore page + Then I should be on the stream page @javascript Scenario: user logs out @@ -19,5 +19,5 @@ Feature: user authentication Scenario: user uses token auth Given a user with username "ohai" and password "secret" When I post a photo with a token - And I go to the explore page + And I go to the stream page Then I should be on the new user session page diff --git a/features/signs_up.feature b/features/signs_up.feature index 99d0d1160..64a20ab98 100644 --- a/features/signs_up.feature +++ b/features/signs_up.feature @@ -19,18 +19,18 @@ Feature: new user registration And I preemptively confirm the alert And I follow "awesome_button" - Then I should be on the explore page + Then I should be on the stream page And I should not see "awesome_button" Scenario: new user skips the setup wizard When I preemptively confirm the alert And I follow "awesome_button" - Then I should be on the explore page + Then I should be on the stream page Scenario: closing a popover clears getting started When I preemptively confirm the alert And I follow "awesome_button" - Then I should be on the explore page + Then I should be on the stream page And I have turned off jQuery effects And I wait for the popovers to appear And I click close on all the popovers diff --git a/features/support/paths.rb b/features/support/paths.rb index 83d7f6d18..862de6851 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -2,7 +2,7 @@ module NavigationHelpers def path_to(page_name) case page_name when /^the home(?: )?page$/ - explore_path + stream_path when /^step (\d)$/ if $1.to_i == 1 getting_started_path diff --git a/lib/stream/participate.rb b/lib/stream/activity.rb similarity index 59% rename from lib/stream/participate.rb rename to lib/stream/activity.rb index a7e412596..4a4b06f82 100644 --- a/lib/stream/participate.rb +++ b/lib/stream/activity.rb @@ -1,6 +1,6 @@ -class Stream::Participate < Stream::Base +class Stream::Activity < Stream::Base def link(opts={}) - Rails.application.routes.url_helpers.participate_path(opts) + Rails.application.routes.url_helpers.activity_streams_path(opts) end def order @@ -8,7 +8,7 @@ class Stream::Participate < Stream::Base end def title - I18n.translate("streams.participate.title") + I18n.translate("streams.activity.title") end # @return [ActiveRecord::Association] AR association of posts diff --git a/lib/stream/multi.rb b/lib/stream/multi.rb index e5f68cd4f..d6264da4c 100644 --- a/lib/stream/multi.rb +++ b/lib/stream/multi.rb @@ -2,7 +2,7 @@ class Stream::Multi < Stream::Base # @return [String] URL def link(opts) - Rails.application.routes.url_helpers.explore_path(opts) + Rails.application.routes.url_helpers.stream_path(opts) end # @return [String] diff --git a/public/javascripts/app/models/stream.js b/public/javascripts/app/models/stream.js index b8f31d8f7..39e5e78b7 100644 --- a/public/javascripts/app/models/stream.js +++ b/public/javascripts/app/models/stream.js @@ -58,7 +58,7 @@ app.models.Stream = Backbone.Collection.extend({ }, sortOrder : function() { - return this.basePath().match(/participate/) ? "interactedAt" : "createdAt" + return this.basePath().match(/activity/) ? "interactedAt" : "createdAt" }, add : function(models){ diff --git a/public/javascripts/app/router.js b/public/javascripts/app/router.js index 08003a583..3730a1253 100644 --- a/public/javascripts/app/router.js +++ b/public/javascripts/app/router.js @@ -1,7 +1,7 @@ app.Router = Backbone.Router.extend({ routes: { - "participate": "stream", - "explore": "stream", + "activity": "stream", + "stream": "stream", "aspects:query": "stream", "commented": "stream", "liked": "stream", diff --git a/public/javascripts/app/templates/header.handlebars b/public/javascripts/app/templates/header.handlebars index 93faf72df..71403c39d 100644 --- a/public/javascripts/app/templates/header.handlebars +++ b/public/javascripts/app/templates/header.handlebars @@ -1,18 +1,18 @@
- + - + {{t "my_stream"}} - + {{t "my_activity"}} diff --git a/spec/controllers/admins_controller_spec.rb b/spec/controllers/admins_controller_spec.rb index 70c69fa58..69299f01f 100644 --- a/spec/controllers/admins_controller_spec.rb +++ b/spec/controllers/admins_controller_spec.rb @@ -14,7 +14,7 @@ describe AdminsController do context 'admin not signed in' do it 'is behind redirect_unless_admin' do get :user_search - response.should redirect_to explore_path + response.should redirect_to stream_path end end @@ -64,7 +64,7 @@ describe AdminsController do context 'admin not signed in' do it 'is behind redirect_unless_admin' do get :admin_inviter - response.should redirect_to explore_path + response.should redirect_to stream_path end end diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index bd73a31f6..f25cd4158 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -14,7 +14,7 @@ describe HomeController do it 'redirects to multis index if user is logged in' do sign_in alice get :show, :home => true - response.should redirect_to(explore_path) + response.should redirect_to(stream_path) end end end diff --git a/spec/controllers/jasmine_fixtures/streams_spec.rb b/spec/controllers/jasmine_fixtures/streams_spec.rb index cb1bdb1d7..e1feb3499 100644 --- a/spec/controllers/jasmine_fixtures/streams_spec.rb +++ b/spec/controllers/jasmine_fixtures/streams_spec.rb @@ -10,7 +10,7 @@ describe StreamsController do sign_in :user, alice end - it 'generates the explore_json fixture', :fixture => true do + it 'generates the stream_json fixture', :fixture => true do posts = [] time = Time.now @@ -53,7 +53,7 @@ TXT get :multi, :format => :json response.should be_success - save_fixture(response.body, "explore_json") + save_fixture(response.body, "stream_json") Timecop.return end diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index f3596ad65..3f3e40842 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -59,7 +59,7 @@ describe NotificationsController do it "should redirect to the stream in the html version" do Factory(:notification, :recipient => @user) get :read_all, :format => :html - response.should redirect_to(explore_path) + response.should redirect_to(stream_path) end it "should return a dummy value in the json version" do Factory(:notification, :recipient => @user) diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 96a061304..c75c379a0 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -67,7 +67,7 @@ describe RegistrationsController do it "redirects to the home path" do get :create, @valid_params response.should be_redirect - response.location.should match /^#{explore_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 6632b1b45..e19e28c8e 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -27,14 +27,14 @@ describe SessionsController do it "redirects to /stream for a non-mobile user" do post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} response.should be_redirect - response.location.should match /^#{explore_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end it "redirects to /stream for a mobile user" do @request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7' post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} response.should be_redirect - response.location.should match /^#{explore_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end it 'queues up an update job' do diff --git a/spec/controllers/streams_controller_spec.rb b/spec/controllers/streams_controller_spec.rb index 87a278bf0..211d196bb 100644 --- a/spec/controllers/streams_controller_spec.rb +++ b/spec/controllers/streams_controller_spec.rb @@ -54,7 +54,7 @@ describe StreamsController do :liked => Stream::Likes, :mentioned => Stream::Mention, :followed_tags => Stream::FollowedTag, - :participate => Stream::Participate + :activity => Stream::Activity } streams.each do |stream_path, stream_class| diff --git a/spec/javascripts/app/views/feedback_view_spec.js b/spec/javascripts/app/views/feedback_view_spec.js index c4fa624c4..c270e6384 100644 --- a/spec/javascripts/app/views/feedback_view_spec.js +++ b/spec/javascripts/app/views/feedback_view_spec.js @@ -9,7 +9,7 @@ describe("app.views.Feedback", function(){ 'limited' : "Limted" }}) - var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"]; + var posts = $.parseJSON(spec.readFixture("stream_json"))["posts"]; this.post = new app.models.Post(posts[0]); this.view = new app.views.Feedback({model: this.post}); diff --git a/spec/javascripts/app/views/likes_info_view_spec.js b/spec/javascripts/app/views/likes_info_view_spec.js index 92d29a400..ec6a2e82d 100644 --- a/spec/javascripts/app/views/likes_info_view_spec.js +++ b/spec/javascripts/app/views/likes_info_view_spec.js @@ -9,7 +9,7 @@ describe("app.views.LikesInfo", function(){ } }) - var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"]; + var posts = $.parseJSON(spec.readFixture("stream_json"))["posts"]; this.post = new app.models.Post(posts[0]); // post with a like this.view = new app.views.LikesInfo({model: this.post}); }); diff --git a/spec/javascripts/app/views/post_view_spec.js b/spec/javascripts/app/views/post_view_spec.js index b615bba74..2f52e44a6 100644 --- a/spec/javascripts/app/views/post_view_spec.js +++ b/spec/javascripts/app/views/post_view_spec.js @@ -11,7 +11,7 @@ describe("app.views.Post", function(){ } }}) - var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"]; + var posts = $.parseJSON(spec.readFixture("stream_json"))["posts"]; this.collection = new app.collections.Posts(posts); this.statusMessage = this.collection.models[0]; diff --git a/spec/javascripts/app/views/stream_view_spec.js b/spec/javascripts/app/views/stream_view_spec.js index 16ca407e8..fa1ebdbfe 100644 --- a/spec/javascripts/app/views/stream_view_spec.js +++ b/spec/javascripts/app/views/stream_view_spec.js @@ -2,7 +2,7 @@ describe("app.views.Stream", function() { beforeEach(function() { loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); - this.posts = $.parseJSON(spec.readFixture("explore_json"))["posts"]; + this.posts = $.parseJSON(spec.readFixture("stream_json"))["posts"]; this.stream = new app.models.Stream(); this.stream.add(this.posts); diff --git a/spec/lib/stream/participate_spec.rb b/spec/lib/stream/activity_spec.rb similarity index 61% rename from spec/lib/stream/participate_spec.rb rename to spec/lib/stream/activity_spec.rb index ff9349d72..95f4c7676 100644 --- a/spec/lib/stream/participate_spec.rb +++ b/spec/lib/stream/activity_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' require File.join(Rails.root, 'spec', 'shared_behaviors', 'stream') -describe Stream::Participate do +describe Stream::Activity do before do - @stream = Stream::Participate.new(alice, :max_time => Time.now, :order => 'updated_at') + @stream = Stream::Activity.new(alice, :max_time => Time.now, :order => 'updated_at') end describe 'shared behaviors' do