signal_api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +19 -0
 - data/.travis.yml +5 -0
 - data/Gemfile +4 -0
 - data/LICENSE +22 -0
 - data/README.md +43 -0
 - data/Rakefile +49 -0
 - data/lib/signal_api/carrier.rb +43 -0
 - data/lib/signal_api/contact.rb +60 -0
 - data/lib/signal_api/core_ext/array.rb +7 -0
 - data/lib/signal_api/core_ext/hash.rb +7 -0
 - data/lib/signal_api/core_ext/nil_class.rb +7 -0
 - data/lib/signal_api/core_ext/string.rb +7 -0
 - data/lib/signal_api/coupon_group.rb +47 -0
 - data/lib/signal_api/deliver_sms.rb +54 -0
 - data/lib/signal_api/exceptions.rb +19 -0
 - data/lib/signal_api/list.rb +224 -0
 - data/lib/signal_api/mocks/api_mock.rb +70 -0
 - data/lib/signal_api/mocks/contact.rb +13 -0
 - data/lib/signal_api/mocks/deliver_sms.rb +14 -0
 - data/lib/signal_api/mocks/list.rb +19 -0
 - data/lib/signal_api/mocks/short_url.rb +9 -0
 - data/lib/signal_api/segment.rb +161 -0
 - data/lib/signal_api/short_url.rb +56 -0
 - data/lib/signal_api/signal_http_api.rb +49 -0
 - data/lib/signal_api/util/email_address.rb +10 -0
 - data/lib/signal_api/util/phone.rb +37 -0
 - data/lib/signal_api/version.rb +3 -0
 - data/lib/signal_api.rb +114 -0
 - data/signal_api.gemspec +27 -0
 - data/test/api/carrier_test.rb +43 -0
 - data/test/api/contact_test.rb +93 -0
 - data/test/api/coupon_group_test.rb +36 -0
 - data/test/api/deliver_sms_test.rb +66 -0
 - data/test/api/general_test.rb +26 -0
 - data/test/api/list_test.rb +261 -0
 - data/test/api/segment_test.rb +144 -0
 - data/test/api/short_url_test.rb +50 -0
 - data/test/mocks/contact_mock_test.rb +24 -0
 - data/test/mocks/deliver_sms_mock_test.rb +21 -0
 - data/test/mocks/list_mock_test.rb +33 -0
 - data/test/mocks/short_url_mock_test.rb +17 -0
 - data/test/test_helper.rb +20 -0
 - metadata +248 -0
 
| 
         @@ -0,0 +1,50 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'test_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class ShortUrlTest < Test::Unit::TestCase
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              def setup
         
     | 
| 
      
 6 
     | 
    
         
            +
                SignalApi.api_key = 'foobar'
         
     | 
| 
      
 7 
     | 
    
         
            +
                FakeWeb.allow_net_connect = false
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              def teardown
         
     | 
| 
      
 11 
     | 
    
         
            +
                FakeWeb.clean_registry
         
     | 
| 
      
 12 
     | 
    
         
            +
                FakeWeb.allow_net_connect = true
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              should "be able to create a short URL for the given target URL" do
         
     | 
| 
      
 16 
     | 
    
         
            +
                FakeWeb.register_uri(:post, SignalApi.base_uri + '/api/short_urls.xml', :content_type => 'application/xml', :status => ['201', 'Created'], :body => <<-END)
         
     | 
| 
      
 17 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 18 
     | 
    
         
            +
            <short-url>
         
     | 
| 
      
 19 
     | 
    
         
            +
              <slug>e25s</slug>
         
     | 
| 
      
 20 
     | 
    
         
            +
              <target-url>http://www.google.com</target-url>
         
     | 
| 
      
 21 
     | 
    
         
            +
              <created-at type="datetime">2012-04-10T16:07:50Z</created-at>
         
     | 
| 
      
 22 
     | 
    
         
            +
              <title nil="true"></title>
         
     | 
| 
      
 23 
     | 
    
         
            +
              <updated-at type="datetime">2012-04-10T16:07:50Z</updated-at>
         
     | 
| 
      
 24 
     | 
    
         
            +
              <domain-id type="integer">1</domain-id>
         
     | 
| 
      
 25 
     | 
    
         
            +
              <account-id type="integer">1</account-id>
         
     | 
| 
      
 26 
     | 
    
         
            +
              <id type="integer">121</id>
         
     | 
| 
      
 27 
     | 
    
         
            +
            </short-url>
         
     | 
| 
      
 28 
     | 
    
         
            +
            END
         
     | 
| 
      
 29 
     | 
    
         
            +
                short_url = SignalApi::ShortUrl.create("http://www.google.com", "ix.ly")
         
     | 
| 
      
 30 
     | 
    
         
            +
                assert_equal "http://ix.ly/e25s", short_url.short_url
         
     | 
| 
      
 31 
     | 
    
         
            +
                assert_equal "http://www.google.com", short_url.target_url
         
     | 
| 
      
 32 
     | 
    
         
            +
                assert_equal 121, short_url.id
         
     | 
| 
      
 33 
     | 
    
         
            +
                assert_equal "ix.ly", short_url.domain
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
              should "raise an exception if the short URL cannot be created" do
         
     | 
| 
      
 37 
     | 
    
         
            +
                FakeWeb.register_uri(:post, SignalApi.base_uri + '/api/short_urls.xml', :content_type => 'application/xml', :status => ['400', 'Bad Request'], :body => <<-END)
         
     | 
| 
      
 38 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 39 
     | 
    
         
            +
            <errors>
         
     | 
| 
      
 40 
     | 
    
         
            +
              <error>Slug can't be blank</error>
         
     | 
| 
      
 41 
     | 
    
         
            +
              <error>Slug is invalid</error>
         
     | 
| 
      
 42 
     | 
    
         
            +
              <error>The short URL domain is not available</error>
         
     | 
| 
      
 43 
     | 
    
         
            +
            </errors>
         
     | 
| 
      
 44 
     | 
    
         
            +
            END
         
     | 
| 
      
 45 
     | 
    
         
            +
                assert_raise SignalApi::ApiException do
         
     | 
| 
      
 46 
     | 
    
         
            +
                  SignalApi::ShortUrl.create("http://www.google.com", "ix.ly")
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
              end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'test_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'signal_api/mocks/contact'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class ContactMockTest < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def setup
         
     | 
| 
      
 7 
     | 
    
         
            +
                SignalApi::Contact.clear_mock_data
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              should "be able to mock save" do
         
     | 
| 
      
 11 
     | 
    
         
            +
                assert_equal 0, SignalApi::Contact.mock_method_calls.values.flatten.length
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                contact = SignalApi::Contact.new('mobile_phone' => '3125551212', 'email_address' => 'bill.johnson@domain.com', 'first_name' => 'bill', 'last_name' => 'johnson', 'zip_code' => '60606')
         
     | 
| 
      
 14 
     | 
    
         
            +
                contact.save
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                attributes = SignalApi::Contact.mock_method_calls[:save].last[:attributes]
         
     | 
| 
      
 17 
     | 
    
         
            +
                assert_equal '3125551212', attributes['mobile_phone']
         
     | 
| 
      
 18 
     | 
    
         
            +
                assert_equal 'bill.johnson@domain.com', attributes['email_address']
         
     | 
| 
      
 19 
     | 
    
         
            +
                assert_equal 'bill', attributes['first_name']
         
     | 
| 
      
 20 
     | 
    
         
            +
                assert_equal 'johnson', attributes['last_name']
         
     | 
| 
      
 21 
     | 
    
         
            +
                assert_equal '60606', attributes['zip_code']
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'test_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'signal_api/mocks/deliver_sms'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class DeliverSmsTest < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def setup
         
     | 
| 
      
 7 
     | 
    
         
            +
                SignalApi::DeliverSms.clear_mock_data
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              should "be able to mock deliver" do
         
     | 
| 
      
 11 
     | 
    
         
            +
                assert_equal 0, SignalApi::DeliverSms.mock_method_calls.values.flatten.length
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                message = SignalApi::DeliverSms.new("user_name", "password")
         
     | 
| 
      
 14 
     | 
    
         
            +
                message.deliver("3125551212", "this is a test message")
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                assert_equal "user_name", SignalApi::DeliverSms.mock_method_calls[:deliver].last[:user_name]
         
     | 
| 
      
 17 
     | 
    
         
            +
                assert_equal "3125551212", SignalApi::DeliverSms.mock_method_calls[:deliver].last[:mobile_phone]
         
     | 
| 
      
 18 
     | 
    
         
            +
                assert_equal "this is a test message", SignalApi::DeliverSms.mock_method_calls[:deliver].last[:message]
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,33 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'test_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'signal_api/mocks/list'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class ListMockTest < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def setup
         
     | 
| 
      
 7 
     | 
    
         
            +
                SignalApi::List.clear_mock_data
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              should "be able to mock create_subscription" do
         
     | 
| 
      
 11 
     | 
    
         
            +
                assert_equal 0, SignalApi::List.mock_method_calls.values.flatten.length
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                list = SignalApi::List.new(1)
         
     | 
| 
      
 14 
     | 
    
         
            +
                list.create_subscription(SignalApi::SubscriptionType::SMS, SignalApi::Contact.new('mobile-phone' => '3125551212'), { :source_campaign_id => 2 })
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                assert_equal 1, SignalApi::List.mock_method_calls[:create_subscription].last[:list_id]
         
     | 
| 
      
 17 
     | 
    
         
            +
                assert_equal "SMS", SignalApi::List.mock_method_calls[:create_subscription].last[:subscription_type]
         
     | 
| 
      
 18 
     | 
    
         
            +
                assert_equal "3125551212", SignalApi::List.mock_method_calls[:create_subscription].last[:contact].mobile_phone
         
     | 
| 
      
 19 
     | 
    
         
            +
                assert_equal 2, SignalApi::List.mock_method_calls[:create_subscription].last[:options][:source_campaign_id]
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              should "be able to mock destroy_subscription" do
         
     | 
| 
      
 23 
     | 
    
         
            +
                assert_equal 0, SignalApi::List.mock_method_calls.values.flatten.length
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                list = SignalApi::List.new(1)
         
     | 
| 
      
 26 
     | 
    
         
            +
                list.destroy_subscription(SignalApi::SubscriptionType::SMS, SignalApi::Contact.new('mobile-phone' => '3125551212'))
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                assert_equal 1, SignalApi::List.mock_method_calls[:destroy_subscription].last[:list_id]
         
     | 
| 
      
 29 
     | 
    
         
            +
                assert_equal "SMS", SignalApi::List.mock_method_calls[:destroy_subscription].last[:subscription_type]
         
     | 
| 
      
 30 
     | 
    
         
            +
                assert_equal "3125551212", SignalApi::List.mock_method_calls[:destroy_subscription].last[:contact].mobile_phone
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'test_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'signal_api/mocks/short_url'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class ShortUrlMockTest < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def setup
         
     | 
| 
      
 7 
     | 
    
         
            +
                SignalApi::ShortUrl.clear_mock_data
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              should "be able to mock create" do
         
     | 
| 
      
 11 
     | 
    
         
            +
                SignalApi::ShortUrl.create("http://www.google.com", "ix.ly")
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                assert_equal "http://www.google.com", SignalApi::ShortUrl.mock_method_calls[:create].last[:target]
         
     | 
| 
      
 14 
     | 
    
         
            +
                assert_equal "ix.ly", SignalApi::ShortUrl.mock_method_calls[:create].last[:domain]
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
    
        data/test/test_helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'fileutils'
         
     | 
| 
      
 4 
     | 
    
         
            +
            begin
         
     | 
| 
      
 5 
     | 
    
         
            +
              Bundler.setup(:default, :development)
         
     | 
| 
      
 6 
     | 
    
         
            +
            rescue Bundler::BundlerError => e
         
     | 
| 
      
 7 
     | 
    
         
            +
              $stderr.puts e.message
         
     | 
| 
      
 8 
     | 
    
         
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         
     | 
| 
      
 9 
     | 
    
         
            +
              exit e.status_code
         
     | 
| 
      
 10 
     | 
    
         
            +
            end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            require 'test/unit'
         
     | 
| 
      
 13 
     | 
    
         
            +
            require 'fakeweb'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'shoulda'
         
     | 
| 
      
 15 
     | 
    
         
            +
            require 'mocha'
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            require 'signal_api'
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            FileUtils.mkdir_p("log")
         
     | 
| 
      
 20 
     | 
    
         
            +
            SignalApi.logger = Logger.new("log/test.log")
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,248 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: signal_api
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 29
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 11 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 13 
     | 
    
         
            +
            - John Wood
         
     | 
| 
      
 14 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 15 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 16 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2013-02-28 00:00:00 Z
         
     | 
| 
      
 19 
     | 
    
         
            +
            dependencies: 
         
     | 
| 
      
 20 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 21 
     | 
    
         
            +
              name: httparty
         
     | 
| 
      
 22 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 23 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 24 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 25 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 26 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 27 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 28 
     | 
    
         
            +
                    hash: 61
         
     | 
| 
      
 29 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 30 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 31 
     | 
    
         
            +
                    - 8
         
     | 
| 
      
 32 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 0.8.1
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
      
 36 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 37 
     | 
    
         
            +
              name: builder
         
     | 
| 
      
 38 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 39 
     | 
    
         
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 40 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 41 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 42 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 43 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 44 
     | 
    
         
            +
                    hash: 7
         
     | 
| 
      
 45 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 46 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 47 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 48 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 49 
     | 
    
         
            +
                    version: 3.0.0
         
     | 
| 
      
 50 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 51 
     | 
    
         
            +
              version_requirements: *id002
         
     | 
| 
      
 52 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 53 
     | 
    
         
            +
              name: fakeweb
         
     | 
| 
      
 54 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 55 
     | 
    
         
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 56 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 57 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 58 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 60 
     | 
    
         
            +
                    hash: 27
         
     | 
| 
      
 61 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 62 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 63 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 64 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 65 
     | 
    
         
            +
                    version: 1.3.0
         
     | 
| 
      
 66 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 67 
     | 
    
         
            +
              version_requirements: *id003
         
     | 
| 
      
 68 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 69 
     | 
    
         
            +
              name: shoulda
         
     | 
| 
      
 70 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 72 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 73 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 74 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 76 
     | 
    
         
            +
                    hash: 5
         
     | 
| 
      
 77 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 78 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 79 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 80 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 81 
     | 
    
         
            +
                    version: 3.0.1
         
     | 
| 
      
 82 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 83 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
      
 84 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 85 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 86 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 87 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 88 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 89 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 90 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 91 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 92 
     | 
    
         
            +
                    hash: 11
         
     | 
| 
      
 93 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 94 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 95 
     | 
    
         
            +
                    - 9
         
     | 
| 
      
 96 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 97 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 98 
     | 
    
         
            +
                    version: 0.9.2.2
         
     | 
| 
      
 99 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 100 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
      
 101 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 102 
     | 
    
         
            +
              name: yard
         
     | 
| 
      
 103 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 104 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 105 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 106 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 107 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 108 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 109 
     | 
    
         
            +
                    hash: 9
         
     | 
| 
      
 110 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 111 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 112 
     | 
    
         
            +
                    - 7
         
     | 
| 
      
 113 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 114 
     | 
    
         
            +
                    version: 0.7.5
         
     | 
| 
      
 115 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 116 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
      
 117 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 118 
     | 
    
         
            +
              name: bluecloth
         
     | 
| 
      
 119 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 120 
     | 
    
         
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 121 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 122 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 123 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 124 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 125 
     | 
    
         
            +
                    hash: 7
         
     | 
| 
      
 126 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 127 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 128 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 129 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 130 
     | 
    
         
            +
                    version: 2.2.0
         
     | 
| 
      
 131 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 132 
     | 
    
         
            +
              version_requirements: *id007
         
     | 
| 
      
 133 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 134 
     | 
    
         
            +
              name: mocha
         
     | 
| 
      
 135 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 136 
     | 
    
         
            +
              requirement: &id008 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 137 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 138 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 139 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 140 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 141 
     | 
    
         
            +
                    hash: 61
         
     | 
| 
      
 142 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 143 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 144 
     | 
    
         
            +
                    - 10
         
     | 
| 
      
 145 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 146 
     | 
    
         
            +
                    version: 0.10.5
         
     | 
| 
      
 147 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 148 
     | 
    
         
            +
              version_requirements: *id008
         
     | 
| 
      
 149 
     | 
    
         
            +
            description: Ruby implementation of the Signal API
         
     | 
| 
      
 150 
     | 
    
         
            +
            email: 
         
     | 
| 
      
 151 
     | 
    
         
            +
            - john@signalhq.com
         
     | 
| 
      
 152 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 159 
     | 
    
         
            +
            - .gitignore
         
     | 
| 
      
 160 
     | 
    
         
            +
            - .travis.yml
         
     | 
| 
      
 161 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 162 
     | 
    
         
            +
            - LICENSE
         
     | 
| 
      
 163 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 164 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 165 
     | 
    
         
            +
            - lib/signal_api.rb
         
     | 
| 
      
 166 
     | 
    
         
            +
            - lib/signal_api/carrier.rb
         
     | 
| 
      
 167 
     | 
    
         
            +
            - lib/signal_api/contact.rb
         
     | 
| 
      
 168 
     | 
    
         
            +
            - lib/signal_api/core_ext/array.rb
         
     | 
| 
      
 169 
     | 
    
         
            +
            - lib/signal_api/core_ext/hash.rb
         
     | 
| 
      
 170 
     | 
    
         
            +
            - lib/signal_api/core_ext/nil_class.rb
         
     | 
| 
      
 171 
     | 
    
         
            +
            - lib/signal_api/core_ext/string.rb
         
     | 
| 
      
 172 
     | 
    
         
            +
            - lib/signal_api/coupon_group.rb
         
     | 
| 
      
 173 
     | 
    
         
            +
            - lib/signal_api/deliver_sms.rb
         
     | 
| 
      
 174 
     | 
    
         
            +
            - lib/signal_api/exceptions.rb
         
     | 
| 
      
 175 
     | 
    
         
            +
            - lib/signal_api/list.rb
         
     | 
| 
      
 176 
     | 
    
         
            +
            - lib/signal_api/mocks/api_mock.rb
         
     | 
| 
      
 177 
     | 
    
         
            +
            - lib/signal_api/mocks/contact.rb
         
     | 
| 
      
 178 
     | 
    
         
            +
            - lib/signal_api/mocks/deliver_sms.rb
         
     | 
| 
      
 179 
     | 
    
         
            +
            - lib/signal_api/mocks/list.rb
         
     | 
| 
      
 180 
     | 
    
         
            +
            - lib/signal_api/mocks/short_url.rb
         
     | 
| 
      
 181 
     | 
    
         
            +
            - lib/signal_api/segment.rb
         
     | 
| 
      
 182 
     | 
    
         
            +
            - lib/signal_api/short_url.rb
         
     | 
| 
      
 183 
     | 
    
         
            +
            - lib/signal_api/signal_http_api.rb
         
     | 
| 
      
 184 
     | 
    
         
            +
            - lib/signal_api/util/email_address.rb
         
     | 
| 
      
 185 
     | 
    
         
            +
            - lib/signal_api/util/phone.rb
         
     | 
| 
      
 186 
     | 
    
         
            +
            - lib/signal_api/version.rb
         
     | 
| 
      
 187 
     | 
    
         
            +
            - signal_api.gemspec
         
     | 
| 
      
 188 
     | 
    
         
            +
            - test/api/carrier_test.rb
         
     | 
| 
      
 189 
     | 
    
         
            +
            - test/api/contact_test.rb
         
     | 
| 
      
 190 
     | 
    
         
            +
            - test/api/coupon_group_test.rb
         
     | 
| 
      
 191 
     | 
    
         
            +
            - test/api/deliver_sms_test.rb
         
     | 
| 
      
 192 
     | 
    
         
            +
            - test/api/general_test.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - test/api/list_test.rb
         
     | 
| 
      
 194 
     | 
    
         
            +
            - test/api/segment_test.rb
         
     | 
| 
      
 195 
     | 
    
         
            +
            - test/api/short_url_test.rb
         
     | 
| 
      
 196 
     | 
    
         
            +
            - test/mocks/contact_mock_test.rb
         
     | 
| 
      
 197 
     | 
    
         
            +
            - test/mocks/deliver_sms_mock_test.rb
         
     | 
| 
      
 198 
     | 
    
         
            +
            - test/mocks/list_mock_test.rb
         
     | 
| 
      
 199 
     | 
    
         
            +
            - test/mocks/short_url_mock_test.rb
         
     | 
| 
      
 200 
     | 
    
         
            +
            - test/test_helper.rb
         
     | 
| 
      
 201 
     | 
    
         
            +
            homepage: http://dev.signalhq.com
         
     | 
| 
      
 202 
     | 
    
         
            +
            licenses: []
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
      
 204 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 205 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 206 
     | 
    
         
            +
             
     | 
| 
      
 207 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 208 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 209 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 210 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 211 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 212 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 213 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 214 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 215 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 216 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 217 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 218 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 219 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 220 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 221 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 222 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 223 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 224 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 225 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 226 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 227 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 230 
     | 
    
         
            +
            rubygems_version: 1.8.25
         
     | 
| 
      
 231 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 232 
     | 
    
         
            +
            specification_version: 3
         
     | 
| 
      
 233 
     | 
    
         
            +
            summary: Ruby implementation of the Signal API
         
     | 
| 
      
 234 
     | 
    
         
            +
            test_files: 
         
     | 
| 
      
 235 
     | 
    
         
            +
            - test/api/carrier_test.rb
         
     | 
| 
      
 236 
     | 
    
         
            +
            - test/api/contact_test.rb
         
     | 
| 
      
 237 
     | 
    
         
            +
            - test/api/coupon_group_test.rb
         
     | 
| 
      
 238 
     | 
    
         
            +
            - test/api/deliver_sms_test.rb
         
     | 
| 
      
 239 
     | 
    
         
            +
            - test/api/general_test.rb
         
     | 
| 
      
 240 
     | 
    
         
            +
            - test/api/list_test.rb
         
     | 
| 
      
 241 
     | 
    
         
            +
            - test/api/segment_test.rb
         
     | 
| 
      
 242 
     | 
    
         
            +
            - test/api/short_url_test.rb
         
     | 
| 
      
 243 
     | 
    
         
            +
            - test/mocks/contact_mock_test.rb
         
     | 
| 
      
 244 
     | 
    
         
            +
            - test/mocks/deliver_sms_mock_test.rb
         
     | 
| 
      
 245 
     | 
    
         
            +
            - test/mocks/list_mock_test.rb
         
     | 
| 
      
 246 
     | 
    
         
            +
            - test/mocks/short_url_mock_test.rb
         
     | 
| 
      
 247 
     | 
    
         
            +
            - test/test_helper.rb
         
     | 
| 
      
 248 
     | 
    
         
            +
            has_rdoc: 
         
     |