{"id":18728794,"url":"https://github.com/rubyonworld/cellular","last_synced_at":"2025-11-12T05:30:19.931Z","repository":{"id":174007863,"uuid":"540192572","full_name":"RubyOnWorld/cellular","owner":"RubyOnWorld","description":"Sending and receiving SMSs with Ruby through pluggable backends.","archived":false,"fork":false,"pushed_at":"2022-09-22T22:33:45.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:26:39.947Z","etag":null,"topics":["backend","plug","ruby","sms"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-22T22:33:29.000Z","updated_at":"2022-09-27T21:10:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab8870e9-2683-4a17-a266-824000702f9a","html_url":"https://github.com/RubyOnWorld/cellular","commit_stats":null,"previous_names":["rubyonworld/cellular"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fcellular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fcellular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fcellular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fcellular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/cellular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599040,"owners_count":19665911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","plug","ruby","sms"],"created_at":"2024-11-07T14:24:23.326Z","updated_at":"2025-11-12T05:30:19.804Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cellular\n\n[![Gem Version](https://img.shields.io/gem/v/cellular.svg?style=flat)](https://rubygems.org/gems/cellular)\n[![Build Status](https://img.shields.io/travis/hyperoslo/cellular.svg?style=flat)](https://travis-ci.org/hyperoslo/cellular)\n[![Dependency Status](https://img.shields.io/gemnasium/hyperoslo/cellular.svg?style=flat)](https://gemnasium.com/hyperoslo/cellular)\n[![Code Climate](https://img.shields.io/codeclimate/github/hyperoslo/cellular.svg?style=flat)](https://codeclimate.com/github/hyperoslo/cellular)\n[![Coverage Status](https://img.shields.io/coveralls/hyperoslo/cellular.svg?style=flat)](https://coveralls.io/r/hyperoslo/cellular)\n\nSending and receiving SMSs with Ruby through pluggable backends.\n\n**Supported Ruby versions: 2.0.0 or higher**\n\nLicensed under the **MIT** license, see LICENSE for more information.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```\ngem 'cellular'\n```\n\nAnd then execute:\n\n```shell\nbundle\n```\n\nOr install it yourself as:\n\n```shell\ngem install cellular\n```\n\n## Usage\n\n### Configuration\n\n```ruby\nCellular.configure do |config|\n  config.username = 'username'\n  config.password = 'password'\n  config.backend = Cellular::Backends::Sendega\n  config.sender = 'Default custom sender'\n  config.country_code = 'NO'\nend\n```\n\nCellular uses Rails' [ActiveJob](http://edgeguides.rubyonrails.org/active_job_basics.html)\ninterface to interact with queue backends. Read appropriate documentation to set up queue.\n\n\n### Available Backends\n\n* [Cellular::Backends::CoolSMS](http://coolsms.com/)\n* [Cellular::Backends::Sendega](http://sendega.com/)\n* [Cellular::Backends::Twilio](http://twilio.com/)\n* [Cellular::Backends::LinkMobility](https://www.linkmobility.com)\n* Log (logs to `$stdout`)\n* Test (adds messages to `Cellular.deliveries`)\n\n\n### Sending SMSs\n\nThe options supported may differ between backends.\n\n```ruby\nsms = Cellular::SMS.new(\n  recipient: '+47xxxxxxxx', # Valid international format\n  sender: '+370xxxxxxxx',\n  message: 'This is an SMS message',\n  price: 0,\n  country_code: 'NO' # defaults to Cellular.config.country_code\n)\n\nsms.deliver\n```\n\nFor use with multiple recipients in one request use:\n\n```ruby\nsms = Cellular::SMS.new(\n  recipients: ['+47xxxxxxx1','+47xxxxxxx2','+47xxxxxxx3'],\n  sender: '+370xxxxxxxx',\n  message: 'This is an SMS message',\n  price: 0,\n  country_code: 'NO' # defaults to Cellular.config.country_code\n)\n\nsms.deliver\n```\n\n\n#### Delayed SMSs delivery\n\nYou can also send texts asynchronously, which is great if you're in a Rails app\nand are concerned that it might time out or something. To use it, just call\n`deliver_async` instead of `deliver` on the SMS object:\n\n```ruby\nsms = Cellular::SMS.new(\n  recipient: '+47xxxxxxxx',\n  sender: '+47xxxxxxxx',\n  message: 'This is an SMS message'\n)\n\nsms.deliver_async\n```\n\nThis will create a delayed job for you on the **cellular** queue, so make sure\nthat your queue processor is running.\n\nTo override queue name, use **queue** option\n\n```ruby\nsms.deliver_async(queue: :urgent)\n```\nUsing ActiveJob, Cellular allows you to schedule the time when an SMS will be sent.\nJust call `deliver_async(wait_until: timestamp)` or `deliver_async(wait: time)` on the SMS object:\n\n```ruby\nsms = Cellular::SMS.new(\n  recipient: '+47xxxxxxxx',\n  sender: '+47xxxxxxxx',\n  message: 'This is an SMS message'\n)\n\nsms.deliver_async(wait_until: Date.tomorrow.noon)\n```\n\n## Troubleshooting\n\nIf you are using Twilio as a backend, please make sure you add or [port](https://www.twilio.com/help/faq/porting) a phone number to your account, so that you can use that as a sender option. You won't be able to send messages from any phone number unless you port it to Twilio.\n\nAlso, make sure phone numbers are in valid international format:\n[`+47xxxxxxxx`, `+370xxxxx`]\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b feature/my-new-feature`)\n3. Write your code and necessary tests\n4. Run your tests (`bundle exec rspec`)\n5. Commit your changes (`git commit -am 'Add some feature'`)\n6. Push to the branch (`git push origin feature/my-new-feature`)\n7. Create pull request and be awesome!\n\n\n## Credits\n\nHyper made this. We're a digital communications agency with a passion for good code,\nand if you're using this library we probably want to hire you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fcellular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fcellular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fcellular/lists"}