sms_gate

Simple SMS gate gem, currently supporting Czech SMS gate provider SMS Sluzba

Usage

Synchronous:

sms = SmsGate::Sms.new(to: '0420724111222', text: "hello")
sms.deliver

Asynchronous:

sms = SmsGate::Sms.new(to: '0420724111222', text: "hello", model_id: 13)
sms.deliver_later

SmsGate response (Httparty response object) and model_id is returned to asynchonous response hooks. Useful if you want to do some change on a related model according to SMS delivery status.

Rails configuration generator

rails g sms_gate:install

Creates config/sms_gate.yml and config/initializers/sms_gate.rb in your application directory. Replace contents of those files with your configuration values.

Resque rake file template

rails g sms_gate:resque_rake

Creates lib/tasks/resque.rake in your application directory. Replace contents of this file with your configuration values.