Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Generic blog engine we use for our blog style websites. Use at own risk

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 vendor
Octocat-spinner-32 .autotest
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 .simplecov
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 crowdblog.gemspec
README.md

CrowdBlog

CI: Build Status

Code Climate: Code Climate

Generic Blog engine, currently in use by blog.crowdint.com and crowdint.com/careers, among others.

Installation

Gemfile

gem 'crowdblog'

Bundle

bundle install

Copy migrations

rake crowdblog:install:migrations

Run them

rake db:migrate

Mount

#
# routes.rb
#

mount Crowdblog::Engine => '/blog_admin'

Enjoy.

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

Authentication

The gem includes a very basic Devise implementation. We use it in combination with this gem to authenticate via our Google Apps accounts.

Take a look at this code as an implementation example.

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 'crowdblog/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 crowdblog spec:

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

describe "Crowdblog" do
  it_behaves_like "a crowdblog"
end

And run your specs. It should test Crowdblog properly.

Crowd Interactive is a leading Ruby and Rails consultancy firm based in Mexico currently doing business with startups in the United States. We specialize in building and growing your existing development team, by adding engineers onsite or offsite. We pick our clients carefully, as we only work with companies we believe in. Find out more about us on our website.

Something went wrong with that request. Please try again.