scaleflex / cloudimage-rb

Official Ruby API wrapper for Cloudimage's API. Any questions or issues, please report to https://github.com/scaleflex/cloudimage-rb/issues
Other
4 stars 1 forks source link

Automatic aliases #22

Closed janklimo closed 4 years ago

janklimo commented 4 years ago

For scenarios when the path already includes base cloudimage component, it'd be helpful to make aliases work out of the box:

client = Cloudimage::Client.new(token: 'demoflush')
client.path('https://demoflush.cloudimg.io/birds.jpg').to_url
# https://demoflush.cloudimg.io/birds.jpg, not https://demoflush.cloudimg.io/https://demoflush.cloudimg.io/birds.jpg