lib/rimless/dependencies.rb
def configure_avro_turf
        # No need to configure AvroTurf when no schema registry URL is
        # available. Its fine to skip this for scenarios where not the full
        # application configuration is available (eg. on Rails asset
        # precompilations, etc)
        return if Rimless.configuration.schema_registry_url.blank?

        # Setup a global available Apache Avro decoder/encoder with support for
        # the Confluent Schema Registry, but first create a helper instance
        Rimless.avro_utils = Rimless::AvroUtils.new
        # Compile our Avro schema templates to ready-to-consume Avro schemas
        Rimless.avro_utils.recompile_schemas
        # Register a global Avro messaging instance
        Rimless.avro = AvroTurf::Messaging.new(
          logger: Rimless.logger,
          namespace: Rimless.avro_utils.namespace,
          schemas_path: Rimless.avro_utils.output_path,
          registry_url: Rimless.configuration.schema_registry_url
        )
      end
# Set sensible defaults for the +AvroTurf+ gem and (re)compile the Apache
# Avro schema templates (ERB), so the gem can handle them properly.
Set sensible defaults for the +AvroTurf+ gem and (re)compile the Apache
Avro schema templates (ERB), so the gem can handle them properly.
Set sensible defaults for the + AvroTurf + gem and ( re ) compile the Apache Avro schema templates ( ERB ) so the gem can handle them properly .
def configure_avro_turf
        return if Rimless.configuration.schema_registry_url.blank?
        Rimless.avro_utils = Rimless::AvroUtils.new
        Rimless.avro_utils.recompile_schemas
        Rimless.avro = AvroTurf::Messaging.new(
          logger: Rimless.logger,
          namespace: Rimless.avro_utils.namespace,
          schemas_path: Rimless.avro_utils.output_path,
          registry_url: Rimless.configuration.schema_registry_url
        )
      end
def configure_avro_turf return if Rimless . configuration . schema_registry_url . blank? Rimless . avro_utils = Rimless :: AvroUtils . new Rimless . avro_utils . recompile_schemas Rimless . avro = AvroTurf :: Messaging . new ( logger : Rimless . logger , namespace : Rimless . avro_utils . namespace , schemas_path : Rimless . avro_utils . output_path , registry_url : Rimless . configuration . schema_registry_url ) end
Set sensible defaults for the +AvroTurf+ gem and (re)compile the Apache
Avro schema templates (ERB), so the gem can handle them properly.
Set sensible defaults for the + AvroTurf + gem and ( re ) compile the Apache Avro schema templates ( ERB ) so the gem can handle them properly .
# No need to configure AvroTurf when no schema registry URL is # available. Its fine to skip this for scenarios where not the full # application configuration is available (eg. on Rails asset # precompilations, etc) # Setup a global available Apache Avro decoder/encoder with support for # the Confluent Schema Registry, but first create a helper instance # Compile our Avro schema templates to ready-to-consume Avro schemas # Register a global Avro messaging instance