Sha256: 23fce1a65c2f85ccac13f3c27adf7b207b1a2120502d306628cceeb74c404791

Contents?: true

Size: 775 Bytes

Versions: 1

Compression:

Stored size: 775 Bytes

Contents

require 'thor'

module RubygemsPluginGenerator
  class Generator < Thor::Group
    include Thor::Actions

    argument :name
    argument :klass

    def self.source_root
      File.dirname(__FILE__)
    end

    def create_gemspec_file
      template('templates/gemspec.tt', "#{name}/#{name}.gemspec")
    end

    def create_gemfile
      template('templates/gemfile.tt', "#{name}/Gemfile")
    end

    def create_version_file
      template('templates/version.tt', "#{name}/lib/#{name}/version.rb")
    end

    def create_rubygems_plugin_file
      template('templates/rubygems_plugin.tt', "#{name}/lib/rubygems_plugin.rb")
    end

    def create_command_file
      template('templates/command.tt', "#{name}/lib/rubygems/commands/#{name}_command.rb")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubygems_plugin_generator-0.1.0 lib/rubygems_plugin_generator/generator.rb