KDEJewellers / aptly-api

Ruby client library for the Aptly API
http://www.rubydoc.info/github/KDEJewellers/aptly-api
GNU Lesser General Public License v3.0
4 stars 0 forks source link

deprecate uri construction by using uris for configuration #8

Closed hsitter closed 7 years ago

hsitter commented 7 years ago

URI being a standardized url is a superset of what we need/want to support for configuration WRT host access, so we can simply use URI as config is largely replicating URI anyway and ultimately falling back to constructing one

this is fully backwards compatible, albeit old stuff is marked deprecated.

the preferred way of configuration is now

Aptly.configure { |c| c.uri = URI::HTTP.build(host: 'api.example.com')) }

Setting the deprecated attributes still works but now passes the call through to the internal URI

hsitter commented 7 years ago

@shadeslayer please sanity review

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-51.2%) to 48.845% when pulling 540fadc4cd54234f1af85082ea2a3a049fc387a7 on uri-config into 4b47aac62ec2d753e73018d8aa2a03cb87051c05 on master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-51.2%) to 48.845% when pulling 4115a2cbc5eecee8cb4ba18212165a096c7fd0a6 on uri-config into 4b47aac62ec2d753e73018d8aa2a03cb87051c05 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 576926f06b62d326f2ab570525b7dabcb14a8f94 on uri-config into 4b47aac62ec2d753e73018d8aa2a03cb87051c05 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 6e1a8201c2ec38d74a6d4e2e778e2c284486b6cf on uri-config into 4b47aac62ec2d753e73018d8aa2a03cb87051c05 on master.

shadeslayer commented 7 years ago

LGTM