Project

miniblog

0.0
No commit activity in last 3 years
No release in over 3 years
This mountable engine has the basic functionality to manage a very simple blog
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

miniblog

CI: Build Status

Code Climate: Code Climate

Generic Blog engine, currently in use by david.padilla.cc. Spiritual successor to crowdblog.

Installation

Gemfile

gem 'miniblog'

Bundle

bundle install

Copy migrations

rake miniblog:install:migrations

Run them

rake db:migrate

Mount

#
# routes.rb
#

mount Miniblog::Engine => '/blog'

Enjoy.

Your Rails App should implement the "client facing" pages. Read posts from the miniblog::Post model.

Testing: Use with caution

If you are using it as a 'vanilla' installation, that is, without a lot of customizations, you can use some specs that are included with the gem to make sure your blog behaves properly.

Add this on your spec_helper, right after you require rspec/rails:

require 'miniblog/rspec'
require 'database_cleaner'

Your are going to need DatabaseCleaner to use truncation strategies for your data. Add these lines to spec_helper.rb:

Rspec.configure do |config|

  config.use_transactional_fixtures = false

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end

Now, create a miniblog spec:

#
# spec/integration/miniblog_spec.rb
#
require 'spec_helper'

describe "miniblog" do
  it_behaves_like "a miniblog"
end

And run your specs. It should test miniblog properly.