From 01fd1f23c732f937c057046492bf9f7c4838fb7e Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Sun, 2 Oct 2011 10:01:03 -0700 Subject: [PATCH] moving stuff around --- app/controllers/aspects_controller.rb | 2 +- app/controllers/mentions_controller.rb | 2 +- app/controllers/tag_followings_controller.rb | 2 +- lib/{streams => }/base_stream.rb | 0 lib/{streams => stream}/aspect_stream.rb | 2 +- lib/{streams => stream}/mention_stream.rb | 11 +---------- lib/{streams => stream}/tag_stream.rb | 1 - spec/lib/{streams => }/base_stream_spec.rb | 0 spec/lib/{streams => stream}/aspect_stream_spec.rb | 0 spec/lib/{streams => stream}/mention_stream_spec.rb | 0 spec/lib/{streams => stream}/tag_stream_spec.rb | 0 11 files changed, 5 insertions(+), 15 deletions(-) rename lib/{streams => }/base_stream.rb (100%) rename lib/{streams => stream}/aspect_stream.rb (99%) rename lib/{streams => stream}/mention_stream.rb (68%) rename lib/{streams => stream}/tag_stream.rb (98%) rename spec/lib/{streams => }/base_stream_spec.rb (100%) rename spec/lib/{streams => stream}/aspect_stream_spec.rb (100%) rename spec/lib/{streams => stream}/mention_stream_spec.rb (100%) rename spec/lib/{streams => stream}/tag_stream_spec.rb (100%) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 5133a8ff5..051fb97e2 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -require File.join(Rails.root, "lib", 'streams', "aspect_stream") +require File.join(Rails.root, "lib", 'stream', "aspect_stream") class AspectsController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/mentions_controller.rb b/app/controllers/mentions_controller.rb index ad09bb588..16c1ea16d 100644 --- a/app/controllers/mentions_controller.rb +++ b/app/controllers/mentions_controller.rb @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -require File.join(Rails.root, 'lib','streams', 'mention_stream') +require File.join(Rails.root, 'lib','stream', 'mention_stream') class MentionsController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/tag_followings_controller.rb b/app/controllers/tag_followings_controller.rb index eb530f349..308478523 100644 --- a/app/controllers/tag_followings_controller.rb +++ b/app/controllers/tag_followings_controller.rb @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. # -require File.join(Rails.root, 'lib', 'streams', 'tag_stream') +require File.join(Rails.root, 'lib', 'stream', 'tag_stream') class TagFollowingsController < ApplicationController before_filter :authenticate_user! diff --git a/lib/streams/base_stream.rb b/lib/base_stream.rb similarity index 100% rename from lib/streams/base_stream.rb rename to lib/base_stream.rb diff --git a/lib/streams/aspect_stream.rb b/lib/stream/aspect_stream.rb similarity index 99% rename from lib/streams/aspect_stream.rb rename to lib/stream/aspect_stream.rb index 8dc22b1e1..245753a6a 100644 --- a/lib/streams/aspect_stream.rb +++ b/lib/stream/aspect_stream.rb @@ -1,7 +1,7 @@ # 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 'base_stream' + class AspectStream < BaseStream TYPES_OF_POST_IN_STREAM = ['StatusMessage', 'Reshare', 'ActivityStreams::Photo'] diff --git a/lib/streams/mention_stream.rb b/lib/stream/mention_stream.rb similarity index 68% rename from lib/streams/mention_stream.rb rename to lib/stream/mention_stream.rb index 3eaf00fb1..fbf954ebb 100644 --- a/lib/streams/mention_stream.rb +++ b/lib/stream/mention_stream.rb @@ -1,17 +1,8 @@ # 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 'base_stream' + class MentionStream< BaseStream - - - # @param user [User] - # @param inputted_aspect_ids [Array] Ids of aspects for given stream - # @param aspect_ids [Array] Aspects this stream is responsible for - # @opt max_time [Integer] Unix timestamp of stream's post ceiling - # @opt order [String] Order of posts (i.e. 'created_at', 'updated_at') - # @return [void] - def link(opts={}) Rails.application.routes.url_helpers.mentions_path(opts) end diff --git a/lib/streams/tag_stream.rb b/lib/stream/tag_stream.rb similarity index 98% rename from lib/streams/tag_stream.rb rename to lib/stream/tag_stream.rb index 3e108b43d..bf1855157 100644 --- a/lib/streams/tag_stream.rb +++ b/lib/stream/tag_stream.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -require 'base_stream' class TagStream < BaseStream def link(opts={}) diff --git a/spec/lib/streams/base_stream_spec.rb b/spec/lib/base_stream_spec.rb similarity index 100% rename from spec/lib/streams/base_stream_spec.rb rename to spec/lib/base_stream_spec.rb diff --git a/spec/lib/streams/aspect_stream_spec.rb b/spec/lib/stream/aspect_stream_spec.rb similarity index 100% rename from spec/lib/streams/aspect_stream_spec.rb rename to spec/lib/stream/aspect_stream_spec.rb diff --git a/spec/lib/streams/mention_stream_spec.rb b/spec/lib/stream/mention_stream_spec.rb similarity index 100% rename from spec/lib/streams/mention_stream_spec.rb rename to spec/lib/stream/mention_stream_spec.rb diff --git a/spec/lib/streams/tag_stream_spec.rb b/spec/lib/stream/tag_stream_spec.rb similarity index 100% rename from spec/lib/streams/tag_stream_spec.rb rename to spec/lib/stream/tag_stream_spec.rb