lib/refinerycms-varnish-pages.rb in refinerycms-varnish-pages-0.0.2.2 vs lib/refinerycms-varnish-pages.rb in refinerycms-varnish-pages-0.0.3.rc1

- old
+ new

@@ -1,22 +1,32 @@ require 'refinerycms-pages' require 'shellac' +require 'refinerycms-varnish-pages/version' module Refinery module VarnishPages class Engine < Rails::Engine config.before_initialize do - require File.expand_path('../refinerycms_varnish/pages_controller_extension', __FILE__) - require File.expand_path('../refinerycms_varnish/page_extension', __FILE__) + require File.expand_path('../refinerycms-varnish-pages/pages_controller_extension', __FILE__) + require File.expand_path('../refinerycms-varnish-pages/page_extension', __FILE__) end refinery.after_inclusion do ::Admin::PagesController.send :include, RefinerycmsVarnish::PagesControllerExtension end config.to_prepare do ::Page.send :include, ::RefinerycmsVarnish::PageExtension + end + + config.after_initialize do + Refinery::Plugin.register do |plugin| + plugin.pathname = root + plugin.version = Refinery::VarnishPages::VERSION + plugin.name = "varnish_pages" + plugin.hide_from_menu = true + end end end end end \ No newline at end of file