Sha256: f2c52a2871c003acc1821c4f7cfd6ab9e02426f52deb3d435e0017fed1415998
Contents?: true
Size: 909 Bytes
Versions: 19
Compression:
Stored size: 909 Bytes
Contents
# frozen_string_literal: true module KafkaConsumer module Generators module Concerns module Configuration extend ActiveSupport::Concern CONFIG_PATH = "config/kafka_consumer.yml" def check_config_file! config_path = File.expand_path(CONFIG_PATH) return if File.exist?(config_path) generate = ask "The file #{config_path} does not appear to exist. " \ "Would you like to generate it? [Yn]" generator_name = "kafka_consumer:install" if (generate.presence || "y").casecmp("y").zero? generate generator_name else raise Rails::Generators::Error, "Please generate #{config_path} " \ "by running `bin/rails g #{generator_name}` " \ "or add this file manually." end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems