Skip to content

Commit 8a9defb

Browse files
committed
polish
1 parent ea9928a commit 8a9defb

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

lib/splitclient-rb/cache/fetchers/split_fetcher.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def call
2222
splits_thread
2323
end
2424

25-
def fetch_splits(fetch_options = { cache_control_headers: false, till: nil, till_rbs: nil })
25+
def fetch_splits(fetch_options = { cache_control_headers: false, till: nil })
2626
@semaphore.synchronize do
2727
data = splits_since(@splits_repository.get_change_number, @rule_based_segments_repository.get_change_number, fetch_options)
2828

@@ -57,7 +57,7 @@ def splits_thread
5757
end
5858
end
5959

60-
def splits_since(since, since_rbs, fetch_options = { cache_control_headers: false, till: nil, till_rbs: nil })
60+
def splits_since(since, since_rbs, fetch_options = { cache_control_headers: false, till: nil })
6161
splits_api.since(since, since_rbs, fetch_options)
6262
end
6363

lib/splitclient-rb/engine/api/splits.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ def initialize(api_key, config, telemetry_runtime_producer)
1212
@flag_sets_filter = @config.flag_sets_filter
1313
end
1414

15-
def since(since, since_rbs, fetch_options = { cache_control_headers: false, till: nil, till_rbs: nil, sets: nil})
15+
def since(since, since_rbs, fetch_options = { cache_control_headers: false, till: nil, sets: nil})
1616
start = Time.now
1717

1818
params = { s: SplitIoClient::Spec::FeatureFlags::SPEC_VERSION, since: since, rbSince: since_rbs }
1919
params[:sets] = @flag_sets_filter.join(",") unless @flag_sets_filter.empty?
2020
params[:till] = fetch_options[:till] unless fetch_options[:till].nil?
21-
params[:till_rbs] = fetch_options[:till_rbs] unless fetch_options[:till_rbs].nil?
2221
@config.logger.debug("Fetching from splitChanges with #{params}: ")
2322
response = get_api("#{@config.base_uri}/splitChanges", @api_key, params, fetch_options[:cache_control_headers])
2423
if response.status == 414

spec/engine/api/splits_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
})
5353
.to_return(status: 200, body: splits)
5454

55-
fetch_options = { cache_control_headers: false, till: nil, till_rbs: nil, sets: ['set_1','set_2'] }
55+
fetch_options = { cache_control_headers: false, till: nil, sets: ['set_1','set_2'] }
5656
returned_splits = splits_api.since(-1, -1, fetch_options)
5757
expect(returned_splits[:segment_names]).to eq(Set.new(%w[demo employees]))
5858

@@ -72,7 +72,7 @@
7272
})
7373
.to_return(status: 414, body: splits)
7474

75-
fetch_options = { cache_control_headers: false, till: nil, till_rbs: nil, sets: ['set_1','set_2'] }
75+
fetch_options = { cache_control_headers: false, till: nil, sets: ['set_1','set_2'] }
7676
captured = 0
7777
begin
7878
returned_splits = splits_api.since(-1, -1, fetch_options)
@@ -126,7 +126,7 @@
126126
})
127127
.to_return(status: 200, body: splits)
128128

129-
fetch_options = { cache_control_headers: false, till: 123_123, till_rbs: nil, sets: nil }
129+
fetch_options = { cache_control_headers: false, till: 123_123, sets: nil }
130130
returned_splits = splits_api.since(-1, -1, fetch_options)
131131
expect(returned_splits[:segment_names]).to eq(Set.new(%w[demo employees]))
132132

@@ -147,7 +147,7 @@
147147
})
148148
.to_return(status: 200, body: splits)
149149

150-
fetch_options = { cache_control_headers: true, till: nil, till_rbs: nil, sets: nil }
150+
fetch_options = { cache_control_headers: true, till: nil, sets: nil }
151151
returned_splits = splits_api.since(-1, -1, fetch_options)
152152
expect(returned_splits[:segment_names]).to eq(Set.new(%w[demo employees]))
153153

0 commit comments

Comments
 (0)