New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

enki-engine

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enki-engine

  • 0.0.5
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

h1. Enki Engine

A Ruby on Rails blogging engine extracted from Xavier Shay's Enki blogging app.

h2. Quick Start

  • Add to your bundle:

    gem 'enki_engine'

  • Add the migrations

    rake enki:install:migrations

  • Create a config/enki.yml like the one below until I write a generator. Hint! Hint!

# Configuration options for your blog - customise to taste
# This file contains no secret information, so can be stored in source control (unlike database.yml)
title: Articles
url: http://enkiblog.com/posts
author:
  name:    Don Alias        # For copyright notice and ATOM feeds
  email:   don@enkiblog.com # Exception emails will go here, and it is used in ATOM feeds
  open_id:                  # These are used to login to the admin area
      - http://enkiblog.com
      - http://secondaryopenid.com

engine:
  mount_at: /content
  pages_at: /

features:
  comments: false
  tags: true
  form_helper: false
  • A good place to start customizing is with Enki::Admin::BaseController, as you may want some authentication & authorization from the host app
# app/models/enki/post.rb
module Enki
  class Post < Base::Post

    belongs_to :author, :class_name => 'User'

    validates_presence_of :author_id

  end
end

# app/controllers/enki/admin/base_controller.rb
module Enki
  module Admin
    class BaseController < Enki::ApplicationController

      before_filter :require_account, :authorize

      protected

      # Post management is a proxy for all blog abilities.
      def authorize
        raise CanCan::AccessDenied unless can?(:manage, Enki::Post)
      end
        
      # requires a migration to put the author_id into posts and pages
      def post_attributes
        {:author => current_user}
      end

    end
  end
end
  • Read the code and improve it at will.

h2. More info

Enki is a compact, easily extendable base for your blog. It does this by being highly opinionated, for example:

  • Public facing views should adhere to standards (XHTML(eXtensible Hypertext Markup Language), Atom)
  • /yyyy/mm/dd/post-title is a good URL for your posts
  • Live comment preview should be provided by default
  • Google does search better than you or I
  • You don't need a plugin system when you've got decent source control
  • Hacking code is the easiest way to customize something

h2. Compatibility

Uses rails 3. Runs on MySQL or Postgres. Works on heroku. Uses ActsAsTaggableOn but I'd like to make it agnostic of a tagging solution. Uses SimpleForm whereas Enki uses Formtastic. I'd like this to be agnostic. Supports WillPaginate and Kaminari or no pagination with a couple of untidy shims I threw in which could be implemented much better.

h2. Patches/Pull Request

  • Fork the project.
  • Make your improvement or bug fix.
  • Add specs for it. This is important so I don’t break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore it when I pull)
  • Send a pull request. Bonus points for topic branches.

h2. Contributors, these guys rock

git log | grep Author | sort | uniq

If you want to help out, try tackling something from the TODO or an "open issue":https://github.com/ThisIsHatch/enki_engine/issues. Please include specs for any fixes. Enki Engine is by design feature light. Unless you feel very strongly your feature should be in core, add a link to your fork in the wiki instead.

h2. License

GPL(General Public License) - See LICENSE

Admin design heavily inspired by "Habari":http://www.habariproject.org/en/ and broken by https://github.com/james2m

FAQs

Package last updated on 31 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc