lib/ldclient-rb/config.rb in launchdarkly-server-sdk-6.3.4 vs lib/ldclient-rb/config.rb in launchdarkly-server-sdk-6.4.0

- old
+ new

@@ -42,10 +42,11 @@ # @option opts [Float] :diagnostic_recording_interval (900) See {#diagnostic_recording_interval}. # @option opts [String] :wrapper_name See {#wrapper_name}. # @option opts [String] :wrapper_version See {#wrapper_version}. # @option opts [#open] :socket_factory See {#socket_factory}. # @option opts [BigSegmentsConfig] :big_segments See {#big_segments}. + # @option opts [Hash] :application See {#application} # def initialize(opts = {}) @base_uri = (opts[:base_uri] || Config.default_base_uri).chomp("/") @stream_uri = (opts[:stream_uri] || Config.default_stream_uri).chomp("/") @events_uri = (opts[:events_uri] || Config.default_events_uri).chomp("/") @@ -75,10 +76,11 @@ opts[:diagnostic_recording_interval] : Config.default_diagnostic_recording_interval @wrapper_name = opts[:wrapper_name] @wrapper_version = opts[:wrapper_version] @socket_factory = opts[:socket_factory] @big_segments = opts[:big_segments] || BigSegmentsConfig.new(store: nil) + @application = LaunchDarkly::Impl::Util.validate_application_info(opts[:application] || {}, @logger) end # # The base URL for the LaunchDarkly server. This is configurable mainly for testing # purposes; most users should use the default value. @@ -281,9 +283,27 @@ # documentation: https://docs.launchdarkly.com/home/users/big-segments # # @return [BigSegmentsConfig] # attr_reader :big_segments + + # + # An object that allows configuration of application metadata. + # + # Application metadata may be used in LaunchDarkly analytics or other product features, but does not affect feature flag evaluations. + # + # If you want to set non-default values for any of these fields, provide the appropriately configured hash to the {Config} object. + # + # @example Configuring application information + # opts[:application] = { + # id: "MY APPLICATION ID", + # version: "MY APPLICATION VERSION" + # } + # config = LDConfig.new(opts) + # + # @return [Hash] + # + attr_reader :application # @deprecated This is replaced by {#data_source}. attr_reader :update_processor # @deprecated This is replaced by {#data_source}.