DNSAdapter
An adapter layer for DNS queries that makes it simple to swap in different DNS providers.
Supported Ruby Versions
DNSAdapter supports Ruby 3.3 and newer.
Supported versions
- 3.3
- 3.4
- 4.0
Installation
To get the latest updates from this repository, add the gem to your application's Gemfile:
gem 'dns_adapter', github: 'ValiMail/dns_adapter', branch: 'master'The latest version is no longer published to RubyGems.
Then run:
$ bundle
Usage
DNSAdapter contains a set of useful adapter classes that present a common set of return types and errors for DNS services. To use the gem, instantiate the desired adapter class.
Docker
This repository includes a Docker-based test environment so contributors can run the suite without depending on a local Ruby or RVM setup.
Run the default test container:
docker compose run --rm testRun the test suite against another supported Ruby version:
DNS_ADAPTER_RUBY_VERSION=3.4 docker compose run --rm --build testRun the local Ruby matrix:
for ruby in 3.3 3.4 4.0; do
DNS_ADAPTER_RUBY_VERSION="$ruby" docker compose run --rm --build test
doneOpen a shell in the same container:
docker compose run --rm test bashContributing
- Fork it ( https://github.com/[my-github-username]/dns_adapter/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Open a pull request