twilio_base 1.8.0 → 1.9.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c446ad08567bcbe8261020d83ce5723dfdd8040bd1ac4d079081a9c6610dd70b
|
4
|
+
data.tar.gz: 05e5a017a5a572b8f7b946f86c6c3db72f8d72bf9cb5ad632ca9fb1ec331457a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbaceb9b8ae08813fe790091e7a1b57b3000a7a8b58aa71c296af8177f1c9739948a9a531457728a4a730d398ab75db0237f470116615ca02ed35b1c38d914ca
|
7
|
+
data.tar.gz: 1138756197d7f69b6e689e4612c169df54540fc4aa5a9ed909d25642d7e6e21c49662682b864dbb743ba67691ec647f7e120c77bd77eed190cc139b9df476a85
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TwilioBase
|
4
|
+
module Chat
|
5
|
+
class Channel
|
6
|
+
class << self
|
7
|
+
include TwilioBase::Clients
|
8
|
+
|
9
|
+
def find(sid)
|
10
|
+
service.channels(sid).fetch
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def service
|
16
|
+
rest_client.chat.v2.services(chat_service_sid)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/twilio_base/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe TwilioBase::Chat::Channel do
|
4
|
+
include_context :global_config
|
5
|
+
|
6
|
+
describe '.find' do
|
7
|
+
it 'finds a chat channel by sid' do
|
8
|
+
channel = TwilioBase::Fake::Chat::Channel.new.create({})
|
9
|
+
|
10
|
+
expect(described_class.find(channel.sid)).to eq channel
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio_base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Brown
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-11-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -256,6 +256,7 @@ files:
|
|
256
256
|
- app/models/twilio_base/global_config.rb
|
257
257
|
- app/services/twilio_base/api_key.rb
|
258
258
|
- app/services/twilio_base/application.rb
|
259
|
+
- app/services/twilio_base/chat/channel.rb
|
259
260
|
- app/services/twilio_base/clients.rb
|
260
261
|
- app/services/twilio_base/phone_number.rb
|
261
262
|
- app/services/twilio_base/protocols/voice.rb
|
@@ -307,6 +308,7 @@ files:
|
|
307
308
|
- spec/lib/twilio_base/helpers/protocols_spec.rb
|
308
309
|
- spec/services/twilio_base/api_key_spec.rb
|
309
310
|
- spec/services/twilio_base/application_spec.rb
|
311
|
+
- spec/services/twilio_base/chat/channel_spec.rb
|
310
312
|
- spec/services/twilio_base/phone_number_spec.rb
|
311
313
|
- spec/services/twilio_base/protocols/voice/base_spec.rb
|
312
314
|
- spec/services/twilio_base/protocols/voice/pstn_spec.rb
|
@@ -466,6 +468,7 @@ test_files:
|
|
466
468
|
- spec/lib/twilio_base/helpers/protocols_spec.rb
|
467
469
|
- spec/services/twilio_base/api_key_spec.rb
|
468
470
|
- spec/services/twilio_base/application_spec.rb
|
471
|
+
- spec/services/twilio_base/chat/channel_spec.rb
|
469
472
|
- spec/services/twilio_base/phone_number_spec.rb
|
470
473
|
- spec/services/twilio_base/protocols/voice/base_spec.rb
|
471
474
|
- spec/services/twilio_base/protocols/voice/pstn_spec.rb
|