Sha256: cb08c14f6b5300c63b7585112e7ed6a38d08de00c943db0fe46a754950c63c0b

Contents?: true

Size: 833 Bytes

Versions: 28

Compression:

Stored size: 833 Bytes

Contents

module Merb::Generators
  
  class MerbPluginGenerator < NamedGenerator
    
    def initialize(*args)
      Merb.disable(:initfile)
      super
    end

    def self.source_root
      File.join(super, 'application', 'merb_plugin')
    end
    
    option :testing_framework, :default => :rspec, :desc => 'Testing framework to use (one of: rspec, test_unit)'
    option :orm, :default => :none, :desc => 'Object-Relation Mapper to use (one of: none, activerecord, datamapper, sequel)'
    option :bin, :as => :boolean # TODO: explain this
    
    desc <<-DESC
      Generates a new Merb plugin.
    DESC
    
    glob!
    
    first_argument :name, :required => true, :desc => "Plugin name"
    
    def destination_root
      File.join(@destination_root, base_name)
    end
    
  end
  
  add :plugin, MerbPluginGenerator
  
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
merb-gen-1.1.3 lib/generators/merb_plugin.rb
merb-gen-1.1.2 lib/generators/merb_plugin.rb
merb-gen-1.1.1 lib/generators/merb_plugin.rb
merb-gen-1.1.0 lib/generators/merb_plugin.rb
merb-gen-1.1.0.rc1 lib/generators/merb_plugin.rb
merb-gen-1.1.0.pre lib/generators/merb_plugin.rb
merb-gen-1.0.15 lib/generators/merb_plugin.rb
merb-gen-1.0.14 lib/generators/merb_plugin.rb
merb-gen-1.0.13 lib/generators/merb_plugin.rb
merb-gen-1.0.12 lib/generators/merb_plugin.rb
merb-gen-0.9.13 lib/generators/merb_plugin.rb
merb-gen-0.9.12 lib/generators/merb_plugin.rb
merb-gen-0.9.11 lib/generators/merb_plugin.rb
merb-gen-1.0.10 lib/generators/merb_plugin.rb
merb-gen-1.0.11 lib/generators/merb_plugin.rb
merb-gen-1.0.2 lib/generators/merb_plugin.rb
merb-gen-1.0.1 lib/generators/merb_plugin.rb
merb-gen-1.0.8.1 lib/generators/merb_plugin.rb
merb-gen-1.0.6 lib/generators/merb_plugin.rb
merb-gen-1.0.3 lib/generators/merb_plugin.rb