voxpupuli / puppet-network

Types and providers to manage network interfaces
https://forge.puppet.com/puppet/network
Apache License 2.0
67 stars 107 forks source link

Replace the IPAddress gem with the built-in IPAddr class #290

Closed imp- closed 1 year ago

imp- commented 1 year ago

Pull Request (PR) description

The module relies on the IPAddress gem to perform certain validations. It can be replaced by the IPAddr class, which does not require custom gem installation as it's part of the standard ruby distribution.

This pull request removes traces to the IPAddress gem in favour of the IPAddr class.

This Pull Request (PR) fixes the following issues

This should also fix #267

imp- commented 1 year ago

In hindsight, maybe it's better to leave the ipaddress parameters in the network class to not break compatibility. It could also be used to clean up the unused gem (new default).

bastelfreak commented 1 year ago

@imp- thanks for the PR. I fixed the puppet-lint warnings in https://github.com/voxpupuli/puppet-network/pull/291. can you please rebase? Also if you can implement this in a non-breaking way, that would be awesome, but that's not a requirement.

imp- commented 1 year ago

@bastelfreak there should be no more breaking changes now. The ipaddress gem is removed by default, in a future (major) release the code managing the gem can eventually be dropped.

Remaining code warnings are fixed as well.

bastelfreak commented 1 year ago

Thanks for the work!