Sha256: 2561a29c3eff50699b153b86be8839136115e8fd260065d3362c5d020794c873

Contents?: true

Size: 877 Bytes

Versions: 10

Compression:

Stored size: 877 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)
      end

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

      file :common_file do |file|
        file.source = File.join(common_templates_dir, "merb_thor", "common.rb")
        file.destination = File.join("bin", "common.rb")
      end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
merb-gen-1.0.15 lib/generators/thor.rb
merb-gen-1.0.14 lib/generators/thor.rb
merb-gen-1.0.13 lib/generators/thor.rb
merb-gen-1.0.12 lib/generators/thor.rb
merb-gen-1.0.10 lib/generators/thor.rb
merb-gen-1.0.11 lib/generators/thor.rb
merb-gen-1.0.7.1 lib/generators/thor.rb
merb-gen-1.0.8 lib/generators/thor.rb
merb-gen-1.0.8.1 lib/generators/thor.rb
merb-gen-1.0.9 lib/generators/thor.rb