diff options
author | Jamie Winsor <jamie@enmasse.com> | 2011-10-27 19:36:54 -0700 |
---|---|---|
committer | Jamie Winsor <jamie@enmasse.com> | 2011-10-27 19:36:54 -0700 |
commit | 14daff297b2c3f2937ef6cf3e72b663903eec97a (patch) | |
tree | cc9136ffd51b079a3a9aba96eabc92415c9d299a | |
parent | 2b73c292c8aca776031fc31f5ebf94dce93bf0a0 (diff) | |
download | refinerycms-blog-14daff297b2c3f2937ef6cf3e72b663903eec97a.tar.gz refinerycms-blog-14daff297b2c3f2937ef6cf3e72b663903eec97a.tar.bz2 refinerycms-blog-14daff297b2c3f2937ef6cf3e72b663903eec97a.zip |
Refactor require layout to match other engines
-rw-r--r-- | lib/refinery/blog.rb | 29 | ||||
-rw-r--r-- | lib/refinery/blog/engine.rb | 3 | ||||
-rw-r--r-- | lib/refinerycms-blog.rb | 32 |
3 files changed, 32 insertions, 32 deletions
diff --git a/lib/refinery/blog.rb b/lib/refinery/blog.rb new file mode 100644 index 0000000..af39967 --- /dev/null +++ b/lib/refinery/blog.rb @@ -0,0 +1,29 @@ +require 'refinerycms-core' +require 'filters_spam' +require 'rails_autolink' + +module Refinery + autoload :BlogGenerator, 'generators/refinery/blog/blog_generator' + + module Blog + require 'refinery/blog/engine' if defined?(Rails) + + autoload :Version, 'refinery/blog/version' + autoload :Tab, 'refinery/blog/tabs' + + class << self + attr_accessor :root + def root + @root ||= Pathname.new(File.expand_path('../../', __FILE__)) + end + + def version + ::Refinery::Blog::Version.to_s + end + + def factory_paths + @factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ] + end + end + end +end diff --git a/lib/refinery/blog/engine.rb b/lib/refinery/blog/engine.rb index 8ca1f0a..078b97f 100644 --- a/lib/refinery/blog/engine.rb +++ b/lib/refinery/blog/engine.rb @@ -1,4 +1,5 @@ -require 'rails_autolink' +require 'refinerycms-blog' +require 'rails' module Refinery module Blog diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb index 88b8afc..e08f070 100644 --- a/lib/refinerycms-blog.rb +++ b/lib/refinerycms-blog.rb @@ -1,31 +1 @@ -require 'rubygems' -require 'bundler' -Bundler.require - -require 'filters_spam' - -module Refinery - autoload :BlogGenerator, 'generators/refinery/blog/blog_generator' - - module Blog - autoload :Version, 'refinery/blog/version' - autoload :Tab, 'refinery/blog/tabs' - - class << self - attr_accessor :root - def root - @root ||= Pathname.new(File.expand_path('../../', __FILE__)) - end - - def version - ::Refinery::Blog::Version.to_s - end - - def factory_paths - @factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ] - end - end - end -end - -require 'refinery/blog/engine' if defined?(Rails) +require 'refinery/blog' |