Sha256: 859dd5fc2d2a633ee8fd0b932be68d4fbea0ddcf6f180d432e5e78d547b63281

Contents?: true

Size: 787 Bytes

Versions: 5

Compression:

Stored size: 787 Bytes

Contents

module DeliveryBoy
  class Railtie < Rails::Railtie
    initializer "delivery_boy.load_config" do
      config = DeliveryBoy.config

      if File.exist?("config/delivery_boy.yml")
        config.load_file("config/delivery_boy.yml", Rails.env)
      end

      if File.exist?("config/delivery_boy.rb")
        require "config/delivery_boy"
      end

      if config.datadog_enabled
        require "kafka/datadog"

        Kafka::Datadog.host = config.datadog_host if config.datadog_host.present?
        Kafka::Datadog.port = config.datadog_port if config.datadog_port.present?
        Kafka::Datadog.namespace = config.datadog_namespace if config.datadog_namespace.present?
        Kafka::Datadog.tags = config.datadog_tags if config.datadog_tags.present?
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
delivery_boy-0.2.6 lib/delivery_boy/railtie.rb
delivery_boy-0.2.5 lib/delivery_boy/railtie.rb
delivery_boy-0.2.4 lib/delivery_boy/railtie.rb
delivery_boy-0.2.3 lib/delivery_boy/railtie.rb
delivery_boy-0.2.2 lib/delivery_boy/railtie.rb