ficonabses 0.4.2 → 0.4.3
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/lib/ficonabses/base.rb +3 -2
- data/test/testcampaignnew.rb +25 -0
- metadata +3 -3
    
        data/lib/ficonabses/base.rb
    CHANGED
    
    | @@ -72,7 +72,7 @@ module FiconabSES | |
| 72 72 | 
             
                  @clnt
         | 
| 73 73 | 
             
              end 
         | 
| 74 74 | 
             
              def client_action(postflag,postdata)
         | 
| 75 | 
            -
             | 
| 75 | 
            +
              #  puts "FLAG: #{postflag} DATA: #{postdata}"
         | 
| 76 76 | 
             
                 result=self.clnt.get_content(self.uri,self.extheader) if !postflag
         | 
| 77 77 | 
             
                 result = self.clnt.post_content(self.uri, postdata,{'Content-Type' => 'application/x-www-form-urlencoded'}) if postflag
         | 
| 78 78 | 
             
                 result
         | 
| @@ -182,13 +182,14 @@ module FiconabSES | |
| 182 182 | 
             
                            #  res
         | 
| 183 183 | 
             
                end
         | 
| 184 184 | 
             
                def send_campaign_flow(destination,campaign_name,options={})
         | 
| 185 | 
            +
                     options.delete('destination')  #duplicate destnations not allowed
         | 
| 185 186 | 
             
                    url=self.campaign_flow_params(destination,campaign_name,options)
         | 
| 186 187 | 
             
                #    puts "url is: #{url}"
         | 
| 187 188 | 
             
                    perform(url)
         | 
| 188 189 | 
             
                     #  res
         | 
| 189 190 | 
             
                 end  
         | 
| 190 191 | 
             
             def send_campaign_flow_old(destination,campaign_name,options={})
         | 
| 191 | 
            -
                       options | 
| 192 | 
            +
                       options.delete('destination') #duplicate destnations not allowed
         | 
| 192 193 | 
             
                       url=self.campaign_flow_params(destination,campaign_name,options)
         | 
| 193 194 | 
             
                   #    puts "url is: #{url}"
         | 
| 194 195 | 
             
                       perform(url)
         | 
    
        data/test/testcampaignnew.rb
    CHANGED
    
    | @@ -14,16 +14,41 @@ class TestFiconabses < Test::Unit::TestCase | |
| 14 14 | 
             
                               options={}
         | 
| 15 15 | 
             
                               options['hello']='TESTING'
         | 
| 16 16 | 
             
                               options['bcinfo']='+6590683565'
         | 
| 17 | 
            +
                               options['tsipid']=@tsipid
         | 
| 17 18 | 
             
                               res =@f.send_campaign_flow(@destination,'testthreeminutes',options)  #no text portion
         | 
| 18 19 | 
             
                               puts "RES is: #{res}"
         | 
| 19 20 | 
             
                               assert res.include? '200'
         | 
| 20 21 | 
             
                               assert false==(res.include? 'Error')
         | 
| 21 22 |  | 
| 22 23 | 
             
                end
         | 
| 24 | 
            +
                def test_local_campaign_flow2dest
         | 
| 25 | 
            +
                                 options={}
         | 
| 26 | 
            +
                                 options['hello']='TESTING'
         | 
| 27 | 
            +
                                 options['bcinfo']='+6590683565'
         | 
| 28 | 
            +
                                 options['destination']=@destination
         | 
| 29 | 
            +
                                 options['tsipid']=@tsipid
         | 
| 30 | 
            +
                                 options.delete('destination')
         | 
| 31 | 
            +
                                 res =@f.send_campaign_flow(@destination,'testthreeminutes',options)  #no text portion
         | 
| 32 | 
            +
                                 puts "RES is: #{res}"
         | 
| 33 | 
            +
                                 assert res.include? '200'
         | 
| 34 | 
            +
                                 assert false==(res.include? 'Error')
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                  end
         | 
| 37 | 
            +
                  def test_hash_manip
         | 
| 38 | 
            +
                   
         | 
| 39 | 
            +
                                      options={}
         | 
| 40 | 
            +
                                      options['hello']='TESTING'
         | 
| 41 | 
            +
                                      options['bcinfo']='+6590683565'
         | 
| 42 | 
            +
                                   #   options['destination']=@destination
         | 
| 43 | 
            +
                                      options['tsipid']=@tsipid
         | 
| 44 | 
            +
                                      options.delete('destination')
         | 
| 45 | 
            +
                                      assert options['destination']==nil, 'destination wrong'
         | 
| 46 | 
            +
                  end
         | 
| 23 47 | 
             
                 def test_local_sendtime_tempate
         | 
| 24 48 | 
             
                                 options={'sendtime' => "18:00"}
         | 
| 25 49 | 
             
                                 options['hello']='TESTING'
         | 
| 26 50 | 
             
                                 options['bcinfo']='+6590683565'
         | 
| 51 | 
            +
                                     options['tsipid']=@tsipid
         | 
| 27 52 | 
             
                                 res =@f.send_template_params(@destination,'expiring_trial',options)  #no text portion
         | 
| 28 53 | 
             
                                 puts "RES is: #{res}"
         | 
| 29 54 | 
             
                                 assert res.include? '200'
         | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 4
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 0.4. | 
| 8 | 
            +
              - 3
         | 
| 9 | 
            +
              version: 0.4.3
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Scott Sproule
         | 
| @@ -14,7 +14,7 @@ autorequire: | |
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 16 |  | 
| 17 | 
            -
            date: 2012-07- | 
| 17 | 
            +
            date: 2012-07-19 00:00:00 +08:00
         | 
| 18 18 | 
             
            default_executable: 
         | 
| 19 19 | 
             
            dependencies: []
         | 
| 20 20 |  |