diff options
Diffstat (limited to 'lib/refinerycms-blog.rb')
-rw-r--r-- | lib/refinerycms-blog.rb | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb index 452863b..e08f070 100644 --- a/lib/refinerycms-blog.rb +++ b/lib/refinerycms-blog.rb @@ -1,41 +1 @@ -require 'filters_spam' - -module Refinery - module Blog - autoload :Version, File.expand_path('../refinery/blog/version', __FILE__) - autoload :Tab, File.expand_path("../refinery/blog/tabs", __FILE__) - - class << self - attr_accessor :root - def root - @root ||= Pathname.new(File.expand_path('../../', __FILE__)) - end - - def version - ::Refinery::Blog::Version.to_s - end - end - - class Engine < Rails::Engine - initializer 'blog serves assets' do |app| - app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public" - end - - config.to_prepare do - require File.expand_path('../refinery/blog/tabs', __FILE__) - end - - config.after_initialize do - Refinery::Plugin.register do |plugin| - plugin.pathname = root - plugin.name = "refinerycms_blog" - plugin.url = {:controller => '/admin/blog/posts', :action => 'index'} - plugin.menu_match = /^\/?(admin|refinery)\/blog\/?(posts|comments|categories)?/ - plugin.activity = { - :class => BlogPost - } - end - end - end if defined?(Rails::Engine) - end -end +require 'refinery/blog' |