aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 13:46:24 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 13:46:24 +0300
commit3fa8937b95a4d90000ad1be9c588424052136455 (patch)
tree07e61cd13bd88a76d13c3d759475d67d088d5f6e /lib
parente5db679226bac7ef8ddd568c40f52addd52d7a8a (diff)
downloadrefinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.gz
refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.bz2
refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.zip
Rails 3.1 - wip.
Diffstat (limited to 'lib')
-rw-r--r--lib/gemspec.rb2
-rw-r--r--lib/generators/blog_generator.rb10
-rw-r--r--lib/generators/refinerycms_blog_generator.rb8
-rw-r--r--lib/refinery/blog/version.rb6
-rw-r--r--lib/refinerycms-blog.rb9
5 files changed, 19 insertions, 16 deletions
diff --git a/lib/gemspec.rb b/lib/gemspec.rb
index 3562315..60c9671 100644
--- a/lib/gemspec.rb
+++ b/lib/gemspec.rb
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
# Runtime dependencies
- s.add_dependency 'refinerycms-core', '~> 1.0.3'
+ s.add_dependency 'refinerycms-core', '~> 1.1.0'
s.add_dependency 'filters_spam', '~> 0.2'
s.add_dependency 'acts-as-taggable-on'
s.add_dependency 'seo_meta', '~> 1.1.0'
diff --git a/lib/generators/blog_generator.rb b/lib/generators/blog_generator.rb
new file mode 100644
index 0000000..8b09bb7
--- /dev/null
+++ b/lib/generators/blog_generator.rb
@@ -0,0 +1,10 @@
+require 'refinery/generators'
+
+module ::Refinery
+ class BlogGenerator < ::Refinery::Generators::EngineInstaller
+
+ source_root File.expand_path('../../../', __FILE__)
+ engine_name "refinerycms-blog"
+
+ end
+end
diff --git a/lib/generators/refinerycms_blog_generator.rb b/lib/generators/refinerycms_blog_generator.rb
deleted file mode 100644
index 6fca607..0000000
--- a/lib/generators/refinerycms_blog_generator.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'refinery/generators'
-
-class RefinerycmsBlogGenerator < ::Refinery::Generators::EngineInstaller
-
- source_root File.expand_path('../../../', __FILE__)
- engine_name "refinerycms-blog"
-
-end \ No newline at end of file
diff --git a/lib/refinery/blog/version.rb b/lib/refinery/blog/version.rb
index 0390414..4023000 100644
--- a/lib/refinery/blog/version.rb
+++ b/lib/refinery/blog/version.rb
@@ -1,9 +1,9 @@
module Refinery
module Blog
class Version
- @major = 1
- @minor = 6
- @tiny = 2
+ @major = 2
+ @minor = 0
+ @tiny = 0
class << self
attr_reader :major, :minor, :tiny
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb
index 452863b..10be99d 100644
--- a/lib/refinerycms-blog.rb
+++ b/lib/refinerycms-blog.rb
@@ -1,4 +1,5 @@
require 'filters_spam'
+require File.expand_path('../generators/blog_generator', __FILE__)
module Refinery
module Blog
@@ -25,14 +26,14 @@ module Refinery
require File.expand_path('../refinery/blog/tabs', __FILE__)
end
- config.after_initialize do
+ initializer "init plugin", :after => :set_routes_reloader do |app|
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.url = app.routes.url_helpers.refinery_admin_blog_posts_path
+ plugin.menu_match = /^\/refinery\/blog\/?(posts|comments|categories)?/
plugin.activity = {
- :class => BlogPost
+ :class => Refinery::BlogPost
}
end
end