Merge pull request #454 from krio/rearrange-rss-titles

Rearrange titles on RSS feeds
This commit is contained in:
Skud
2014-11-30 13:37:30 +11:00
13 changed files with 87 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
%rss{:version => 2.0}
%channel
%title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on all posts
%title Recent comments on all posts (#{ENV['GROWSTUFF_SITE_NAME']})
%link= comments_url
- @comments.each do |comment|
%item

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
%rss{:version => 2.0}
%channel
%title #{ENV['GROWSTUFF_SITE_NAME']} - Recently added crops
%title Recently added crops (#{ENV['GROWSTUFF_SITE_NAME']})
%link= crops_url
- @crops.each do |crop|
%item

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
%rss{:version => 2.0}
%channel
%title #{ENV['GROWSTUFF_SITE_NAME']} - #{@member.login_name}'s recent posts
%title #{@member.login_name}'s recent posts (#{ENV['GROWSTUFF_SITE_NAME']})
%link= member_url(@member)
- @posts.each do |post|
%item

View File

@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
#{ENV['GROWSTUFF_SITE_NAME']} - Recent plantings from #{ @owner ? @owner : 'all members' }
Recent plantings from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})
%link= plantings_url
- @plantings.each do |planting|
%item

View File

@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
#{ENV['GROWSTUFF_SITE_NAME']} - Recent posts from #{ @author ? @author : 'all members' }
Recent posts from #{ @author ? @author : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})
%link= posts_url
- @posts.each do |post|
%item

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
%rss{:version => 2.0}
%channel
%title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on #{@post.subject}
%title Recent comments on #{@post.subject} (#{ENV['GROWSTUFF_SITE_NAME']})
%link= post_url(@post)
- @post.comments.each do |comment|
%item

View File

@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
#{ENV['GROWSTUFF_SITE_NAME']} - Recent seeds from #{ @owner ? @owner : 'all members' }
Recent seeds from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})
%link= seeds_url
- @seeds.each do |seed|
%item

View File

@@ -0,0 +1,13 @@
require 'spec_helper'
feature 'Comments RSS feed' do
scenario 'The index feed exists' do
visit comments_path(:format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The index title is what we expect' do
visit comments_path(:format => 'rss')
expect(page).to have_content "Recent comments on all posts (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end

View File

@@ -0,0 +1,13 @@
require 'spec_helper'
feature 'Crops RSS feed' do
scenario 'The index feed exists' do
visit crops_path(:format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The index title is what we expect' do
visit crops_path(:format => 'rss')
expect(page).to have_content "Recently added crops (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end

View File

@@ -0,0 +1,15 @@
require 'spec_helper'
feature 'Members RSS feed' do
let(:member) { FactoryGirl.create(:member) }
scenario 'The show action exists' do
visit member_path(member, :format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The show action title is what we expect' do
visit member_path(member, :format => 'rss')
expect(page).to have_content "#{member.login_name}'s recent posts (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end

View File

@@ -0,0 +1,13 @@
require 'spec_helper'
feature 'Plantings RSS feed' do
scenario 'The index feed exists' do
visit plantings_path(:format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The index title is what we expect' do
visit plantings_path(:format => 'rss')
expect(page).to have_content "Recent plantings from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end

View File

@@ -0,0 +1,13 @@
require 'spec_helper'
feature 'Posts RSS feed' do
scenario 'The index feed exists' do
visit posts_path(:format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The index title is what we expect' do
visit posts_path(:format => 'rss')
expect(page).to have_content "Recent posts from #{ @author ? @author : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end

View File

@@ -0,0 +1,13 @@
require 'spec_helper'
feature 'Seeds RSS feed' do
scenario 'The index feed exists' do
visit seeds_path(:format => 'rss')
expect(page.status_code).to equal 200
end
scenario 'The index title is what we expect' do
visit seeds_path(:format => 'rss')
expect(page).to have_content "Recent seeds from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})"
end
end