Releases: boxlinknet/kwtsms-ruby
Releases · boxlinknet/kwtsms-ruby
v0.3.1
Fixed
- Password no longer visible in
Client#inspector#to_soutput (redacted) - Sanitize raw input in phone validation errors to prevent log injection
- Command injection risk in dependabot auto-merge workflow (use PR number not URL)
- Explicit SSL
VERIFY_PEERon all HTTP connections - Log file path traversal protection: rejects
.., absolute paths, null bytes, pipes .envparser now handlesexport KEY=VALUEsyntax- CI workflow scoped to
permissions: contents: read - Missing error codes ERR019-ERR023 added to
API_ERRORS - Em dashes replaced with commas/colons per style rules
- SECURITY.md updated to reflect 0.3.x support
- CONTRIBUTING.md expanded with all required sections
- Error code test coverage includes ERR019-ERR023
v0.3.0
Added
- Country-specific phone validation: 80+ countries with local length and mobile prefix rules
KwtSMS.find_country_code: longest-match country code lookup (3/2/1-digit)KwtSMS.validate_phone_format: validates number against country-specific rulesKwtSMS::PHONE_RULES: validation rules table (GCC, Levant, Asia, Europe, Americas, Africa, Oceania)KwtSMS::COUNTRY_NAMES: human-readable country names for error messages- Domestic trunk prefix stripping in
normalize_phone(e.g. 9660559... becomes 966559...) - README badges: Gem Downloads, Bundle Audit, GitGuardian, OpenSSF Scorecard
- GitHub workflows: GitGuardian secret scanning, OpenSSF Scorecard, PR labeler
Changed
validate_phone_inputnow returns country-specific errors (e.g. "Invalid Saudi Arabia number: expected 9 digits after +966, got 8")- Network error handling: added ENETUNREACH, ECONNRESET, EPIPE, SSLError to rescue list
Removed
- Built-in CLI tool (replaced by standalone kwtsms-cli)
v0.1.0
kwtSMS Ruby Client v0.1.0
Ruby client for the kwtSMS API. Send SMS, check balance, validate numbers, list sender IDs, check coverage, get delivery reports.
Install
gem install kwtsmsFeatures
- Full API coverage: verify, balance, send_sms, status, senderids, coverage, validate
- Bulk send: auto-batching for >200 numbers with ERR013 retry and backoff
- Utility functions: normalize_phone, validate_phone_input, clean_message, enrich_error
- All 33 error codes mapped to developer-friendly action messages
- CLI tool:
kwtsmscommand with setup wizard - JSONL logging with password masking
- .env file support with
from_envfactory - Zero runtime dependencies (Ruby stdlib only)
- Ruby 2.7+ compatibility
- Phone deduplication before sending
- Message cleaning (emojis, HTML, hidden chars, Arabic digits)
- Production OTP example with rate limiting, CAPTCHA, Redis, Rails, Sinatra
Test Results
127 tests, 283 assertions, 0 failures, 0 errors
Tested on Ruby 2.7, 3.0, 3.1, 3.2, 3.3