Sha256: 775628eb6d10eed43de32a6b90d5622f5656a2cf481b98b24635fde2839d1918

Contents?: true

Size: 476 Bytes

Versions: 10

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true

require "rails/generators"

module KafkaProducer
  module Generators
    class ProducerGenerator < Rails::Generators::NamedBase
      source_root File.expand_path("templates", __dir__)

      argument :producer_type, type: :string, banner: "sync/async"
      argument :topic, type: :string, banner: "topic"

      def insert_producer_class
        template "producer.rb.erb", "app/producers/#{file_path}_producer.rb"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sbmt-kafka_producer-3.2.0 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-3.1.1 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-3.1.0 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-3.0.0 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.2.3 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.2.2 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.2.1 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.2.0 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.1.0 lib/generators/kafka_producer/producer/producer_generator.rb
sbmt-kafka_producer-2.0.0 lib/generators/kafka_producer/producer/producer_generator.rb