spud_blog 0.8.15 → 0.8.16

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.markdown CHANGED
@@ -5,6 +5,10 @@ Spud Blog is a Blog Engine designed to be robust, easy to use, and light weight.
5
5
 
6
6
  __NOTE:__ This project is still in its early infancy.
7
7
 
8
+ ## Release Notes
9
+
10
+ * 0.8.15 - Increased Spam Protection and Akismet spam service support (Check further down in Readme for instructions)
11
+
8
12
  ## Installation/Usage
9
13
 
10
14
  1. In your Gemfile add the following
@@ -38,21 +42,21 @@ Spud Blog current accepts the following configuration options.
38
42
 
39
43
  ## Customizing Views
40
44
 
41
- A number of built-in views have been provided to help you get started with the frontend display. Customzing these views will require you to copy them into your local application, which can be accomplished by using the views generator.
45
+ A number of built-in views have been provided to help you get started with the frontend display. Customzing these views will require you to copy them into your local application, which can be accomplished by using the views generator.
42
46
 
43
47
  rails generate spud:blog:views
44
48
 
45
- __NOTE:__ The built-in views are likely to undergo changes as features are added to the blogging engine. If a new version of Spud Blog does not play nicely with your customized views, try backing up your views to an alternate location and running the views generator again to see what has changed.
49
+ __NOTE:__ The built-in views are likely to undergo changes as features are added to the blogging engine. If a new version of Spud Blog does not play nicely with your customized views, try backing up your views to an alternate location and running the views generator again to see what has changed.
46
50
 
47
51
  ## Javascript Driver
48
52
 
49
- Spud Blog includes a small, unobtrusive javascript driver that adds functionality to the built-in views. Including the driver is optional, as all client-side views and controllers are designed to work whether you include it or not.
53
+ Spud Blog includes a small, unobtrusive javascript driver that adds functionality to the built-in views. Including the driver is optional, as all client-side views and controllers are designed to work whether you include it or not.
50
54
 
51
55
  <%= javascript_include_tag 'spud/blog' %>
52
56
 
53
57
  ## Custom Fields
54
58
 
55
- You may find that your blog requires a field that isn't included in the default `spud_post` model. Adding custom fields is easy.
59
+ You may find that your blog requires a field that isn't included in the default `spud_post` model. Adding custom fields is easy.
56
60
 
57
61
  1. Set `has_custom_fields` to true in your Spud Blog configuration
58
62
  2. Create a migration adding the necessary column(s) to your database
@@ -65,14 +69,14 @@ You may find that your blog requires a field that isn't included in the default
65
69
 
66
70
  3. Save a view partial at `app/views/spud/admin/posts/_custom_fields.html.erb` with the desired inputs
67
71
 
68
-
72
+
69
73
  <div class="control-group">
70
74
  <%= f.label :caption, 'Caption',:class => "control-label" %>
71
75
  <div class="controls">
72
76
  <%= f.text_field :caption %>
73
77
  </div>
74
78
  </div>
75
-
79
+
76
80
  ## Extending the Post Model
77
81
 
78
82
  Rails engines allow you to extend or even completely override classes by adding them to your local application. Source files found in your local app's path will take precedence over those found within the Spud Blog gem. Lets say you wanted to extend the SpudPost model.
@@ -91,13 +95,27 @@ Rails engines allow you to extend or even completely override classes by adding
91
95
  end
92
96
  end
93
97
 
98
+ ## Akismet Support
99
+
100
+ Spud Blog Engine now supports spam comment filtering using akismet. All you have to do is configure the rakismet gem and enable_rakismet in the spud_blog configuration. Add the following to your application.rb file
101
+
102
+ Spud::Blog.configure do |config|
103
+ config.enable_rakismet = true
104
+ end
105
+ config.rakismet.key = "your key here"
106
+ config.rakismet.url = 'http://yourdomain.com/'
107
+
108
+ Also make sure to add the rakismet gem to your gemfile
109
+
110
+ gem 'rakismet'
111
+
94
112
  Testing
95
113
  -----------------
96
114
 
97
115
  Spud uses RSpec for testing. Get the tests running with a few short commands:
98
116
 
99
117
  1. Create and migrate the databases:
100
-
118
+
101
119
  rake db:create
102
120
  rake db:migrate
103
121
 
@@ -22,6 +22,11 @@ class BlogController < ApplicationController
22
22
  cache_sweeper :spud_post_comment_sweeper, :only => [:create_comment]
23
23
 
24
24
  def index
25
+ page = 1
26
+ if params[:page].blank? == false && params[:page].to_i > 1
27
+ page = params[:page].to_i
28
+ end
29
+
25
30
  @posts = SpudPost.public_blog_posts(params[:page], Spud::Blog.config.posts_per_page)
26
31
  if Spud::Core.config.multisite_mode_enabled
27
32
  @posts = @posts.for_spud_site(current_site_id)
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Blog
3
- VERSION = "0.8.15"
3
+ VERSION = "0.8.16"
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.8.15
4
+ version: 0.8.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-25 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -298,7 +298,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
298
298
  version: '0'
299
299
  segments:
300
300
  - 0
301
- hash: 1089695411037407557
301
+ hash: 59404282012760370
302
302
  required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  none: false
304
304
  requirements:
@@ -307,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  version: '0'
308
308
  segments:
309
309
  - 0
310
- hash: 1089695411037407557
310
+ hash: 59404282012760370
311
311
  requirements: []
312
312
  rubyforge_project:
313
313
  rubygems_version: 1.8.24