Skip to content

Commit 83d6524

Browse files
prepare 6.2.3 release (#183)
1 parent 5870313 commit 83d6524

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/ldclient-rb/impl/diagnostic_events.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def self.make_config_data(config)
7979
streamingDisabled: !config.stream?,
8080
userKeysCapacity: config.user_keys_capacity,
8181
userKeysFlushIntervalMillis: self.seconds_to_millis(config.user_keys_flush_interval),
82-
usingProxy: ENV.has_key?('http_proxy') || ENV.has_key?('https_proxy') || ENV.has_key?('HTTP_PROXY'),
82+
usingProxy: ENV.has_key?('http_proxy') || ENV.has_key?('https_proxy') || ENV.has_key?('HTTP_PROXY') || ENV.has_key?('HTTPS_PROXY'),
8383
usingRelayDaemon: config.use_ldd?,
8484
}
8585
ret

spec/diagnostic_events_spec.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ def expected_default_config
7979
end
8080
end
8181

82-
it "detects proxy" do
83-
begin
84-
ENV["http_proxy"] = 'http://my-proxy'
85-
event = default_acc.create_init_event(Config.new)
86-
expect(event[:configuration][:usingProxy]).to be true
87-
ensure
88-
ENV["http_proxy"] = nil
82+
['http_proxy', 'https_proxy', 'HTTP_PROXY', 'HTTPS_PROXY'].each do |name|
83+
it "detects proxy #{name}" do
84+
begin
85+
ENV[name] = 'http://my-proxy'
86+
event = default_acc.create_init_event(Config.new)
87+
expect(event[:configuration][:usingProxy]).to be true
88+
ensure
89+
ENV[name] = nil
90+
end
8991
end
9092
end
9193

0 commit comments

Comments
 (0)