Sha256: 61661dc6cd3dc3af47e0c58b0ea820207e4b61bcc589ce314eea6834ab776ec5

Contents?: true

Size: 587 Bytes

Versions: 5

Compression:

Stored size: 587 Bytes

Contents

module LaunchDarkly
  module Impl
    module Util
      def self.is_bool(aObject)
         [true,false].include? aObject
      end

      def self.current_time_millis
        (Time.now.to_f * 1000).to_i
      end

      def self.default_http_headers(sdk_key, config)
        ret = { "Authorization" => sdk_key, "User-Agent" => "RubyClient/" + LaunchDarkly::VERSION }
        if config.wrapper_name
          ret["X-LaunchDarkly-Wrapper"] = config.wrapper_name +
            (config.wrapper_version ? "/" + config.wrapper_version : "")
        end
        ret
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
launchdarkly-server-sdk-6.3.4 lib/ldclient-rb/impl/util.rb
launchdarkly-server-sdk-6.3.3 lib/ldclient-rb/impl/util.rb
launchdarkly-server-sdk-6.3.2 lib/ldclient-rb/impl/util.rb
launchdarkly-server-sdk-6.3.1 lib/ldclient-rb/impl/util.rb
launchdarkly-server-sdk-6.3.0 lib/ldclient-rb/impl/util.rb