Skip to content

Latest commit

 

History

History
112 lines (72 loc) · 2.92 KB

File metadata and controls

112 lines (72 loc) · 2.92 KB

Contributing to Zero Bounce Ruby SDK

Thank you for your interest in contributing. This document explains how to get set up, run tests, and submit changes.

Code of Conduct

By participating in this project, you agree to uphold our Code of Conduct.

Getting Started

Prerequisites

Setup

git clone https://github.com/zerobounce/zero-bounce-ruby.git
cd zero-bounce-ruby
bundle install

Running Tests

Tests use RSpec with VCR for recorded HTTP interactions. Use the placeholder key so cassettes match:

ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspec

Or copy .env.example to .env, set ZEROBOUNCE_API_KEY=vcr_test_key, then:

bundle exec rspec

With Docker:

docker build -t zerobounce-ruby-test .
docker run --rm zerobounce-ruby-test

Code Style

The project uses RuboCop. Run before submitting:

bundle exec rubocop

How to Contribute

Reporting Bugs

Open an issue and include:

  • Ruby version (ruby -v)
  • Steps to reproduce
  • Expected vs actual behavior
  • Relevant code or error messages

Suggesting Changes

  • Check existing issues and pull requests first.
  • Open an issue to discuss larger changes or API design before coding.

Submitting Changes

  1. Fork the repository and create a branch from main:

    git checkout -b feature/your-feature-name
  2. Make your changes and add or update tests where relevant.

  3. Run the suite and RuboCop:

    ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspec
    bundle exec rubocop
  4. Commit with a clear message (e.g. Add X, Fix Y).

  5. Push your branch and open a Pull Request against main.

  6. 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.

Project Layout

  • 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

Re-recording VCR Cassettes

If you change or add API calls and need to re-record cassettes:

  1. Use a valid Zero Bounce API key (e.g. from dashboard).
  2. Set ZEROBOUNCE_API_KEY and run the specs; VCR will record new HTTP interactions.
  3. Replace any real API key in the new cassette files with vcr_test_key before committing, so the repo never contains real credentials.

Questions

Thanks for contributing.