Deleting superfluous trunk in branches
authorNeil Smith <neil.git@njae.me.uk>
Fri, 17 Jul 2009 20:19:19 +0000 (20:19 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Fri, 17 Jul 2009 20:19:19 +0000 (20:19 +0000)
app/controllers/application_controller.rb [deleted file]
app/controllers/feed_controller.rb [deleted file]
app/helpers/application_helper.rb [deleted file]
app/helpers/feed_helper.rb [deleted file]
app/models/feed_item.rb [deleted file]
app/views/feed/index.html.erb [deleted file]
app/views/feed/index.rss.builder [deleted file]
app/views/feed/show.html.erb [deleted file]
app/views/feed/show.rss.builder [deleted file]
app/views/feed/update.html.erb [deleted file]
app/views/layouts/application.html.erb [deleted file]

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
deleted file mode 100644 (file)
index 6635a3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# Filters added to this controller apply to all controllers in the application.
-# Likewise, all the methods added will be available for all controllers.
-
-class ApplicationController < ActionController::Base
-  helper :all # include all helpers, all the time
-  protect_from_forgery # See ActionController::RequestForgeryProtection for details
-
-  # Scrub sensitive parameters from your log
-  # filter_parameter_logging :password
-end
diff --git a/app/controllers/feed_controller.rb b/app/controllers/feed_controller.rb
deleted file mode 100644 (file)
index 71ab1df..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-class FeedController < ApplicationController
-
-  skip_before_filter :verify_authenticity_token
-
-  def index
-    @feeds = FeedItem.find(:all, :select => 'DISTINCT feed_name')
-    respond_to do |format|
-      format.html
-      format.rss { render :layout => false }
-    end
-  end
-
-  def show
-    @feed_items = FeedItem.find_all_by_feed_name(params[:feed_name])
-    redirect_to index_url if @feed_items == []
-    respond_to do |format|
-      format.html
-      format.rss { render :layout => false }
-    end
-  end
-
-  def update
-    item = FeedItem.find_by_feed_name_and_title(params[:feed_name], params[:title])
-    if item
-      if params[:description] == ''
-        item.destroy
-      else
-        item.update_attribute(:description, params[:description])
-      end
-    else
-      FeedItem.create(:feed_name => params[:feed_name],
-        :title => params[:title],
-        :description => params[:description])
-    end
-    redirect_to feed_url(params[:feed_name])
-  end
-
-end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index 22a7940..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Methods added to this helper will be available to all templates in the application.
-module ApplicationHelper
-end
diff --git a/app/helpers/feed_helper.rb b/app/helpers/feed_helper.rb
deleted file mode 100644 (file)
index 6709856..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module FeedHelper
-end
diff --git a/app/models/feed_item.rb b/app/models/feed_item.rb
deleted file mode 100644 (file)
index cf01358..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-class FeedItem < ActiveRecord::Base
-
-  # require 'cgi' # needed for url decoding
-
-  validates_presence_of :feed_name, :title, :description
-  validate :feed_name_must_be_legal
-
-protected
-
-  def feed_name_must_be_legal
-    if Rack::Utils::escape(feed_name) != feed_name or
-        Rack::Utils::unescape(feed_name) != feed_name or
-        feed_name == 'index' or
-        feed_name == 'show' or
-        feed_name == 'update' or
-        feed_name == 'action'
-      errors.add(:feed_name, 'is an invalid feed name')
-    end
-  end
-
-end
diff --git a/app/views/feed/index.html.erb b/app/views/feed/index.html.erb
deleted file mode 100644 (file)
index b9e082a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<h1>Feeds available</h1>
-
-<% form_tag :action => 'update' do %>
-  <p>Set feed <%= text_field_tag :feed_name, '', :size => 20 %>
-    to include <%= text_field_tag :title, '', :size => 30 %>
-    containing  <%= text_field_tag :description, '', :size => 50 %>
-    <%= submit_tag 'Update' %></p>
-<% end %>
-
-<ul>
-<% for feed in @feeds %>
-  <li><%= link_to(h(feed.feed_name), (feed_url(:feed_name => feed.feed_name))) %></li>
-<% end %>
-</ul>
\ No newline at end of file
diff --git a/app/views/feed/index.rss.builder b/app/views/feed/index.rss.builder
deleted file mode 100644 (file)
index 93ce050..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# index.rss.builder
-xml.instruct! :xml, :version => "1.0"
-xml.rss :version => "2.0" do
-  xml.channel do
-    xml.title "Feedcatcher"
-    xml.description "Feeds available"
-    xml.link index_url(:rss)
-
-    for feed in @feeds
-      xml.item do
-        xml.title feed.feed_name
-        xml.link feed_url(feed.feed_name, :rss)
-        xml.guid feed_url(feed.feed_name, :rss)
-      end
-    end
-  end
-end
diff --git a/app/views/feed/show.html.erb b/app/views/feed/show.html.erb
deleted file mode 100644 (file)
index 2a2b9b1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<h1>Contents of feed <%= h params[:feed_name] %></h1>
-<p><%= link_to("List of all feeds", index_url) %></p>
-
-<% form_tag :action => 'update' do %>
-  <p>Set feed <%= text_field_tag :feed_name, h(params[:feed_name]), :size => 20 %>
-    to include <%= text_field_tag :title, '', :size => 30 %>
-    containing  <%= text_field_tag :description, '', :size => 50 %>
-    <%= submit_tag 'Update' %></p>
-<% end %>
-
-
-<dl>
-  <% for item in @feed_items %>
-    <dt><%= h item.title %></dt>
-    <dd><em><%= h item.description %></em></dd>
-  <% end %>
-</dl>
diff --git a/app/views/feed/show.rss.builder b/app/views/feed/show.rss.builder
deleted file mode 100644 (file)
index 522b662..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# index.rss.builder
-xml.instruct! :xml, :version => "1.0"
-xml.rss :version => "2.0" do
-  xml.channel do
-    xml.title @feed_items[0].feed_name
-    xml.link feed_url(@feed_items[0].feed_name, :rss)
-
-    for item in @feed_items
-      xml.item do
-        xml.title item.title
-        xml.description item.description
-        xml.guid item.id, :isPermaLink => 'false'
-      end
-    end
-  end
-end
diff --git a/app/views/feed/update.html.erb b/app/views/feed/update.html.erb
deleted file mode 100644 (file)
index 96fff67..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<h1>Feed#update</h1>
-<p>Find me in app/views/feed/update.html.erb</p>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
deleted file mode 100644 (file)
index 6ac8aa8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-  <head>
-    <title>Form: <%= controller.action_name %></title>
-  </head>
-  <body>
-    <%= yield :layout %>
-  </body>
-</html>