{"id":15513028,"url":"https://github.com/aldesantis/hertz-twilio","last_synced_at":"2026-05-03T19:31:55.288Z","repository":{"id":52414945,"uuid":"56674744","full_name":"aldesantis/hertz-twilio","owner":"aldesantis","description":"A Hertz courier for sending SMS notifications with Twilio.","archived":false,"fork":false,"pushed_at":"2021-04-29T21:00:25.000Z","size":101,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T00:56:54.436Z","etag":null,"topics":["hertz","notifications","rails","ruby","sms","twilio"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aldesantis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-20T09:39:29.000Z","updated_at":"2020-01-18T16:42:11.000Z","dependencies_parsed_at":"2022-09-03T22:02:36.330Z","dependency_job_id":null,"html_url":"https://github.com/aldesantis/hertz-twilio","commit_stats":null,"previous_names":["alessandro1997/hertz-courier-twilio"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/aldesantis/hertz-twilio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Fhertz-twilio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Fhertz-twilio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Fhertz-twilio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Fhertz-twilio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aldesantis","download_url":"https://codeload.github.com/aldesantis/hertz-twilio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldesantis%2Fhertz-twilio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hertz","notifications","rails","ruby","sms","twilio"],"created_at":"2024-10-02T09:54:02.424Z","updated_at":"2026-05-03T19:31:55.270Z","avatar_url":"https://github.com/aldesantis.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hertz::Twilio\n\n[![Build Status](https://travis-ci.org/aldesantis/hertz-twilio.svg?branch=master)](https://travis-ci.org/aldesantis/hertz-twilio)\n[![Coverage Status](https://coveralls.io/repos/github/aldesantis/hertz-twilio/badge.svg?branch=master)](https://coveralls.io/github/aldesantis/hertz-twilio?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/204eed3c916b560ef788/maintainability)](https://codeclimate.com/github/aldesantis/hertz-twilio/maintainability)\n\nThis is a [Hertz](https://github.com/aldesantis/hertz) courier for sending notifications to your \nusers via SMS by leveraging the [Twilio](https://www.twilio.com) API.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'hertz-twilio'\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install hertz-twilio\n```\n\nThen, run the installer generator:\n\n```console\n$ rails g hertz:twilio:install\n```\n\nThe courier will use ActiveJob to asynchronously deliver the text messages, so make sure that you're \nexecuting background jobs with some adapter (`inline` will work, even though it's not recommended). \nJobs are pushed to the `default` queue.\n\nFinally, you will have to expose a `#hertz_phone_number` method in your receiver class:\n\n```ruby\nclass User\n  include Hertz::Notifiable\n\n  def hertz_phone_number\n    phone_number\n  end\nend\n```\n\nIf `#hertz_phone_number` returns an empty value (i.e. `false`, `nil` or an empty string) at the time \nthe job is executed, the notification will not be delivered. This allows you to programmatically \nenable/disable SMS notifications for a user:\n\n```ruby\nclass User\n  include Hertz::Notifiable\n\n  def hertz_phone_number\n    phone_number if phone_number_verified?\n  end\nend\n```\n\n## Usage\n\nAll you need to do in order to start delivering notifications by SMS is add `twilio` to the \nnotification's `#deliver_by` statement and provide an SMS body:\n\n```ruby\nclass CommentNotification \u003c Hertz::Notification\n  deliver_by :twilio\n\n  def sms_body\n    'You received a new comment!'\n  end\nend\n```\n\nAll `CommentNotification`s will now be delivered by SMS! :)\n\n**NOTE:** This courier uses the [deliveries API](https://github.com/aldesantis/hertz#tracking-delivery-status)\nto prevent double deliveries.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/aldesantis/hertz-twilio.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n# To do\n\n- [ ] Allow changing the job's queue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldesantis%2Fhertz-twilio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldesantis%2Fhertz-twilio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldesantis%2Fhertz-twilio/lists"}