myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3346] trunk: Removed blogs


From: noreply
Subject: [myexperiment-hackers] [3346] trunk: Removed blogs
Date: Thu, 24 Jan 2013 15:10:31 +0000 (UTC)

Revision
3346
Author
fbacall
Date
2013-01-24 15:10:30 +0000 (Thu, 24 Jan 2013)

Log Message

Removed blogs

Modified Paths

Added Paths

Removed Paths

Diff

Deleted: trunk/app/controllers/blog_posts_controller.rb (3345 => 3346)


--- trunk/app/controllers/blog_posts_controller.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/controllers/blog_posts_controller.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,139 +0,0 @@
-# myExperiment: app/controllers/blog_posts_controller.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-class BlogPostsController < ApplicationController
-  before_filter :login_required
-  
-  before_filter :find_blog_and_blog_posts, : [:index]
-  before_filter :find_blog_and_blog_post, : [:show, :edit, :update, :destroy]
-  before_filter :find_blog_auth, : [:new]
-  
-  # GET /blog_posts
-  def index
-    respond_to do |format|
-      format.html # index.rhtml
-    end
-  end
-
-  # GET /blog_posts/1
-  def show
-    respond_to do |format|
-      format.html # show.rhtml
-    end
-  end
-
-  # GET /blog_posts/new
-  def new
-    @blog_post = BlogPost.new(:blog => @blog)
-  end
-
-  # GET /blog_posts/1;edit
-  def edit
-
-  end
-
-  # POST /blog_posts
-  def create
-
-    return error('Creating new blog content is disabled', 'is disabled')
-    
-    @blog_post = BlogPost.new(params[:blog_post])
-
-    respond_to do |format|
-      if @blog_post.save
-        flash[:notice] = 'BlogPost was successfully created.'
-        format.html { redirect_to blog_url(@blog_post.blog) }
-      else
-        format.html { render :action ="" "new" }
-      end
-    end
-  end
-
-  # PUT /blog_posts/1
-  def update
-    respond_to do |format|
-      if @blog_post.update_attributes(params[:blog_post])
-        flash[:notice] = 'BlogPost was successfully updated.'
-        format.html { redirect_to blog_url(@blog_post.blog) }
-      else
-        format.html { render :action ="" "edit" }
-      end
-    end
-  end
-
-  # DELETE /blog_posts/1
-  def destroy
-    @blog_post.destroy
-
-    respond_to do |format|
-      format.html { redirect_to blog_url(@blog_post.blog) }
-    end
-  end
-  
-protected
-
-  def find_blog_auth
-
-    action_permissions = {
-      "create"  => "create",
-      "destroy" => "destroy",
-      "edit"    => "edit",
-      "index"   => "view",
-      "new"     => "create",
-      "show"    => "view",
-      "update"  => "edit"
-    }
-
-    begin
-      blog = Blog.find(params[:blog_id])
-      
-      if Authorization.check(action_permissions[action_name], blog, current_user)
-        @blog = blog
-      else
-        error("Blog not found (id not authorized)", "is invalid (not authorized)")
-      end
-    rescue ActiveRecord::RecordNotFound
-      error("Blog not found", "is invalid")
-    end
-  end
-  
-  def find_blog_posts
-    options = { :order => "created_at DESC" }
-    options = options.merge({ :conditions => ["blog_id = ?", @blog.id] }) if @blog
-    
-    @blog_posts = BlogPost.find(:all, options)
-  end
-  
-  def find_blog_post
-    begin
-      @blog_post = BlogPost.find(params[:id], :conditions => ["blog_id = ?", @blog.id])
-    rescue ActiveRecord::RecordNotFound
-      error("Blog Post not found", "is invalid")
-    end
-  end
-  
-  def find_blog_and_blog_posts
-    find_blog_auth
-    
-    find_blog_posts if @blog
-  end
-  
-  def find_blog_and_blog_post
-    find_blog_auth
-    
-    find_blog_post if @blog
-  end
-  
-private
-
-  def error(notice, message, attr=:id)
-    flash[:error] = notice
-    (err = BlogPost.new.errors).add(attr, message)
-    
-    respond_to do |format|
-      format.html { redirect_to blog_blog_posts_url(params[:blog_id]) }
-    end
-  end
-end

Deleted: trunk/app/controllers/blogs_controller.rb (3345 => 3346)


--- trunk/app/controllers/blogs_controller.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/controllers/blogs_controller.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,151 +0,0 @@
-# myExperiment: app/controllers/blogs_controller.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-class BlogsController < ApplicationController
-  before_filter :login_required, :except => [:index, :show]
-  
-  before_filter :find_blogs, : [:index]
-  #before_filter :find_blog_auth, : [:show, :edit, :update, :destroy]
-  before_filter :find_blog_auth, :except => [:index, :new, :create, :update, :destroy]
-  
-  # GET /blogs
-  def index
-    respond_to do |format|
-      format.html # index.rhtml
-    end
-  end
-
-  # GET /blogs/1
-  def show
-    @viewing = Viewing.create(:contribution => @blog.contribution, :user => (logged_in? ? current_user : nil))
-    
-    @sharing_mode  = @blog.contribution.policy.share_mode
-    
-    respond_to do |format|
-      format.html # show.rhtml
-    end
-  end
-
-  # GET /blogs/new
-  def new
-    @blog = Blog.new
-
-    @sharing_mode  = 0
-  end
-
-  # GET /blogs/1;edit
-  def edit
-    @sharing_mode  = @blog.contribution.policy.share_mode
-  end
-
-  # POST /blogs
-  def create
-
-    return error('Creating new blog content is disabled', 'is disabled')
-
-    params[:blog][:contributor_type] = "User"
-    params[:blog][:contributor_id]   = current_user.id
-    
-    @blog = Blog.new(params[:blog])
-    
-    respond_to do |format|
-      if @blog.save
-
-        @blog.contribution.update_attributes(params[:contribution])
-
-        update_policy(@blog, params)
-        
-        flash[:notice] = 'Blog was successfully created.'
-        format.html { redirect_to blog_url(@blog) }
-      else
-        format.html { render :action ="" "new" }
-      end
-    end
-  end
-
-  # PUT /blogs/1
-  def update
-    
-    # remove protected columns
-    if params[:blog]
-      [:contributor_id, :contributor_type, :created_at, :updated_at].each do |column_name|
-        params[:blog].delete(column_name)
-      end
-    end
-    
-    respond_to do |format|
-      if @blog.update_attributes(params[:blog])
-        
-        # security fix (only allow the owner to change the policy)
-        @blog.contribution.update_attributes(params[:contribution]) if @blog.contribution.owner?(current_user)
-        
-        update_policy(@blog, params)
-
-        flash[:notice] = 'Blog was successfully updated.'
-        format.html { redirect_to blog_url(@blog) }
-      else
-        format.html { render :action ="" "edit" }
-      end
-    end
-  end
-
-  # DELETE /blogs/1
-  def destroy
-    @blog.destroy
-
-    respond_to do |format|
-      format.html { redirect_to blogs_url }
-    end
-  end
-  
-protected
-
-  def find_blogs
-    @blogs = Blog.find(:all, 
-                       :order => "title ASC, created_at DESC",
-                       :page => { :size => 20, 
-                                  :current => params[:page] })
-  end
-  
-  def find_blog_auth
-
-    action_permissions = {
-      "create"  => "create",
-      "destroy" => "destroy",
-      "edit"    => "edit",
-      "index"   => "view",
-      "new"     => "create",
-      "show"    => "view",
-      "update"  => "edit",
-    }
-
-    begin
-      blog = Blog.find(params[:id])
-      
-      if Authorization.check(action_permissions[action_name], blog, current_user)
-        @blog = blog
-      else
-        if logged_in? 
-          error("Blog not found (id not authorized)", "is invalid (not authorized)")
-        else
-          find_blog_auth if login_required
-        end
-      end
-    rescue ActiveRecord::RecordNotFound
-      error("Blog not found", "is invalid")
-    end
-  end
-  
-private
-
-  def error(notice, message, attr=:id)
-    flash[:error] = notice
-    (err = Blog.new.errors).add(attr, message)
-    
-    respond_to do |format|
-      format.html { redirect_to blogs_url }
-    end
-  end
-end

Modified: trunk/app/controllers/users_controller.rb (3345 => 3346)


--- trunk/app/controllers/users_controller.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/controllers/users_controller.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -8,7 +8,7 @@
 
 class UsersController < ApplicationController
 
-  contributable_actions = [:workflows, :files, :packs, :blogs]
+  contributable_actions = [:workflows, :files, :packs]
   show_actions = [:show, :news, :friends, :groups, :credits, :tags, :favourites] + contributable_actions
 
   before_filter :login_required, :except => [:index, :new, :create, :search, :all, :confirm_email, :forgot_password, :reset_password] + show_actions
@@ -91,11 +91,6 @@
     render :action ="" 'show'
   end
 
-  def blogs
-    @tab = "Blogs"
-    render :action ="" 'show'
-  end
-
   def credits
     @tab = "Credits"
     render :action ="" 'show'

Modified: trunk/app/helpers/application_helper.rb (3345 => 3346)


--- trunk/app/helpers/application_helper.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/helpers/application_helper.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -375,14 +375,6 @@
       else
         return nil
       end
-    when "Blog"
-      if b = Blog.find(:first, :conditions => ["id = ?", contributableid])
-        name = h(b.title)
-        
-        return link ? link_to(name, blog_url(b)) : name
-      else
-        return nil
-      end
     when "Workflow"
       if w = Workflow.find(:first, :conditions => ["id = ?", contributableid])
         name = h(w.title)
@@ -692,8 +684,6 @@
       return "manhattan_studio/folder-closed_16.png"
     when "remote-resource"
       return "famfamfam_silk/page_world.png"
-    when "blog"
-      return "famfamfam_silk/note.png"
     when "workflow"
       return "redmond_studio/applications_16.png"
     when "policy"
@@ -1330,7 +1320,7 @@
     
     return rtn unless depth.to_i < 2
     
-    collections = [[contributor], contributor.contributions, contributor.workflows, contributor.blogs]
+    collections = [[contributor], contributor.contributions, contributor.workflows]
     recursions = []
     
     case contributor.class.to_s
@@ -1449,19 +1439,6 @@
         
         rtn << [item.created_at, "#{editor} created the #{link} #{item.contributable_type.downcase == "blob" ? "File" : item.contributable_type.downcase} for #{owner_string}."]
       end
-    when "Blog"
-      if restrict_contributor
-        return rtn unless (restrict_contributor.class.to_s == item.contributor_type.to_s and restrict_contributor.id.to_i == item.contributor_id.to_i)
-      end
-      
-      owner = contributor(item.contributor_id, item.contributor_type)
-    
-      item.posts.each do |blog_post|
-        next if before and blog_post.created_at > before
-        next if after and blog_post.created_at < after
-        
-        rtn << [blog_post.created_at, "#{owner} has created a new post on #{contributable(item.id, "Blog")}."]
-      end
     when "Workflow"
       item.versions.each do |workflow|
         next if workflow.version.to_i == 1
@@ -1585,7 +1562,7 @@
 
   #Selects layout for contributables/groups or uses site's default
   def configure_layout
-    contributable = (@workflow || @pack || @blog_post || @blob)
+    contributable = (@workflow || @pack || @blob)
     layout = nil
 
     if params["layout_preview"]

Deleted: trunk/app/helpers/blog_posts_helper.rb (3345 => 3346)


--- trunk/app/helpers/blog_posts_helper.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/helpers/blog_posts_helper.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,7 +0,0 @@
-# myExperiment: app/helpers/blog_posts_helper.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-module BlogPostsHelper
-end

Deleted: trunk/app/helpers/blogs_helper.rb (3345 => 3346)


--- trunk/app/helpers/blogs_helper.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/helpers/blogs_helper.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,7 +0,0 @@
-# myExperiment: app/helpers/blogs_helper.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-module BlogsHelper
-end

Modified: trunk/app/helpers/users_helper.rb (3345 => 3346)


--- trunk/app/helpers/users_helper.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/helpers/users_helper.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -12,7 +12,6 @@
       when 'Blob'; url = ""
       when 'Workflow'; url = ""
       when 'Pack'; url = ""
-      when 'Blog'; url = ""
       else;        url = ""
     end
     

Deleted: trunk/app/models/blog.rb (3345 => 3346)


--- trunk/app/models/blog.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/models/blog.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,26 +0,0 @@
-# myExperiment: app/models/blog.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-require 'acts_as_site_entity'
-require 'acts_as_contributable'
-
-class Blog < ActiveRecord::Base
-
-  acts_as_site_entity
-
-  acts_as_contributable
-  
-  acts_as_bookmarkable
-  acts_as_commentable
-  acts_as_rateable
-  acts_as_taggable
-
-  has_many :posts,
-           :class_name => "BlogPost",
-           :order => "blog_posts.created_at DESC",
-           :dependent => :destroy
-           
-  validates_presence_of :title
-end

Deleted: trunk/app/models/blog_post.rb (3345 => 3346)


--- trunk/app/models/blog_post.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/models/blog_post.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,12 +0,0 @@
-# myExperiment: app/models/blog_post.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-class BlogPost < ActiveRecord::Base
-  belongs_to :blog
-  
-  format_attribute :body
-
-  validates_presence_of :title, :body
-end

Modified: trunk/app/models/network.rb (3345 => 3346)


--- trunk/app/models/network.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/models/network.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -17,7 +17,6 @@
   acts_as_taggable
   
   has_many :blobs, :as => :contributor
-  has_many :blogs, :as => :contributor
   has_many :workflows, :as => :contributor
   has_many :policies, :as => :contributor
   

Modified: trunk/app/models/user.rb (3345 => 3346)


--- trunk/app/models/user.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/models/user.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -288,7 +288,6 @@
   acts_as_contributor
   
   has_many :blobs, :as => :contributor, :dependent => :destroy
-  has_many :blogs, :as => :contributor, :dependent => :destroy
   has_many :workflows, :as => :contributor, :dependent => :destroy
   has_many :packs, :as => :contributor, :dependent => :destroy
   

Modified: trunk/app/views/users/show.rhtml (3345 => 3346)


--- trunk/app/views/users/show.rhtml	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/app/views/users/show.rhtml	2013-01-24 15:10:30 UTC (rev 3346)
@@ -409,13 +409,6 @@
     <% contributables = (@user.contributions.select do |c| c.contributable_type == 'Pack' end).map do |c| c.contributable end  %>
     <%= render :partial => "packs/table", :locals => { :collection => contributables } %>
 
-  <% when "Blogs" %>
-		
-		<%= view_privileges_notice %>
-		<br/>
-    <% contributables = (@user.contributions.select do |c| c.contributable_type == 'Blog' end).map do |c| c.contributable end  %>
-    <%= render :partial => "blogs/table", :locals => { :collection => contributables } %>
-
   <% when "Credits" %>
 
     <% unless (creditations = @user.creditations).empty? %>

Modified: trunk/config/default_settings.yml (3345 => 3346)


--- trunk/config/default_settings.yml	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/config/default_settings.yml	2013-01-24 15:10:30 UTC (rev 3346)
@@ -41,7 +41,7 @@
 # contributable_models - These are the models for the things that myExperiment
 #                        contributors can contribute.
 
-contributable_models: [Workflow, Blob, Pack, Blog]
+contributable_models: [Workflow, Blob, Pack]
 
 # page_template - This is the page template for all the pages except for
 #                 the front page of the web site.

Modified: trunk/config/routes.rb (3345 => 3346)


--- trunk/config/routes.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/config/routes.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -185,12 +185,6 @@
     blob.resources :comments, :collection => { :timeline => :get }
   end
 
-  # blogs
-  map.resources :blogs do |blog|
-    # blogs have nested posts
-    blog.resources :blog_posts
-  end
-
   # services
   map.resources :services, :collection => { :search => :get }
   
@@ -221,7 +215,7 @@
   map.connect 'users/forgot_password', :controller => "users", :action ="" "forgot_password"
   map.connect 'users/reset_password/:reset_code', :controller => "users", :action ="" "reset_password"
   
-  [ 'news', 'friends', 'groups', 'workflows', 'files', 'packs', 'forums', 'blogs', 'credits', 'tags', 'favourites' ].each do |tab|
+  [ 'news', 'friends', 'groups', 'workflows', 'files', 'packs', 'forums', 'credits', 'tags', 'favourites' ].each do |tab|
     map.connect "users/:id/#{tab}", :controller => 'users', :action ="" tab
   end
   

Added: trunk/db/migrate/20130124144906_remove_blogs.rb (0 => 3346)


--- trunk/db/migrate/20130124144906_remove_blogs.rb	                        (rev 0)
+++ trunk/db/migrate/20130124144906_remove_blogs.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -0,0 +1,15 @@
+class RemoveBlogs < ActiveRecord::Migration
+  def self.up
+    drop_table :blogs
+  end
+
+  def self.down
+    create_table :blogs do |t|
+      t.column :contributor_id, :integer
+      t.column :contributor_type, :string
+      t.column :title, :string
+      t.column :created_at, :datetime
+      t.column :updated_at, :datetime
+    end
+  end
+end

Added: trunk/db/migrate/20130124144917_remove_blog_posts.rb (0 => 3346)


--- trunk/db/migrate/20130124144917_remove_blog_posts.rb	                        (rev 0)
+++ trunk/db/migrate/20130124144917_remove_blog_posts.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -0,0 +1,16 @@
+class RemoveBlogPosts < ActiveRecord::Migration
+  def self.up
+    drop_table :blog_posts
+  end
+
+  def self.down
+    create_table :blog_posts do |t|
+      t.column :blog_id, :integer
+      t.column :title, :string
+      t.column :body, :text
+      t.column :created_at, :datetime
+      t.column :updated_at, :datetime
+      t.column :body_html, :text
+    end
+  end
+end

Modified: trunk/db/schema.rb (3345 => 3346)


--- trunk/db/schema.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/db/schema.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20130114091326) do
+ActiveRecord::Schema.define(:version => 20130124144917) do
 
   create_table "activity_limits", :force => true do |t|
     t.string   "contributor_type", :null => false
@@ -74,23 +74,6 @@
     t.integer  "current_version"
   end
 
-  create_table "blog_posts", :force => true do |t|
-    t.integer  "blog_id"
-    t.string   "title"
-    t.text     "body"
-    t.datetime "created_at"
-    t.datetime "updated_at"
-    t.text     "body_html"
-  end
-
-  create_table "blogs", :force => true do |t|
-    t.integer  "contributor_id"
-    t.string   "contributor_type"
-    t.string   "title"
-    t.datetime "created_at"
-    t.datetime "updated_at"
-  end
-
   create_table "bookmarks", :force => true do |t|
     t.string   "title",             :limit => 50, :default => ""
     t.datetime "created_at",                                      :null => false

Modified: trunk/lib/account_management.rb (3345 => 3346)


--- trunk/lib/account_management.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/lib/account_management.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -12,8 +12,6 @@
     :announcements              => { :owner => :user_id },
     :attributions               => { :owner => :derived },
     :blobs                      => { :owner => :contributor },
-    :blogs                      => { :owner => :contributor },
-    :blog_posts                 => { :owner => :derived },
     :bookmarks                  => { :owner => :user_id },
     :citations                  => { :owner => :user_id },
     :client_applications        => { :owner => :user_id },

Modified: trunk/lib/authorization.rb (3345 => 3346)


--- trunk/lib/authorization.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/lib/authorization.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -52,7 +52,7 @@
 
     case object_type
 
-      when "Workflow", "Blog", "Blob", "Pack", "Service", "Contribution"
+      when "Workflow", "Blob", "Pack", "Service", "Contribution"
 
         # workflows can only be created by authenticated users
         if (action == "create") && [Workflow, Blob, Pack].include?(object)

Modified: trunk/lib/maintenance/backup.rb (3345 => 3346)


--- trunk/lib/maintenance/backup.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/lib/maintenance/backup.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -119,8 +119,6 @@
       table(:model => Attribution,            :filter  => true, :auth_object => "attributable")
       table(:name  => "auto_tables")
       table(:model => Blob,                   :filter  => true)
-      table(:model => Blog,                   :no_data => true)
-      table(:model => BlogPost,               :no_data => true)
       table(:model => Bookmark)
       table(:model => Citation,               :filter  => true, :auth_object => "workflow")
       table(:model => ClientApplication,      :no_data => true)

Modified: trunk/lib/rest.rb (3345 => 3346)


--- trunk/lib/rest.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/lib/rest.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -668,8 +668,6 @@
     when 'Review';                 return workflow_review_url(ob.reviewable, ob)
     when 'Comment';                return "#{rest_resource_uri(ob.commentable)}/comments/#{ob.id}"
     when 'Bookmark';               return nil
-    when 'Blog';                   return blog_url(ob)
-    when 'BlogPost';               return blog_blog_post_url(ob.blog, ob)
     when 'Rating';                 return "#{rest_resource_uri(ob.rateable)}/ratings/#{ob.id}"
     when 'Tag';                    return tag_url(ob)
     when 'Picture';                return user_picture_url(ob.owner, ob)
@@ -713,8 +711,6 @@
     when 'Review';                 return "#{base}/review.xml?id=#{ob.id}"
     when 'Comment';                return "#{base}/comment.xml?id=#{ob.id}"
     when 'Bookmark';               return "#{base}/favourite.xml?id=#{ob.id}"
-    when 'Blog';                   return "#{base}/blog.xml?id=#{ob.id}"
-    when 'BlogPost';               return "#{base}/blog-post.xml?id=#{ob.id}"
     when 'Rating';                 return "#{base}/rating.xml?id=#{ob.id}"
     when 'Tag';                    return "#{base}/tag.xml?id=#{ob.id}"
     when 'Picture';                return "#{base}/picture.xml?id=#{ob.id}"
@@ -839,8 +835,6 @@
   return [User, $1, is_local]           if uri.path =~ /^\/users\/([\d]+)$/
   return [Review, $1, is_local]         if uri.path =~ /^\/[^\/]+\/[\d]+\/reviews\/([\d]+)$/
   return [Comment, $1, is_local]        if uri.path =~ /^\/[^\/]+\/[\d]+\/comments\/([\d]+)$/
-  return [Blog, $1, is_local]           if uri.path =~ /^\/blogs\/([\d]+)$/
-  return [BlogPost, $1, is_local]       if uri.path =~ /^\/blogs\/[\d]+\/blog_posts\/([\d]+)$/
   return [Tag, $1, is_local]            if uri.path =~ /^\/tags\/([\d]+)$/
   return [Picture, $1, is_local]        if uri.path =~ /^\/users\/[\d]+\/pictures\/([\d]+)$/
   return [Message, $1, is_local]        if uri.path =~ /^\/messages\/([\d]+)$/

Modified: trunk/lib/sanity_test.rb (3345 => 3346)


--- trunk/lib/sanity_test.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/lib/sanity_test.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -54,13 +54,12 @@
 
   users         = User.find(:all)
   workflows     = Workflow.find(:all)
-  blogs         = Blog.find(:all)
   blobs         = Blob.find(:all)
   packs         = Pack.find(:all)
   services      = Service.find(:all)
   contributions = Contribution.find(:all)
 
-  known_contributables = workflows + blobs + blogs + packs + services
+  known_contributables = workflows + blobs + packs + services
 
   should_be_empty("All users must have a name",
       users.select do |u| u.name == nil or u.name.length == 0 end)
@@ -76,9 +75,6 @@
   should_be_empty("All files must have a contribution record",
       blobs.select do |b| b.contribution.nil? end)
 
-  should_be_empty("All blogs must have a contribution record",
-      blogs.select do |b| b.contribution.nil? end)
-
   should_be_empty("All packs must have a contribution record",
       packs.select do |f| f.contribution.nil? end)
 

Deleted: trunk/test/fixtures/blog_posts.yml (3345 => 3346)


--- trunk/test/fixtures/blog_posts.yml	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/fixtures/blog_posts.yml	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,15 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-one:
-  id: 1
-  blog_id: 1
-  title: MyString
-  body: MyText
-  created_at: 2007-08-16 11:22:32
-  updated_at: 2007-08-16 11:22:32
-two:
-  id: 2
-  blog_id: 1
-  title: MyString
-  body: MyText
-  created_at: 2007-08-16 11:22:32
-  updated_at: 2007-08-16 11:22:32

Deleted: trunk/test/fixtures/blogs.yml (3345 => 3346)


--- trunk/test/fixtures/blogs.yml	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/fixtures/blogs.yml	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-one:
-  id: 1
-  contributor_id: 1
-  contributor_type: MyString
-  title: MyString
-two:
-  id: 2
-  contributor_id: 1
-  contributor_type: MyString
-  title: MyString

Deleted: trunk/test/functional/blog_posts_controller_test.rb (3345 => 3346)


--- trunk/test/functional/blog_posts_controller_test.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/functional/blog_posts_controller_test.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,15 +0,0 @@
-# myExperiment: test/functional/blog_posts_controller_test.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-require File.dirname(__FILE__) + '/../test_helper'
-require 'blog_posts_controller'
-
-class BlogPostsControllerTest < ActionController::TestCase
-
-  def test_true
-    assert true
-  end
-
-end

Deleted: trunk/test/functional/blogs_controller_test.rb (3345 => 3346)


--- trunk/test/functional/blogs_controller_test.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/functional/blogs_controller_test.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,15 +0,0 @@
-# myExperiment: test/functional/blogs_controller_test.rb
-#
-# Copyright (c) 2007 University of Manchester and the University of Southampton.
-# See license.txt for details.
-
-require File.dirname(__FILE__) + '/../test_helper'
-require 'blogs_controller'
-
-class BlogsControllerTest < ActionController::TestCase
-
-  def test_true
-    assert true
-  end
-
-end

Deleted: trunk/test/unit/blog_post_test.rb (3345 => 3346)


--- trunk/test/unit/blog_post_test.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/unit/blog_post_test.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,10 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-
-class BlogPostTest < ActiveSupport::TestCase
-  fixtures :blog_posts
-
-  # Replace this with your real tests.
-  def test_truth
-    assert true
-  end
-end

Deleted: trunk/test/unit/blog_test.rb (3345 => 3346)


--- trunk/test/unit/blog_test.rb	2013-01-24 14:58:22 UTC (rev 3345)
+++ trunk/test/unit/blog_test.rb	2013-01-24 15:10:30 UTC (rev 3346)
@@ -1,10 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-
-class BlogTest < ActiveSupport::TestCase
-  fixtures :blogs
-
-  # Replace this with your real tests.
-  def test_truth
-    assert true
-  end
-end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]