Sha256: 847063c3c7bd220cbede08fe0cf4daf551877cff6ad33977b8eea7ad92363ffd

Contents?: true

Size: 1002 Bytes

Versions: 30

Compression:

Stored size: 1002 Bytes

Contents

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

    def self.source_root
      File.join(File.dirname(__FILE__), 'templates', 'full')
    end
    
    glob!
    
    common_template :javascript,  'public/javascripts/master.js'
    common_template :stylesheet,  'public/stylesheets/master.css'
    
    common_template :license,     'LICENSE'
    
    common_template :merbtasks,   'lib/%base_name%/merbtasks.rb'
    common_template :slicetasks,  'lib/%base_name%/slicetasks.rb'
    common_template :spectasks,   'lib/%base_name%/spectasks.rb'
    
    first_argument :name, :required => true
    
    option :testing_framework, :default => :rspec,
                               :desc => 'Testing framework to use (one of: rspec, test_unit).'
    
    def destination_root
      File.join(@destination_root, base_name)
    end
    
  end
  
  add_private :full_slice, FullSliceGenerator
  
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
merb-slices-1.1.3 lib/generators/full.rb
merb-slices-1.1.2 lib/generators/full.rb
merb-slices-1.1.1 lib/generators/full.rb
merb-slices-1.1.0 lib/generators/full.rb
merb-slices-1.1.0.rc1 lib/generators/full.rb
merb-slices-1.1.0.pre lib/generators/full.rb
merb-slices-1.0.15 lib/generators/full.rb
merb-slices-1.0.14 lib/generators/full.rb
merb-slices-1.0.13 lib/generators/full.rb
merb-slices-1.0.12 lib/generators/full.rb
merb-slices-0.9.10 lib/generators/full.rb
merb-slices-0.9.12 lib/generators/full.rb
merb-slices-0.9.13 lib/generators/full.rb
merb-slices-0.9.9 lib/generators/full.rb
merb-slices-1.0.1 lib/generators/full.rb
merb-slices-1.0.10 lib/generators/full.rb
merb-slices-1.0.11 lib/generators/full.rb
merb-slices-1.0.2 lib/generators/full.rb
merb-slices-1.0.3 lib/generators/full.rb
merb-slices-1.0.5 lib/generators/full.rb