Sha256: db4bebbe06c6ca8d7fabbdcdede83cc6a19d0806d9ef763d68cb3a8cbd7dc4cc
Contents?: true
Size: 711 Bytes
Versions: 21
Compression:
Stored size: 711 Bytes
Contents
class SidebarGenerator < Rails::Generator::NamedBase attr_reader :plugin_path def initialize(runtime_args, runtime_options = { }) super @plugin_path = "vendor/plugins/#{file_name}" end def manifest record do |m| m.directory "#{plugin_path}/lib" m.directory "#{plugin_path}/test" m.directory "#{plugin_path}/views" m.template 'init.rb', "#{plugin_path}/init.rb" m.template 'sidebar.rb', "#{plugin_path}/lib/#{file_name}.rb" m.template 'unit_test.rb', "#{plugin_path}/test/#{file_name}_test.rb" m.template 'Rakefile', "#{plugin_path}/Rakefile" m.template 'content.rhtml', "#{plugin_path}/views/content.rhtml" end end end
Version data entries
21 entries across 21 versions & 1 rubygems