Skip to content

Commit

Permalink
Remove usage of Hash#slice and Hash#compact to support older ruby ver…
Browse files Browse the repository at this point in the history
…sions
  • Loading branch information
elhu committed Mar 1, 2019
1 parent 82b4dda commit 84248e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/contentful/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def timeout_params
connect: configuration[:timeout_connect],
read: configuration[:timeout_read],
write: configuration[:timeout_write]
}.compact
}.reject { |_, value| value.nil? }
end

# Returns the default configuration
Expand Down
2 changes: 1 addition & 1 deletion spec/client_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class Cat < Contentful::Entry
1.upto(2) do |options_count|
full_options.keys.combination(options_count).each do |option_keys|
expect do
create_client(full_options.slice(*option_keys))
create_client(full_options.select { |key, _| option_keys.include?(key) })
end.to raise_error(ArgumentError)
end
end
Expand Down

0 comments on commit 84248e1

Please sign in to comment.