bandwidth-sdk 9.0.0 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/ring.rb +2 -1
- data/test/integration/test_integration.rb +10 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72d08e72e19066da912c18946e2bcb7e38c3da78f58005388dd2a6d1b8bc98da
|
4
|
+
data.tar.gz: 26a7f5cd86a6a3ea974062f66de43b7edee59bf1e7f74fb2ec6e5272a22cdbea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfa230d51fe36a6c513821b05975e1d28a0a14f70e326cd802c20788cbc966f20405f9d3c82e478e2c0095b7ffedda699050d981986e50eecad4716c4c525453
|
7
|
+
data.tar.gz: e99889889de6d0893da79e616aa9cce33dcc76395c692258c0dfb98f0cde7e38d7901579dd9542acd1e0594ebf0dde25407a5c06be09307fea30ea07197ba04e
|
data/README.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Bandwidth Ruby SDK
|
2
2
|
|
3
|
+
[![Test](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test.yml)
|
4
|
+
|
5
|
+
|
6
|
+
| **OS** | **Ruby** |
|
7
|
+
|:---:|:---:|
|
8
|
+
| Windows 2016 | 2.6, 2.7, 3.0 |
|
9
|
+
| Windows 2019 | 2.6, 2.7, 3.0 |
|
10
|
+
| Ubuntu 18.04 | 2.6, 2.7, 3.0 |
|
11
|
+
| Ubuntu 20.04 | 2.6, 2.7, 3.0 |
|
12
|
+
|
3
13
|
## Getting Started
|
4
14
|
|
5
15
|
### Installation
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# A simple integration test against Bandwidth's APIs
|
4
4
|
|
5
5
|
require 'test/unit'
|
6
|
+
require 'securerandom'
|
6
7
|
require_relative '../../lib/bandwidth.rb'
|
7
8
|
|
8
9
|
include Bandwidth
|
@@ -66,16 +67,16 @@ class IntegrationTest < Test::Unit::TestCase
|
|
66
67
|
|
67
68
|
def test_upload_download_media
|
68
69
|
#define constants for upload media and download media
|
69
|
-
|
70
|
-
|
70
|
+
media_id = "text-media-id-" + SecureRandom.uuid
|
71
|
+
media = "Hello world"
|
71
72
|
|
72
73
|
#media upload
|
73
|
-
@bandwidth_client.messaging_client.client.upload_media(BW_ACCOUNT_ID,
|
74
|
+
@bandwidth_client.messaging_client.client.upload_media(BW_ACCOUNT_ID, media_id, media, :content_type => "application/octet-stream", :cache_control => "no-cache")
|
74
75
|
|
75
76
|
#media download
|
76
|
-
|
77
|
+
downloaded_media = @bandwidth_client.messaging_client.client.get_media(BW_ACCOUNT_ID, media_id).data
|
77
78
|
|
78
|
-
assert_equal(
|
79
|
+
assert_equal(downloaded_media, media, "Downloaded media file not equal to upload")
|
79
80
|
end
|
80
81
|
|
81
82
|
def test_create_call_and_get_call_state
|
@@ -515,7 +516,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
515
516
|
|
516
517
|
def test_mfa_verify
|
517
518
|
body = TwoFactorVerifyRequestSchema.new
|
518
|
-
body.to =
|
519
|
+
body.to = "+1000" + rand(1111111..9999999).to_s
|
519
520
|
body.application_id = BW_VOICE_APPLICATION_ID
|
520
521
|
body.scope = "scope"
|
521
522
|
body.code = "123456"
|
@@ -554,13 +555,14 @@ class IntegrationTest < Test::Unit::TestCase
|
|
554
555
|
|
555
556
|
def test_ring
|
556
557
|
ring = Bandwidth::Voice::Ring.new({
|
557
|
-
:duration => 5
|
558
|
+
:duration => 5,
|
559
|
+
:answer_call => false
|
558
560
|
})
|
559
561
|
|
560
562
|
response = Bandwidth::Voice::Response.new()
|
561
563
|
response.push(ring)
|
562
564
|
|
563
|
-
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5"/></Response>'
|
565
|
+
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5" answerCall="false"/></Response>'
|
564
566
|
actual = response.to_bxml()
|
565
567
|
assert_equal(expected, actual)
|
566
568
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic SDK Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09
|
11
|
+
date: 2021-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -305,5 +305,5 @@ requirements: []
|
|
305
305
|
rubygems_version: 3.2.22
|
306
306
|
signing_key:
|
307
307
|
specification_version: 4
|
308
|
-
summary:
|
308
|
+
summary: Bandwidth
|
309
309
|
test_files: []
|