From 1d2439ee76776f388ae143d16617ee2e1cbbb035 Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Sun, 2 Oct 2011 09:46:05 -0700
Subject: [PATCH] clean up stream directory structure

---
 app/controllers/aspects_controller.rb         | 2 +-
 app/controllers/mentions_controller.rb        | 7 ++++++-
 app/controllers/tag_followings_controller.rb  | 7 ++++++-
 lib/{ => streams}/aspect_stream.rb            | 0
 lib/{ => streams}/base_stream.rb              | 0
 lib/{ => streams}/mention_stream.rb           | 2 +-
 lib/{ => streams}/tag_stream.rb               | 1 +
 spec/lib/{ => streams}/aspect_stream_spec.rb  | 0
 spec/lib/{ => streams}/base_stream_spec.rb    | 0
 spec/lib/{ => streams}/mention_stream_spec.rb | 0
 spec/lib/{ => streams}/tag_stream_spec.rb     | 0
 11 files changed, 15 insertions(+), 4 deletions(-)
 rename lib/{ => streams}/aspect_stream.rb (100%)
 rename lib/{ => streams}/base_stream.rb (100%)
 rename lib/{ => streams}/mention_stream.rb (98%)
 rename lib/{ => streams}/tag_stream.rb (98%)
 rename spec/lib/{ => streams}/aspect_stream_spec.rb (100%)
 rename spec/lib/{ => streams}/base_stream_spec.rb (100%)
 rename spec/lib/{ => streams}/mention_stream_spec.rb (100%)
 rename spec/lib/{ => streams}/tag_stream_spec.rb (100%)

diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb
index b19671e2a4..5133a8ff5a 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", "aspect_stream")
+require File.join(Rails.root, "lib", 'streams', "aspect_stream")
 
 class AspectsController < ApplicationController
   before_filter :authenticate_user!
diff --git a/app/controllers/mentions_controller.rb b/app/controllers/mentions_controller.rb
index 862b901743..ad09bb5880 100644
--- a/app/controllers/mentions_controller.rb
+++ b/app/controllers/mentions_controller.rb
@@ -1,4 +1,9 @@
-require File.join(Rails.root, '/lib/mention_stream')
+#   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','streams', 'mention_stream')
+
 class MentionsController < ApplicationController
   before_filter :authenticate_user!
   before_filter :save_sort_order, :only => :index
diff --git a/app/controllers/tag_followings_controller.rb b/app/controllers/tag_followings_controller.rb
index 7a0865312c..eb530f3495 100644
--- a/app/controllers/tag_followings_controller.rb
+++ b/app/controllers/tag_followings_controller.rb
@@ -1,4 +1,9 @@
-require File.join(Rails.root, '/lib/tag_stream')
+#   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', 'streams', 'tag_stream')
+
 class TagFollowingsController < ApplicationController
   before_filter :authenticate_user!
   before_filter :save_sort_order, :only => :index
diff --git a/lib/aspect_stream.rb b/lib/streams/aspect_stream.rb
similarity index 100%
rename from lib/aspect_stream.rb
rename to lib/streams/aspect_stream.rb
diff --git a/lib/base_stream.rb b/lib/streams/base_stream.rb
similarity index 100%
rename from lib/base_stream.rb
rename to lib/streams/base_stream.rb
diff --git a/lib/mention_stream.rb b/lib/streams/mention_stream.rb
similarity index 98%
rename from lib/mention_stream.rb
rename to lib/streams/mention_stream.rb
index c182d85490..3eaf00fb13 100644
--- a/lib/mention_stream.rb
+++ b/lib/streams/mention_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 MentionStream< BaseStream
 
 
diff --git a/lib/tag_stream.rb b/lib/streams/tag_stream.rb
similarity index 98%
rename from lib/tag_stream.rb
rename to lib/streams/tag_stream.rb
index bf18551570..3e108b43dd 100644
--- a/lib/tag_stream.rb
+++ b/lib/streams/tag_stream.rb
@@ -2,6 +2,7 @@
 #   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/aspect_stream_spec.rb b/spec/lib/streams/aspect_stream_spec.rb
similarity index 100%
rename from spec/lib/aspect_stream_spec.rb
rename to spec/lib/streams/aspect_stream_spec.rb
diff --git a/spec/lib/base_stream_spec.rb b/spec/lib/streams/base_stream_spec.rb
similarity index 100%
rename from spec/lib/base_stream_spec.rb
rename to spec/lib/streams/base_stream_spec.rb
diff --git a/spec/lib/mention_stream_spec.rb b/spec/lib/streams/mention_stream_spec.rb
similarity index 100%
rename from spec/lib/mention_stream_spec.rb
rename to spec/lib/streams/mention_stream_spec.rb
diff --git a/spec/lib/tag_stream_spec.rb b/spec/lib/streams/tag_stream_spec.rb
similarity index 100%
rename from spec/lib/tag_stream_spec.rb
rename to spec/lib/streams/tag_stream_spec.rb
-- 
GitLab