Skip to content

Releases: boxlinknet/kwtsms-ruby

v0.3.1

15 Mar 00:33

Choose a tag to compare

Fixed

  • Password no longer visible in Client#inspect or #to_s output (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_PEER on all HTTP connections
  • Log file path traversal protection: rejects .., absolute paths, null bytes, pipes
  • .env parser now handles export KEY=VALUE syntax
  • 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

15 Mar 00:11

Choose a tag to compare

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 rules
  • KwtSMS::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_input now 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

06 Mar 14:07

Choose a tag to compare

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 kwtsms

Features

  • 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: kwtsms command with setup wizard
  • JSONL logging with password masking
  • .env file support with from_env factory
  • 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