Sha256: 44ec0b4971df29e044f893b3b58eabb1e2dce3272e68ee40702329a8219027e2

Contents?: true

Size: 695 Bytes

Versions: 4

Compression:

Stored size: 695 Bytes

Contents

module Merb
  module Generators
    class ThorGenerator < AppGenerator
      #
      # ==== Paths
      #

      def self.source_root
        File.join(super, 'application', 'common', 'merb_thor')
      end

      def destination_root
        File.join(@destination_root, 'tasks')
      end

      def common_templates_dir
        File.expand_path(File.join(File.dirname(__FILE__),
                                   'templates', 'application', 'common'))
      end

      directory :thor_file do |directory|
        directory.source = File.join(common_templates_dir, "merb_thor")
        directory.destination = File.join("merb.thor")
      end
    end
    add :thor,   ThorGenerator
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
merb-gen-1.0.6 lib/generators/thor.rb
merb-gen-1.0.7 lib/generators/thor.rb
merb-gen-1.0.5 lib/generators/thor.rb
merb-gen-1.0.6.1 lib/generators/thor.rb