aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/refinery/blog.rb29
-rw-r--r--lib/refinery/blog/engine.rb3
-rw-r--r--lib/refinerycms-blog.rb32
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'