Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M
masmovil-smsclient
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gems
  • masmovil-smsclient
  • Merge Requests
  • !3

Merged
Opened Oct 03, 2020 by Oleksandr@oleksandr🎱
  • Report abuse
Report abuse

fix: make sms library send the messages and accept correct message format

This fixes the library and make it send sms correctly:

  • fix the configuration which can now accept the correct hash of options
  • sendSms function accepts what need to be send
  • add some initial validation for the message format
  • fix all the tests

all tests passing as well:


$ rake spec
/usr/local/bin/ruby -I/usr/local/bundle/gems/rspec-support-3.9.3/lib:/usr/local/bundle/gems/rspec-core-3.9.2/lib /usr/local/bundle/gems/rspec-core-3.9.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Wedoops::MasmovilSmsclient
Trying to config
  has a version number
  Configuration
    The configuration shuld be a MasmovilSmsclient::Configuration
    The option is a Hash
    The proxy can be set
  SOAP Client
D, [2020-10-03T09:56:00.997831 #19421] DEBUG -- : Initlizing savon
    Can load
D, [2020-10-03T09:56:00.998181 #19421] DEBUG -- : Initlizing savon
    Cannot send an empty message
D, [2020-10-03T09:56:00.999640 #19421] DEBUG -- : Initlizing savon
I, [2020-10-03T09:56:00.999962 #19421]  INFO -- : Sending the message: {:src=>"TESTER", :dst=>"+34619766776", :msg=>"This is the tester text 2020-10-03T09:56:00+00:00", :name=>"Testing", :date=>"2020-10-03 10:01:00Z"}
/usr/local/bundle/gems/wasabi-3.5.0/lib/wasabi/parser.rb:89: warning: URI.unescape is obsolete
/usr/local/bundle/gems/wasabi-3.5.0/lib/wasabi/parser.rb:90: warning: URI.escape is obsolete
I, [2020-10-03T09:56:01.354364 #19421]  INFO -- : SOAP request: https://websms.xtratelecom.es/api_php/server.php
I, [2020-10-03T09:56:01.354519 #19421]  INFO -- : SOAPAction: "urn:websms.xtratelecom.es/api_php/server.php/sendSMS", Content-Type: text/xml;charset=UTF-8, Content-Length: 530
I, [2020-10-03T09:56:01.721959 #19421]  INFO -- : SOAP response (status 200)
    Can send a correct message

Finished in 0.72826 seconds (files took 0.48723 seconds to load)
7 examples, 0 failures

/cc @chantal

related: https://wedoops.atlassian.net/browse/ISMZM-35

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b "fix/make-smslib-work" "origin/fix/make-smslib-work"

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "fix/make-smslib-work"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 4
  • Changes 10
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: gems/masmovil-smsclient!3

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.