Skip to content

Commit

Permalink
Update blog generator to use Rails 3.1 base
Browse files Browse the repository at this point in the history
Seeds will now follow Rails 3.1 conventions
  • Loading branch information
Jamie Winsor committed Oct 28, 2011
1 parent 8cd4a28 commit 5a95800
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -5,7 +5,7 @@ rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end

ENGINE_ROOT = File.dirname(__FILE__)
ENGINE_PATH = File.dirname(__FILE__)
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)

if File.exists?(APP_RAKEFILE)
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions lib/generators/blog_generator.rb

This file was deleted.

16 changes: 16 additions & 0 deletions lib/generators/refinery/blog/blog_generator.rb
@@ -0,0 +1,16 @@
module Refinery
class BlogGenerator < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)

def append_load_seed_data
append_file 'db/seeds.rb', :verbose => true do
<<-EOH
# Added by RefineryCMS Blog engine
Refinery::Blog::Engine.load_seed
EOH
end
end

end
end
3 changes: 2 additions & 1 deletion lib/refinerycms-blog.rb
Expand Up @@ -3,9 +3,10 @@
Bundler.require

require 'filters_spam'
require File.expand_path('../generators/blog_generator', __FILE__)

module Refinery
autoload :BlogGenerator, 'generators/refinery/blog/blog_generator'

module Blog
autoload :Version, 'refinery/blog/version'
autoload :Tab, 'refinery/blog/tabs'
Expand Down

0 comments on commit 5a95800

Please sign in to comment.