Thank you for your interest in contributing. This document explains how to get set up, run tests, and submit changes.
By participating in this project, you agree to uphold our Code of Conduct.
- Ruby 3.2+ (see .ruby-version)
- Bundler ~> 2.4
git clone https://github.com/zerobounce/zero-bounce-ruby.git
cd zero-bounce-ruby
bundle installTests use RSpec with VCR for recorded HTTP interactions. Use the placeholder key so cassettes match:
ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspecOr copy .env.example to .env, set ZEROBOUNCE_API_KEY=vcr_test_key, then:
bundle exec rspecWith Docker:
docker build -t zerobounce-ruby-test .
docker run --rm zerobounce-ruby-testThe project uses RuboCop. Run before submitting:
bundle exec rubocopOpen an issue and include:
- Ruby version (
ruby -v) - Steps to reproduce
- Expected vs actual behavior
- Relevant code or error messages
- Check existing issues and pull requests first.
- Open an issue to discuss larger changes or API design before coding.
-
Fork the repository and create a branch from
main:git checkout -b feature/your-feature-name
-
Make your changes and add or update tests where relevant.
-
Run the suite and RuboCop:
ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspec bundle exec rubocop
-
Commit with a clear message (e.g.
Add X,Fix Y). -
Push your branch and open a Pull Request against
main. -
In the PR description, briefly explain what changed and why. Link any related issues.
Maintainers will review and may request changes. Once approved, your PR can be merged.
lib/– SDK source (entry point:lib/zerobounce.rb)spec/– RSpec tests and VCR cassettes (spec/cassettes/)data/– Sample CSV files for batch validation and scoring examples
If you change or add API calls and need to re-record cassettes:
- Use a valid Zero Bounce API key (e.g. from dashboard).
- Set
ZEROBOUNCE_API_KEYand run the specs; VCR will record new HTTP interactions. - Replace any real API key in the new cassette files with
vcr_test_keybefore committing, so the repo never contains real credentials.
Thanks for contributing.