plivo 4.19.0 → 4.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0e41ca933ee8b7b7e1d43b5f894acd712e0f4db
4
- data.tar.gz: 87f28295afadfa54936053e9972fe25781bd89ae
3
+ metadata.gz: 6472d23802b39086fb94ce313553e668bd3f210b
4
+ data.tar.gz: b620b7efeb18cbd2680d5701ba1054e23a0e3874
5
5
  SHA512:
6
- metadata.gz: '08ea6b08cadfa871edcb5ccdeaa41eda8af3cb8e74c4e1afc8a0031c9d10a79aff48591d3aaac59651d3874bb8d0226f2c47227277847fabf2dcc9ccf2c4496f'
7
- data.tar.gz: 731d629d2fe5b97d5b7b513f0a2dd8aade4a648d7fd403799bff496883a8850208db06c2f49ec321551ccd43c59d9dec17d1b42d363d9e0a1593792cdc228e6c
6
+ metadata.gz: c5bbacc139403864cf9ee636063d8eb9717a9b8b175a4265d08cdaa85c3813f678a97573940a2c8d90c15d364c535578932331b817b7278f96c0ccdaa6c81f2b
7
+ data.tar.gz: a2ec84374d288f88cba292e667193810f51c6565be8c5457ee8deb952eb1c6f160f62205fb5d85532dc0d542c3880fe4552d79eb20c63bf0afa0e97bf3c648ac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.20.0](https://github.com/plivo/plivo-ruby/releases/tag/v4.20.0) (2021-08-04)
4
+ - Added continue speak XML element support.
5
+
3
6
  ## [4.19.0](https://github.com/plivo/plivo-ruby/releases/tag/v4.19.0) (2021-07-19)
4
7
  - Add support for Voice MultiPartyCall APIs (includes retry) and XML, validate voice UTs
5
8
 
data/README.md CHANGED
@@ -8,7 +8,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'plivo', '>= 4.19.0'
11
+ gem 'plivo', '>= 4.20.0'
12
12
  ```
13
13
 
14
14
  And then execute:
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.19.0".freeze
2
+ VERSION = "4.20.0".freeze
3
3
  end
data/lib/plivo/xml.rb CHANGED
@@ -30,6 +30,7 @@ require_relative 'xml/sub'
30
30
  require_relative 'xml/w'
31
31
  require_relative 'xml/plivo_xml'
32
32
  require_relative 'xml/multipartycall'
33
+ require_relative 'xml/cont'
33
34
  include Plivo::Exceptions
34
35
 
35
36
  module Plivo
@@ -0,0 +1,13 @@
1
+ module Plivo
2
+ module XML
3
+ class Cont < Element
4
+ @nestables = []
5
+ @valid_attributes = []
6
+
7
+ def initialize(body)
8
+ super(body)
9
+ end
10
+ end
11
+ end
12
+ end
13
+
@@ -80,8 +80,15 @@ module Plivo
80
80
  def add(element)
81
81
  raise PlivoXMLError, 'invalid element' unless element
82
82
  if @nestables.include?(element.name)
83
- @node.elements << element.node
84
- element
83
+ if element.name == "Cont"
84
+ @node.elements << element.node
85
+ element
86
+ temp = REXML::Text.new element.node.text
87
+ @node.elements['Cont'] = temp
88
+ else
89
+ @node.elements << element.node
90
+ element
91
+ end
85
92
  else
86
93
  raise PlivoXMLError, "#{element.name} not nestable in #{@name}"
87
94
  end
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class Emphasis < Element
4
- @nestables = %w(Break Emphasis Lang Phoneme Prosody SayAs Sub W)
4
+ @nestables = %w(Break Cont Emphasis Lang Phoneme Prosody SayAs Sub W)
5
5
  @valid_attributes = %w(level)
6
6
 
7
7
  VALID_LEVEL_ATTRIBUTE_VALUE=%w(strong moderate reduced)
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class Lang < Element
4
- @nestables = %w(Break Emphasis Lang P Phoneme Prosody S SayAs Sub W)
4
+ @nestables = %w(Break Cont Emphasis Lang P Phoneme Prosody S SayAs Sub W)
5
5
  @valid_attributes = %w(xmllang)
6
6
 
7
7
  VALID_LANG_ATTRIBUTE_VALUES = [
data/lib/plivo/xml/p.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class P < Element
4
- @nestables = %w(Break Emphasis Lang Phoneme Prosody SayAs Sub S W)
4
+ @nestables = %w(Break Cont Emphasis Lang Phoneme Prosody SayAs Sub S W)
5
5
  @valid_attributes = []
6
6
 
7
7
  def initialize(body)
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class Prosody < Element
4
- @nestables = %w(Break Emphasis Lang P Phoneme Prosody S SayAs Sub W)
4
+ @nestables = %w(Break Cont Emphasis Lang P Phoneme Prosody S SayAs Sub W)
5
5
  @valid_attributes = %w(volume rate pitch)
6
6
 
7
7
  VALID_VOLUME_ATTRIBUTE_VALUES=%w(default silent x-soft soft medium loud x-loud)
data/lib/plivo/xml/s.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class S < Element
4
- @nestables = %w(Break Emphasis Lang Phoneme Prosody SayAs Sub W)
4
+ @nestables = %w(Break Cont Emphasis Lang Phoneme Prosody SayAs Sub W)
5
5
  @valid_attributes = []
6
6
 
7
7
  def initialize(body)
@@ -13,7 +13,7 @@ module Plivo
13
13
  engine = attributes[:voice].split('.')[0]
14
14
  voice = attributes[:voice].split('.')[1]
15
15
  if SUPPORTED_ENGINES.include?(engine) && SUPPORTED_VOICES.include?(voice)
16
- @nestables = %w(Break Emphasis Lang P Phoneme Prosody S SayAs Sub W)
16
+ @nestables = %w(Break Cont Emphasis Lang P Phoneme Prosody S SayAs Sub W)
17
17
  else
18
18
  raise PlivoXMLError, "<Speak> voice #{attributes[:voice]} is not valid."
19
19
  end
data/lib/plivo/xml/w.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Plivo
2
2
  module XML
3
3
  class W < Element
4
- @nestables = %w(Break Emphasis Phoneme Prosody SayAs Sub)
4
+ @nestables = %w(Break Cont Emphasis Phoneme Prosody SayAs Sub)
5
5
  @valid_attributes = %w(role)
6
6
 
7
7
  VALID_ROLE_ATTRIBUTE_VALUES=%w(amazon:VB amazon:VBD amazon:SENSE_1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.19.0
4
+ version: 4.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Plivo SDKs Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -205,6 +205,7 @@ files:
205
205
  - lib/plivo/xml.rb
206
206
  - lib/plivo/xml/break.rb
207
207
  - lib/plivo/xml/conference.rb
208
+ - lib/plivo/xml/cont.rb
208
209
  - lib/plivo/xml/dial.rb
209
210
  - lib/plivo/xml/dtmf.rb
210
211
  - lib/plivo/xml/element.rb