uploadcare / uploadcare-ruby

Ruby API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
https://uploadcare.com
MIT License
39 stars 28 forks source link

Fix dry-configurable deprecation warnings #98

Closed dalizard closed 2 years ago

dalizard commented 2 years ago

Description

With version 0.13.0 of the dry-configurable gem, the default value for a setting provided as a positional argument is deprecated. The default: keyword argument should be used instead.

This pull request fixes #97.

Checklist

skliask commented 2 years ago

Nice man!

I was about to work on this too. Good job! 🦾

dmitry-mukhin commented 2 years ago

<3

dmitry-mukhin commented 2 years ago

@rsedykh we need to figure out if we want to drop support for rubies <= 2.7

dalizard commented 2 years ago

@dmitry-mukhin Hmm, it's interesting that the <= 2.7 specs are failing -- I don't see how this is related to my changes 🤔

dmitry-mukhin commented 2 years ago

@dalizard I assume it's due to dry-configurable reqs

dalizard commented 2 years ago

@dmitry-mukhin You are spot on! The dry-configurable gem has introduced the default keyword argument and deprecated the positional default argument in version 0.13.0, which also requires Ruby >= 2.6.0. In essence there is no way to use the default keyword argument if Ruby is < 2.6.0. There are different ways to approach and solve this -- my idea is to maintain Ruby backwards compatibility but also not simply silence warning messages.

mykhi commented 2 years ago

Bumping to get it merged.