launchdarkly-server-sdk 8.7.0 → 8.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5af0bbef2faa957948f0a7f50e15fcabe977389a33985907183d58325e1c6b3d
4
- data.tar.gz: 4ecb07d71897441c2d02cc1972a75b63f07615b6fa1266330f7403c5e36c01c2
3
+ metadata.gz: 1692535bf245c0627c6e08cb87f168b11d7518d895bf9faacb2858da227f9d70
4
+ data.tar.gz: fa60f044217ac286dd817b325ea87c431ce0399decc5ee84741638959b1a5697
5
5
  SHA512:
6
- metadata.gz: 22409520414843c8249e2fa303686289c3701d7802fb558fe87870d4d5293381fabbf4f0634f6a14784e77eb328a5601929e096555bdc14f66ee4826a6f36316
7
- data.tar.gz: 36f9746807944960f161f83f4a37258d0d6ce1035018dc4d49c2e9b2a1d09fa96e83f35e6a1a0afeb30ee902bf4713e74ef06d32068611458d384a35561775e9
6
+ metadata.gz: 92fc2011f8a0a8ca594863155081e60abfdeec0be8d50a1ebf051ed0a7a97406eac7560a12cf9a5c2beed7de71b58ff0dc720569b67f65f2f582fb2f7b1528c0
7
+ data.tar.gz: e6a8b529997e0df8dfdf2a1b82c716211661bbeece2b50777146b5c6fdb7c8d97f69d23057ad6586b0730c9717fcb15b07a9808213da21ad7f9fbc91595c91f9
@@ -77,7 +77,7 @@ module LaunchDarkly
77
77
  @socket_factory = opts[:socket_factory]
78
78
  @big_segments = opts[:big_segments] || BigSegmentsConfig.new(store: nil)
79
79
  @application = LaunchDarkly::Impl::Util.validate_application_info(opts[:application] || {}, @logger)
80
- @payload_filter_key = opts[:payload_filter_key]
80
+ @payload_filter_key = LaunchDarkly::Impl::Util.validate_payload_filter_key(opts[:payload_filter_key] , @logger)
81
81
  @hooks = (opts[:hooks] || []).keep_if { |hook| hook.is_a? Interfaces::Hooks::Hook }
82
82
  @omit_anonymous_contexts = opts.has_key?(:omit_anonymous_contexts) && opts[:omit_anonymous_contexts]
83
83
  @data_source_update_sink = nil
@@ -75,6 +75,21 @@ module LaunchDarkly
75
75
  version: validate_application_value(app[:version], :version, logger),
76
76
  }
77
77
  end
78
+
79
+ #
80
+ # @param value [String, nil]
81
+ # @param logger [Logger]
82
+ # @return [String, nil]
83
+ #
84
+ def self.validate_payload_filter_key(value, logger)
85
+ return nil if value.nil?
86
+ return value if value.is_a?(String) && /^[a-zA-Z0-9][._\-a-zA-Z0-9]*$/.match?(value)
87
+
88
+ logger.warn {
89
+ "Invalid payload filter configured, full environment will be fetched. Ensure the filter key is not empty and was copied correctly from LaunchDarkly settings."
90
+ }
91
+ nil
92
+ end
78
93
  end
79
94
  end
80
95
  end
@@ -77,11 +77,6 @@ module LaunchDarkly
77
77
  def self.add_payload_filter_key(uri, config)
78
78
  return uri if config.payload_filter_key.nil?
79
79
 
80
- unless config.payload_filter_key.is_a?(String) && !config.payload_filter_key.empty?
81
- config.logger.warn { "[LDClient] Filter key must be a non-empty string. No filtering will be applied." }
82
- return uri
83
- end
84
-
85
80
  begin
86
81
  parsed = URI.parse(uri)
87
82
  new_query_params = URI.decode_www_form(String(parsed.query)) << ["filter", config.payload_filter_key]
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "8.7.0" # x-release-please-version
2
+ VERSION = "8.7.1" # x-release-please-version
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launchdarkly-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.7.0
4
+ version: 8.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-25 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -24,6 +24,26 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.57'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.3'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 3.3.7
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '3.3'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 3.3.7
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: bundler
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -390,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
410
  - !ruby/object:Gem::Version
391
411
  version: '0'
392
412
  requirements: []
393
- rubygems_version: 3.5.11
413
+ rubygems_version: 3.5.16
394
414
  signing_key:
395
415
  specification_version: 4
396
416
  summary: LaunchDarkly SDK for Ruby