Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

asmallteapot/sms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sms

Send text messages with Twilio. Easily.

Installation

gem install sms

Or put gem 'sms' in your Gemfile.

Usage

Set the following ENV variables:

  • TWILIO_ID: Your Twilio API id token.
  • TWILIO_SECRET: Your Twilio API secret token.
  • TWILIO_PHONE: One of your Twilio phone numbers.

Then, send some SMS messages:

SMS.text :message => "Hello!", :to => "15558675309"

Calling SMS.text returns true if the message was sent, or false if it wasn’t.

Testing

To run the test suite, put a YAML file with the following keys at ~/.twilio:

  • sid: Your Twilio API ID token.
  • secret: Your Twilio API secret token.
  • from: Twilio phone number to send test message from.
  • to: Phone number to send test message to.

This is a bit of a hack. Unfortunately, Twilio doesn’t offer testing credentials.

Credits

  • This is a heavily–modified fork of sms-rb.

TODO

  • Consolidate YAML/ENV/options – should be able to set all from any method.
  • Support loading config directly from arbitrary YAML files.

About

Send text messages with Twilio. Easily.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%