lib/generators/motorhead_generator.rb in motorhead-0.4.1 vs lib/generators/motorhead_generator.rb in motorhead-0.5.0
- old
+ new
@@ -1,11 +1,11 @@
+# frozen_string_literal: true
require 'rails/generators/rails/plugin/plugin_generator'
class MotorheadGenerator < ::Rails::Generators::PluginGenerator
class EngineBuilder < ::Rails::PluginBuilder
def readme() end
- def rakefile() end
end
argument :base_controller, type: :string, optional: true, banner: 'base controller'
argument :actions, type: :array, default: [], banner: "action action"
source_root ::Rails::Generators::PluginGenerator.source_root
@@ -59,7 +59,16 @@
Dir.chdir destination_root do
#FIXME call the controller generator directly
puts `rails g motorhead:controller #{name}/#{base_controller} #{actions * ' '}`
end
end
+ end
+
+ def rm_rakefile
+ remove_file 'Rakefile'
+ end
+
+ # override
+ def with_dummy_app?
+ false
end
end