mock-twilio 1.5 → 1.5.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/mock/twilio/decorators/api_2010/calls.rb +3 -2
- data/lib/mock/twilio/decorators/api_2010/messages.rb +3 -2
- data/lib/mock/twilio/decorators/customer_profiles_v1/customer_profile_update.rb +3 -2
- data/lib/mock/twilio/schemas/brands_registrations_a2p.rb +3 -2
- data/lib/mock/twilio/version.rb +1 -1
- 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: a52bffd4c72fd567629419247ab70a105749bdc6ecb1949a90c6283d7a7f7605
|
4
|
+
data.tar.gz: 29b1ea83b4e2e031c9d667eb855291e0ff5c559efc4d8138cff9fd21628b1f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bce53334c3db48402acd11ae664af553dd2bdbc6e14f961c7e581dbfa36280d1fa73c7809af595965d0eef3ffdbcedb75c797c057c0e91a57469ca523daad6dc
|
7
|
+
data.tar.gz: 12a531d4ec3ed53e3047bb2ff9b9fae4115246c30c9694e511298f979fda663191249a0190a949c434395573f7c7f5352a77aee845b00a7750acd1efa37140a6
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,8 @@ module Mock
|
|
5
5
|
module Decorators
|
6
6
|
module Api2010
|
7
7
|
class Calls
|
8
|
+
@@scheduler = Rufus::Scheduler.new
|
9
|
+
|
8
10
|
class << self
|
9
11
|
def decorate(body, request)
|
10
12
|
body["date_updated"] = Time.current.rfc2822 if body["date_updated"]
|
@@ -26,8 +28,7 @@ module Mock
|
|
26
28
|
def call_sid(body, request)
|
27
29
|
prefix = "CA"
|
28
30
|
sid = prefix + SecureRandom.hex(16)
|
29
|
-
scheduler
|
30
|
-
scheduler.in '2s' do
|
31
|
+
@@scheduler.in '2s' do
|
31
32
|
conference_uuid = request.data["Url"].split("conference_uuid=").last
|
32
33
|
begin
|
33
34
|
response = Mock::Twilio::Webhooks::CallStatusUpdates.trigger(sid, conference_uuid, 'unknown', 'ringing')
|
@@ -5,6 +5,8 @@ module Mock
|
|
5
5
|
module Decorators
|
6
6
|
module Api2010
|
7
7
|
class Messages
|
8
|
+
@@scheduler = Rufus::Scheduler.new
|
9
|
+
|
8
10
|
class << self
|
9
11
|
def decorate(body, request)
|
10
12
|
body["date_updated"] = Time.current.rfc2822 if body["date_updated"]
|
@@ -34,9 +36,8 @@ module Mock
|
|
34
36
|
def message_sid(body, request)
|
35
37
|
prefix = request.data["MediaUrl"] ? "MM" : "SM"
|
36
38
|
sid = prefix + SecureRandom.hex(16)
|
37
|
-
scheduler = Rufus::Scheduler.new
|
38
39
|
callback_url = request.data["StatusCallback"] if request.data["StatusCallback"]
|
39
|
-
scheduler.in '2s' do
|
40
|
+
@@scheduler.in '2s' do
|
40
41
|
begin
|
41
42
|
response = Mock::Twilio::Webhooks::Messages.trigger(sid, callback_url)
|
42
43
|
|
@@ -5,6 +5,8 @@ module Mock
|
|
5
5
|
module Decorators
|
6
6
|
module CustomerProfilesV1
|
7
7
|
class CustomerProfileUpdate
|
8
|
+
@@scheduler = Rufus::Scheduler.new
|
9
|
+
|
8
10
|
class << self
|
9
11
|
def decorate(body, request)
|
10
12
|
body["date_updated"] = Time.current.rfc2822 if body["date_updated"]
|
@@ -21,8 +23,7 @@ module Mock
|
|
21
23
|
def parse_customer_profile_sid(body, request)
|
22
24
|
uri = URI(request.url)
|
23
25
|
customer_profile_sid = uri.path.split('/')[3].split('.').first
|
24
|
-
scheduler
|
25
|
-
scheduler.in '2s' do
|
26
|
+
@@scheduler.in '2s' do
|
26
27
|
begin
|
27
28
|
response = Mock::Twilio::Webhooks::CustomerProfiles.trigger(customer_profile_sid, "in-review")
|
28
29
|
|
@@ -4,6 +4,8 @@ module Mock
|
|
4
4
|
module Twilio
|
5
5
|
module Schemas
|
6
6
|
class BrandsRegistrationsA2p
|
7
|
+
@@scheduler = Rufus::Scheduler.new
|
8
|
+
|
7
9
|
class << self
|
8
10
|
def for(body, request)
|
9
11
|
body["date_updated"] = Time.current.rfc2822 if body["date_updated"]
|
@@ -32,8 +34,7 @@ module Mock
|
|
32
34
|
def brand_sid(body)
|
33
35
|
prefix = "BN"
|
34
36
|
sid = prefix + SecureRandom.hex(16)
|
35
|
-
scheduler
|
36
|
-
scheduler.in '2s' do
|
37
|
+
@@scheduler.in '2s' do
|
37
38
|
response = Mock::Twilio::Webhooks::Brands.trigger(sid, "unverified")
|
38
39
|
response = if response.status == 200
|
39
40
|
Mock::Twilio::Webhooks::Brands.trigger(sid, "verified")
|
data/lib/mock/twilio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock-twilio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SchoolStatus Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
165
|
+
rubygems_version: 3.5.12
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: This repository contains Mock::Twilio::Client and Webhooks for Twilio's API.
|