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

Version Path
typo-5.5 lib/generators/sidebar/sidebar_generator.rb
typo-5.4.4 lib/generators/sidebar/sidebar_generator.rb
typo-5.4.3 lib/generators/sidebar/sidebar_generator.rb
typo-5.4.2 lib/generators/sidebar/sidebar_generator.rb
typo-5.4.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.4 lib/generators/sidebar/sidebar_generator.rb
typo-4.1.1 lib/generators/sidebar/sidebar_generator.rb
typo-4.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.0.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.0.2 lib/generators/sidebar/sidebar_generator.rb
typo-5.0.3.98.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.0.3.98 lib/generators/sidebar/sidebar_generator.rb
typo-5.0 lib/generators/sidebar/sidebar_generator.rb
typo-5.1.2 lib/generators/sidebar/sidebar_generator.rb
typo-5.1.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.1.3 lib/generators/sidebar/sidebar_generator.rb
typo-5.1 lib/generators/sidebar/sidebar_generator.rb
typo-5.1.98 lib/generators/sidebar/sidebar_generator.rb
typo-5.2.98 lib/generators/sidebar/sidebar_generator.rb
typo-5.2 lib/generators/sidebar/sidebar_generator.rb