spud_blog 0.7.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,4 +14,12 @@ module BlogHelper
14
14
  }, params[:archive_date]), :include_blank => true, :rel => 'archive'
15
15
  end
16
16
 
17
+ def spud_blog_rss_link
18
+ return tag :link, :rel => 'alternate', :type => 'application/rss+xml', :title => "#{Spud::Core.site_name} Blog RSS", :href => blog_url(:format => :rss)
19
+ end
20
+
21
+ def spud_news_rss_link
22
+ return tag(:link, :rel => 'alternate', :type => 'application/rss+xml', :title => "#{Spud::Core.site_name} News RSS", :href => news_url(:format => :rss))
23
+ end
24
+
17
25
  end
@@ -6,6 +6,7 @@ class SpudPost < ActiveRecord::Base
6
6
  :foreign_key => 'spud_post_id'
7
7
  belongs_to :author, :class_name => 'SpudUser', :foreign_key => 'spud_user_id'
8
8
  has_many :comments, :class_name => 'SpudPostComment'
9
+ has_many :spud_permalinks,:as => :attachment
9
10
  scope :publicly, where('visible = 1 AND published_at <= ?', Time.now.utc).order('published_at desc')
10
11
  validates_presence_of :title, :content, :published_at, :spud_user_id, :url_name
11
12
  validates_uniqueness_of :url_name
@@ -1,6 +1,7 @@
1
- <%=content_for :head do%>
2
- <link rel="alternate" type="application/rss+xml" title="<%=Spud::Core.site_name%> Blog RSS" href="<%=blog_url(:format => :rss)%>" />
3
- <%end%>
1
+ <% content_for :head do %>
2
+ <%= spud_blog_rss_link %>
3
+ <% end %>
4
+
4
5
  <div id="spud_blog_filters">
5
6
  <%= form_tag blog_path, :class => 'spud_blog_filter_form' do %>
6
7
  <label>Category:</label>
@@ -1,3 +1,17 @@
1
+ <% content_for :title do %>
2
+ <%= @post.title %> | <%= Spud::Core.site_name %>
3
+ <% end %>
4
+
5
+ <% content_for :head do %>
6
+ <%= spud_blog_rss_link %>
7
+ <meta name="description" content="<%= @post.meta_description %>" />
8
+ <% if @post.meta_keywords.blank? %>
9
+ <meta name="keywords" content="<%= @post.categories.collect{ |c| c.name }.join(',') %>" />
10
+ <% else %>
11
+ <meta name="keywords" content="<%= @post.meta_keywords %>" />
12
+ <% end %>
13
+ <% end %>
14
+
1
15
  <div class="spud_blog_post">
2
16
  <h3><%= @post.title %></h3>
3
17
  <h4>Posted by <%= @post.author.full_name %> on <%= @post.display_date %></h4>
@@ -1,6 +1,7 @@
1
- <%=content_for :head do%>
2
- <link rel="alternate" type="application/rss+xml" title="<%=Spud::Core.site_name%> News RSS" href="<%=news_url(:format => :rss)%>" />
3
- <%end%>
1
+ <% content_for :head do %>
2
+ <%= spud_news_rss_link %>
3
+ <% end %>
4
+
4
5
  <div id="spud_news_filters">
5
6
  <%= form_tag news_path, :class => 'spud_blog_filter_form' do %>
6
7
  <label>Category:</label>
@@ -1,3 +1,17 @@
1
+ <% content_for :title do %>
2
+ <%= @post.title %> | <%= Spud::Core.site_name %>
3
+ <% end %>
4
+
5
+ <% content_for :head do %>
6
+ <%= spud_news_rss_link %>
7
+ <meta name="description" content="<%= @post.meta_description %>" />
8
+ <% if @post.meta_keywords.blank? %>
9
+ <meta name="keywords" content="<%= @post.categories.collect{ |c| c.name }.join(',') %>" />
10
+ <% else %>
11
+ <meta name="keywords" content="<%= @post.meta_keywords %>" />
12
+ <% end %>
13
+ <% end %>
14
+
1
15
  <div class="spud_news_post">
2
16
  <h3><%= @post.title %></h3>
3
17
  <h4>Posted by <%= @post.author.full_name %> on <%= @post.display_date %></h4>
@@ -48,6 +48,14 @@
48
48
  <%= f.label :visible %>
49
49
  <%= f.check_box :visible %>
50
50
  </li>
51
+ <li>
52
+ <%= f.label :meta_keywords, 'Keywords' %>
53
+ <%= f.text_field :meta_keywords %>
54
+ </li>
55
+ <li>
56
+ <%= f.label :meta_description, 'Description' %>
57
+ <%= f.text_area :meta_description, :rows => 4, :cols => 75 %>
58
+ </li>
51
59
  <% unless @post.is_news %>
52
60
  <li>
53
61
  <%= f.label :comments_enabled %>
@@ -0,0 +1,6 @@
1
+ class AddMetaToPosts < ActiveRecord::Migration
2
+ def change
3
+ add_column :spud_posts, :meta_keywords, :string
4
+ add_column :spud_posts, :meta_description, :text
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Blog
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-06 00:00:00.000000000 Z
12
+ date: 2012-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70153959711060 !ruby/object:Gem::Requirement
16
+ requirement: &70353019863080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70153959711060
24
+ version_requirements: *70353019863080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spud_core
27
- requirement: &70153959710480 !ruby/object:Gem::Requirement
27
+ requirement: &70353019861520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: 0.7.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70153959710480
35
+ version_requirements: *70353019861520
36
+ - !ruby/object:Gem::Dependency
37
+ name: spud_permalinks
38
+ requirement: &70353019860180 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.1
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70353019860180
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: mysql2
38
- requirement: &70153959710080 !ruby/object:Gem::Requirement
49
+ requirement: &70353019858880 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70153959710080
57
+ version_requirements: *70353019858880
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: rspec
49
- requirement: &70153959709620 !ruby/object:Gem::Requirement
60
+ requirement: &70353019845620 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70153959709620
68
+ version_requirements: *70353019845620
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rspec-rails
60
- requirement: &70153959709160 !ruby/object:Gem::Requirement
71
+ requirement: &70353019842820 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: '0'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70153959709160
79
+ version_requirements: *70353019842820
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: factory_girl
71
- requirement: &70153959708660 !ruby/object:Gem::Requirement
82
+ requirement: &70353019840720 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - =
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: 2.5.0
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70153959708660
90
+ version_requirements: *70353019840720
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: mocha
82
- requirement: &70153959708160 !ruby/object:Gem::Requirement
93
+ requirement: &70353019839400 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - =
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: 0.10.3
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *70153959708160
101
+ version_requirements: *70353019839400
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: database_cleaner
93
- requirement: &70153959707680 !ruby/object:Gem::Requirement
104
+ requirement: &70353019838600 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - =
@@ -98,7 +109,7 @@ dependencies:
98
109
  version: 0.7.1
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70153959707680
112
+ version_requirements: *70353019838600
102
113
  description: Spud blogging/news and rss engine.
103
114
  email:
104
115
  - greg@westlakedesign.com
@@ -172,6 +183,7 @@ files:
172
183
  - db/migrate/20120127143054_add_url_to_spud_posts.rb
173
184
  - db/migrate/20120127144942_add_url_to_spud_post_categories.rb
174
185
  - db/migrate/20120210165540_add_is_news_to_spud_posts.rb
186
+ - db/migrate/20120309181917_add_meta_to_posts.rb
175
187
  - lib/generators/spud/blog/random_posts_generator.rb
176
188
  - lib/generators/spud/blog/views_generator.rb
177
189
  - lib/spud_blog/configuration.rb
@@ -225,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
237
  version: '0'
226
238
  segments:
227
239
  - 0
228
- hash: 497624753889644128
240
+ hash: 249193733154310611
229
241
  required_rubygems_version: !ruby/object:Gem::Requirement
230
242
  none: false
231
243
  requirements:
@@ -234,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
246
  version: '0'
235
247
  segments:
236
248
  - 0
237
- hash: 497624753889644128
249
+ hash: 249193733154310611
238
250
  requirements: []
239
251
  rubyforge_project:
240
252
  rubygems_version: 1.8.10