tenios 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/Gemfile.lock +3 -3
- data/README.md +5 -10
- data/lib/tenios.rb +1 -0
- data/lib/tenios/blocks.rb +8 -0
- data/lib/tenios/blocks/call_settings.rb +20 -0
- data/lib/tenios/version.rb +1 -1
- data/tenios.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4928315e02a4b4f9dddcdefee97182bac40bd03a6146cfa86a7ec8875f04600f
|
4
|
+
data.tar.gz: b07aabb3eca7123ad836e60c4f0ca35ec42e9f35fec386aea4a43751c85a446a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f3a16bab5fb994c77e688acf79564553fe41f1e5bd919b0f8ada414835466a489f8bb03040e23ff889ad83f8f97c29120f57467ff040d2b3b3451907679ab0
|
7
|
+
data.tar.gz: 438bc06c1ac06f09f09364a29d9a8a835d2d98a2ffb5afd5349b2683ee6b2c714b1b1d6b2dd7741aa81684c021a28f4ab7ecec9830924333c37abe64b64708db
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tenios (0.
|
4
|
+
tenios (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -48,11 +48,11 @@ PLATFORMS
|
|
48
48
|
ruby
|
49
49
|
|
50
50
|
DEPENDENCIES
|
51
|
-
bundler (~> 2
|
51
|
+
bundler (~> 2)
|
52
52
|
carwow_rubocop
|
53
53
|
rake
|
54
54
|
rspec
|
55
55
|
tenios!
|
56
56
|
|
57
57
|
BUNDLED WITH
|
58
|
-
|
58
|
+
2.0.2
|
data/README.md
CHANGED
@@ -21,14 +21,11 @@ require 'tenios'
|
|
21
21
|
|
22
22
|
class TeniosController < ApplicationController
|
23
23
|
def redirect_to_number
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
blocks = Tenios::Blocks.new do |response|
|
30
|
-
response.add(announcement)
|
31
|
-
response.add(bridge)
|
24
|
+
blocks = Tenios.blocks do |block|
|
25
|
+
block.announce(announcement: 'redirect', standard: false)
|
26
|
+
block.bridge(mode: Tenios::Blocks::Bridge::SEQUENTIAL) do |bridge|
|
27
|
+
bridge.with_destination(Tenios::Blocks::Bridge::EXTERNAL_NUMBER, '+440123456789', 10)
|
28
|
+
end
|
32
29
|
end
|
33
30
|
|
34
31
|
render json: blocks
|
@@ -55,8 +52,6 @@ Tenios::Blocks.new
|
|
55
52
|
.yield_self { |hash| JSON.generate(hash) }
|
56
53
|
```
|
57
54
|
|
58
|
-
As you may have noticed in the exampled above you can both chain calls to `Tenios::Blocks#add` and `Tenios::Blocks::Bridge#with_destination` or pass a block to those initialisers. :man_shrugging: whatever floats your boat.
|
59
|
-
|
60
55
|
## Installation
|
61
56
|
|
62
57
|
Add this line to your application's Gemfile:
|
data/lib/tenios.rb
CHANGED
data/lib/tenios/blocks.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Tenios
|
4
|
+
class Blocks
|
5
|
+
class CallSettings
|
6
|
+
BLOCK_TYPE = 'CALL_SETTINGS'
|
7
|
+
|
8
|
+
def initialize(forward_ani:)
|
9
|
+
@forward_ani = forward_ani
|
10
|
+
end
|
11
|
+
|
12
|
+
def as_json(*)
|
13
|
+
{
|
14
|
+
blockType: BLOCK_TYPE,
|
15
|
+
forwardAni: @forward_ani
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/tenios/version.rb
CHANGED
data/tenios.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
end
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
|
28
|
-
spec.add_development_dependency 'bundler', '~> 2
|
28
|
+
spec.add_development_dependency 'bundler', '~> 2'
|
29
29
|
spec.add_development_dependency 'carwow_rubocop'
|
30
30
|
spec.add_development_dependency 'rake'
|
31
31
|
spec.add_development_dependency 'rspec'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tenios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- carwow Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2
|
19
|
+
version: '2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: carwow_rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/tenios/blocks.rb
|
88
88
|
- lib/tenios/blocks/announcement.rb
|
89
89
|
- lib/tenios/blocks/bridge.rb
|
90
|
+
- lib/tenios/blocks/call_settings.rb
|
90
91
|
- lib/tenios/blocks/collect_digits.rb
|
91
92
|
- lib/tenios/blocks/collect_speech.rb
|
92
93
|
- lib/tenios/blocks/hang_up.rb
|
@@ -114,8 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
115
|
- !ruby/object:Gem::Version
|
115
116
|
version: '0'
|
116
117
|
requirements: []
|
117
|
-
|
118
|
-
rubygems_version: 2.7.6
|
118
|
+
rubygems_version: 3.0.3
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A ruby wrapper for Tenios Call Control API
|