mock-bandwidth 1.1.1 → 1.2
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 +4 -0
- data/README.md +2 -0
- data/lib/mock/bandwidth/util/configuration.rb +5 -1
- data/lib/mock/bandwidth/version.rb +1 -1
- data/lib/mock/bandwidth/webhooks/messages.rb +3 -1
- data/lib/mock/bandwidth.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a2c79331cf4faedbdfb5a9957263bf5de0bbfa3047b43f054287779a53ec8f2
|
4
|
+
data.tar.gz: 2675c8896daa01ebbd7300bab1368d25c6402b89a42f027d4ba3d34fce967ee3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8884d19225d349a52d1596bc230ad7e06bd3dc6ef657e50557e26a6eedb607d8bb1c666d3e619cdb80c30fd6c86f01be2f7bc706314d63f94795f332be9e0ec
|
7
|
+
data.tar.gz: bfaeffc9ab690ae2c8adfeb3bc5d0f05d47fe71f37cdc2ca0ca2efc6a5c038f23642af82777764a6714273f3b2cfaba18ba7d9bb5e21bee88ed7523362e1646b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,11 +4,15 @@ module Mock
|
|
4
4
|
module Bandwidth
|
5
5
|
module Util
|
6
6
|
class Configuration
|
7
|
-
attr_accessor :webhook_message_status_url
|
7
|
+
attr_accessor :webhook_message_status_url, :disable_webhooks
|
8
8
|
|
9
9
|
def webhook_message_status_url=(value)
|
10
10
|
@webhook_message_status_url = value
|
11
11
|
end
|
12
|
+
|
13
|
+
def disable_webhooks=(value)
|
14
|
+
@disable_webhooks = value
|
15
|
+
end
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
@@ -5,6 +5,8 @@ module Mock
|
|
5
5
|
module Webhooks
|
6
6
|
class Messages < Base
|
7
7
|
def self.trigger(id, body)
|
8
|
+
return if Mock::Bandwidth.disable_webhooks
|
9
|
+
|
8
10
|
# Wait simulation from twilio
|
9
11
|
sleep DELAY.sample
|
10
12
|
|
@@ -41,7 +43,7 @@ module Mock
|
|
41
43
|
when 200..204
|
42
44
|
response
|
43
45
|
when 400..600
|
44
|
-
raise Webhooks::RestError, Mock::
|
46
|
+
raise Webhooks::RestError, Mock::Bandwidth::ErrorHandler.new(response).raise
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
data/lib/mock/bandwidth.rb
CHANGED
@@ -18,7 +18,7 @@ module Mock
|
|
18
18
|
module Bandwidth
|
19
19
|
extend SingleForwardable
|
20
20
|
|
21
|
-
def_delegators :configuration, :webhook_message_status_url
|
21
|
+
def_delegators :configuration, :webhook_message_status_url, :disable_webhooks
|
22
22
|
|
23
23
|
def self.configure(&block)
|
24
24
|
yield configuration
|
@@ -28,6 +28,6 @@ module Mock
|
|
28
28
|
@configuration ||= Util::Configuration.new
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
public_class_method :configuration
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock-bandwidth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.2'
|
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: 2025-02-
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|