zerobounce-sdk 1.1.2 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d0e54bfd6db4f61595d1ca91ea16090f9a4c3d31a167bbab38bda3b6760155d
4
- data.tar.gz: c05b9b9f3b680019d8bac6deddba297b0ba6d2708856fa01fab0038cdff89435
3
+ metadata.gz: 0ad61a7b25f176cba88173c9da307a70ac39a4526ff754f249c6a1d5aa58c598
4
+ data.tar.gz: 2de69f283fcfaeb2b1dfa7a8737c52353a7a3e54a7db40af28d0841ccb271a33
5
5
  SHA512:
6
- metadata.gz: d9a308aca4d26a7a28b6a15d6cde4735c8955c28e1210b23a2fe86779261ac726ebfc418d19b228caff7c37dd09e058e3f86b35bb533434b7aadfd52b7d421b6
7
- data.tar.gz: e9512073456e588ac04c14f8ee07dc8b84eae890031cc6ac2adc4766da1b80adce69e6a60112144e72d7561942f6c32674347a1ad24ab11b15ed2622b3b8d071
6
+ metadata.gz: d822a0fbfbded2214b11769169462c9148afac977edf7975e1ba960710e78fce5ac8b104b896779177e1e9685ec7fa39153dca00d0e6ded5f934ab8738969ae9
7
+ data.tar.gz: e0e097b43500401d4c0f8c737ffd9cabf9254132aa7da5774603db371363487277fc4738c15738881ef95b50535b555e3a723619a2fffef47d1c555ac57971c3
data/.env.example ADDED
@@ -0,0 +1,3 @@
1
+ # ZeroBounce API key (standard). Get your key at https://www.zerobounce.net/docs/api-dashboard
2
+ # Copy this file to .env and set your key.
3
+ ZEROBOUNCE_API_KEY=your_api_key_here
@@ -0,0 +1,5 @@
1
+ addReviewers: false
2
+ addAssignees: true
3
+ assignees:
4
+ - franciscbalint
5
+ numberOfAssignees: 1
@@ -0,0 +1,21 @@
1
+ name: Auto Assign
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - opened
7
+ - synchronize
8
+ - reopened
9
+
10
+ permissions:
11
+ contents: read
12
+ pull-requests: write
13
+
14
+ jobs:
15
+ add-assignee:
16
+ name: Auto assign (me only)
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: kentaro-m/auto-assign-action@v2.0.1
20
+ with:
21
+ configuration-path: ".github/auto_assign.yml"
@@ -0,0 +1,105 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL Advanced"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "develop" ]
17
+ pull_request:
18
+ branches: [ "develop" ]
19
+ schedule:
20
+ - cron: '19 14 * * 4'
21
+
22
+ permissions:
23
+ security-events: write
24
+ packages: read
25
+ actions: read
26
+ contents: read
27
+
28
+ jobs:
29
+ analyze:
30
+ name: Analyze (${{ matrix.language }})
31
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
32
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
33
+ # - https://gh.io/supported-runners-and-hardware-resources
34
+ # - https://gh.io/using-larger-runners (GitHub.com only)
35
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
36
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
37
+ permissions:
38
+ # required for all workflows
39
+ security-events: write
40
+
41
+ # required to fetch internal or private CodeQL packs
42
+ packages: read
43
+
44
+ # only required for workflows in private repositories
45
+ actions: read
46
+ contents: read
47
+
48
+ strategy:
49
+ fail-fast: false
50
+ matrix:
51
+ include:
52
+ - language: ruby
53
+ build-mode: none
54
+ # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
55
+ # Use `c-cpp` to analyze code written in C, C++ or both
56
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
57
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
58
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
59
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
60
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
61
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
62
+ steps:
63
+ - name: Checkout repository
64
+ uses: actions/checkout@v6
65
+
66
+ # Add any setup steps before running the `github/codeql-action/init` action.
67
+ # This includes steps like installing compilers or runtimes (`actions/setup-node`
68
+ # or others). This is typically only required for manual builds.
69
+ # - name: Setup runtime (example)
70
+ # uses: actions/setup-example@v1
71
+
72
+ # Initializes the CodeQL tools for scanning.
73
+ - name: Initialize CodeQL
74
+ uses: github/codeql-action/init@v4
75
+ with:
76
+ languages: ${{ matrix.language }}
77
+ build-mode: ${{ matrix.build-mode }}
78
+ # If you wish to specify custom queries, you can do so here or in a config file.
79
+ # By default, queries listed here will override any specified in a config file.
80
+ # Prefix the list here with "+" to use these queries and those in the config file.
81
+
82
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
83
+ # queries: security-extended,security-and-quality
84
+
85
+ # If the analyze step fails for one of the languages you are analyzing with
86
+ # "We were unable to automatically build your code", modify the matrix above
87
+ # to set the build mode to "manual" for that language. Then modify this step
88
+ # to build your code.
89
+ # ℹ️ Command-line programs to run using the OS shell.
90
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
91
+ - name: Run manual build steps
92
+ if: matrix.build-mode == 'manual'
93
+ shell: bash
94
+ run: |
95
+ echo 'If you are using a "manual" build mode for one or more of the' \
96
+ 'languages you are analyzing, replace this with the commands to build' \
97
+ 'your code, for example:'
98
+ echo ' make bootstrap'
99
+ echo ' make release'
100
+ exit 1
101
+
102
+ - name: Perform CodeQL Analysis
103
+ uses: github/codeql-action/analyze@v4
104
+ with:
105
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,29 @@
1
+ # Run RSpec tests (VCR cassettes; no live API key needed for recorded specs).
2
+ name: SDK CI
3
+
4
+ on:
5
+ pull_request:
6
+ types: [opened, synchronize, reopened]
7
+ push:
8
+ branches: [main, master]
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ name: Test
16
+ runs-on: ubuntu-latest
17
+ env:
18
+ ZEROBOUNCE_API_KEY: "invalid_key_for_tests"
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: "3.2"
26
+ bundler-cache: true
27
+
28
+ - name: Run specs
29
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -62,3 +62,6 @@ build-iPhoneSimulator/
62
62
  # Log files
63
63
  output.err
64
64
  output.log
65
+
66
+ .DS_Store
67
+ .env
data/CODE_OF_CONDUCT.md CHANGED
@@ -54,12 +54,7 @@ further defined and clarified by project maintainers.
54
54
 
55
55
  ## Enforcement
56
56
 
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at afrase91@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team at **integrations@zerobounce.net**. All complaints will be reviewed and investigated promptly and fairly. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
63
58
 
64
59
  Project maintainers who do not follow or enforce the Code of Conduct in good
65
60
  faith may face temporary or permanent repercussions as determined by other
data/CONTRIBUTING.md CHANGED
@@ -1 +1,112 @@
1
- TODO fill this out
1
+ # Contributing to Zero Bounce Ruby SDK
2
+
3
+ Thank you for your interest in contributing. This document explains how to get set up, run tests, and submit changes.
4
+
5
+ ## Code of Conduct
6
+
7
+ By participating in this project, you agree to uphold our [Code of Conduct](CODE_OF_CONDUCT.md).
8
+
9
+ ## Getting Started
10
+
11
+ ### Prerequisites
12
+
13
+ * Ruby 3.2+ (see [.ruby-version](.ruby-version))
14
+ * [Bundler](https://bundler.io/) ~> 2.4
15
+
16
+ ### Setup
17
+
18
+ ```bash
19
+ git clone https://github.com/zerobounce/zero-bounce-ruby.git
20
+ cd zero-bounce-ruby
21
+ bundle install
22
+ ```
23
+
24
+ ### Running Tests
25
+
26
+ Tests use [RSpec](https://rspec.info/) with [VCR](https://github.com/vcr/vcr) for recorded HTTP interactions. Use the placeholder key so cassettes match:
27
+
28
+ ```bash
29
+ ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspec
30
+ ```
31
+
32
+ Or copy `.env.example` to `.env`, set `ZEROBOUNCE_API_KEY=vcr_test_key`, then:
33
+
34
+ ```bash
35
+ bundle exec rspec
36
+ ```
37
+
38
+ **With Docker:**
39
+
40
+ ```bash
41
+ docker build -t zerobounce-ruby-test .
42
+ docker run --rm zerobounce-ruby-test
43
+ ```
44
+
45
+ ### Code Style
46
+
47
+ The project uses [RuboCop](https://github.com/rubocop/rubocop). Run before submitting:
48
+
49
+ ```bash
50
+ bundle exec rubocop
51
+ ```
52
+
53
+ ## How to Contribute
54
+
55
+ ### Reporting Bugs
56
+
57
+ Open an [issue](https://github.com/zerobounce/zero-bounce-ruby/issues) and include:
58
+
59
+ * Ruby version (`ruby -v`)
60
+ * Steps to reproduce
61
+ * Expected vs actual behavior
62
+ * Relevant code or error messages
63
+
64
+ ### Suggesting Changes
65
+
66
+ * Check existing issues and pull requests first.
67
+ * Open an issue to discuss larger changes or API design before coding.
68
+
69
+ ### Submitting Changes
70
+
71
+ 1. **Fork** the repository and create a branch from `main`:
72
+ ```bash
73
+ git checkout -b feature/your-feature-name
74
+ ```
75
+
76
+ 2. **Make your changes** and add or update tests where relevant.
77
+
78
+ 3. **Run the suite** and RuboCop:
79
+ ```bash
80
+ ZEROBOUNCE_API_KEY=vcr_test_key bundle exec rspec
81
+ bundle exec rubocop
82
+ ```
83
+
84
+ 4. **Commit** with a clear message (e.g. `Add X`, `Fix Y`).
85
+
86
+ 5. **Push** your branch and open a **Pull Request** against `main`.
87
+
88
+ 6. In the PR description, briefly explain what changed and why. Link any related issues.
89
+
90
+ Maintainers will review and may request changes. Once approved, your PR can be merged.
91
+
92
+ ## Project Layout
93
+
94
+ * `lib/` – SDK source (entry point: `lib/zerobounce.rb`)
95
+ * `spec/` – RSpec tests and VCR cassettes (`spec/cassettes/`)
96
+ * `data/` – Sample CSV files for batch validation and scoring examples
97
+
98
+ ## Re-recording VCR Cassettes
99
+
100
+ If you change or add API calls and need to re-record cassettes:
101
+
102
+ 1. Use a valid Zero Bounce API key (e.g. from [dashboard](https://www.zerobounce.net/docs/api-dashboard)).
103
+ 2. Set `ZEROBOUNCE_API_KEY` and run the specs; VCR will record new HTTP interactions.
104
+ 3. Replace any real API key in the new cassette files with `vcr_test_key` before committing, so the repo never contains real credentials.
105
+
106
+ ## Questions
107
+
108
+ * [Zero Bounce API docs](https://www.zerobounce.net/docs/)
109
+ * [Project homepage](https://zerobounce.net)
110
+ * Contact: **integrations@zerobounce.net**
111
+
112
+ Thanks for contributing.
data/Dockerfile ADDED
@@ -0,0 +1,15 @@
1
+ # ZeroBounce Ruby SDK – test image (Ruby 3.2)
2
+ FROM ruby:3.2-alpine
3
+
4
+ RUN apk add --no-cache build-base git
5
+
6
+ WORKDIR /app
7
+
8
+ COPY . .
9
+ RUN bundle config set --local path 'vendor/bundle' && \
10
+ bundle install
11
+
12
+ # Dummy key for VCR/cassette-based specs; override with env for live API
13
+ ENV ZEROBOUNCE_API_KEY="${ZEROBOUNCE_API_KEY:-invalid_key_for_tests}"
14
+
15
+ CMD ["bundle", "exec", "rspec"]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zerobounce-sdk (1.1.1)
4
+ zerobounce-sdk (2.0.13)
5
5
  dotenv
6
6
  rest-client (~> 2.1)
7
7
 
@@ -11,6 +11,8 @@ GEM
11
11
  addressable (2.8.4)
12
12
  public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
+ base64 (0.3.0)
15
+ bigdecimal (4.0.1)
14
16
  coderay (1.1.3)
15
17
  crack (0.4.5)
16
18
  rexml
@@ -105,6 +107,8 @@ PLATFORMS
105
107
  x86_64-linux
106
108
 
107
109
  DEPENDENCIES
110
+ base64
111
+ bigdecimal
108
112
  bundler (~> 2.4.6)
109
113
  pry (~> 0.14.1)
110
114
  rake (~> 13.0)
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ZeroBounce
3
+ Copyright (c) 2026 ZeroBounce
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2018 Aaron Frase
3
+ Copyright (c) 2026 ZeroBounce
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.