Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simsen

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simsen

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Simsen

Add SMS sending capability to your application. A simple wrapper provides basic functionally needed to create a SMS. Also a DSL to setup the gateway and deliver the SMS is applied. Because every provider has a different API this has to be implemented for each gateway that inherit from this wraper.

Read the Wiki for more details.

Installation

Add this line to your application's Gemfile:

gem 'simsen', :git => 'git@github.com:SalesLentz/simsen.git'

And then execute:

$ bundle

Usage

Implement your own wrapper for your required third-party SMS gateway provider or choose one of the existing implementations. If you're going to implement a new wrapper please refer to our example

Selecting and configuring the wrapper is done within the setup block.

The following setup options are provided. Please note that a wrapper could use only a subset of them according to the provider API functionality. Please consult the wrapper test or documentation for more information.

Simsen.setup do |config|
  config.gateway            = :example_gateway
  config.password           = 'secret'
  config.sender             = 'Sales-Lentz'
  config.testmode           = :off              # or :on
  config.testmode_strategy  = :succeed          # or :fail
  config.username           = 'username'
end

After setup is done just create a new SMS and deliver it. This method takes two parameters. First the message you want to send and second the recipients phone number.

sms = Simsen.new_sms('A short message', 352000000000)

Now you can deliver the SMS by calling deliver on the returned object.

sms.deliver

You can find an example implementation as a ruby script using bundler here: https://gist.github.com/3750204

Available gateway wrapper

Testing

All tests are written in RSpec, so if you checkout this gem from Github https://github.com/SalesLentz/simsen you can run the tests with

$ bundle exec rake

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 20 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc