twi 0.9.1 → 0.9.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/lib/twi/lio.rb +7 -5
- data/lib/twi/resource.rb +1 -1
- data/lib/twi/version.rb +1 -1
- 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: 0f5d0314196d101409c40151c91115e4b8ac84b1f305e944c19ba12a1f171fa2
|
|
4
|
+
data.tar.gz: 5820ac4f924a4856d408bc7f50db6165394322df1958dceae89fd96b3d533640
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1348d1ac77e0802cd084c574f1b4fe17d734c543365b1994b72f7defe2c13e17a0bf0ad8534ac0fc626188cfbf5ccd337eea2a262c905f146ceb8850dfc10e9a
|
|
7
|
+
data.tar.gz: 61e9d16732642c42f0e0c1838eeaba8136eaeb4c1855ca161db31ce80b03bd3133f27e36fcafe0e50deeff5d14a57ee55e3e093bf9009961fc52575f7d50b262
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.9.2] - 2026-10-14
|
|
4
|
+
|
|
5
|
+
- [Fix] Send messages and calls under TWILIO_ACCOUNT_SID, so a Twilio API key in TWILIO_SID can sign them
|
|
6
|
+
|
|
3
7
|
## [0.9.1] - 2026-09-14
|
|
4
8
|
|
|
5
9
|
- [Fix] Read an event's target outside Rails, where Array#second is not loaded by an app
|
data/lib/twi/lio.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Twi
|
|
|
7
7
|
#
|
|
8
8
|
# @example Set the +sid+ and +secret+ to interact with Twilio API:
|
|
9
9
|
# Twi.configure do |config|
|
|
10
|
-
# twilio.sid = '
|
|
10
|
+
# twilio.sid = 'SK8776d'
|
|
11
11
|
# twilio.secret = '588213'
|
|
12
12
|
# end
|
|
13
13
|
#
|
|
@@ -16,16 +16,18 @@ module Twi
|
|
|
16
16
|
# An alternative way to set global configuration settings is by storing
|
|
17
17
|
# them in the following environment variables:
|
|
18
18
|
#
|
|
19
|
-
# * +TWILIO_SID+ to store the Twilio
|
|
20
|
-
# * +TWILIO_SECRET+ to store the
|
|
19
|
+
# * +TWILIO_SID+ to store the SID of a Twilio API key
|
|
20
|
+
# * +TWILIO_SECRET+ to store the secret of that API key
|
|
21
|
+
# * +TWILIO_ACCOUNT_SID+ to store the SID of the account the API key belongs to
|
|
21
22
|
# * +TWILIO_CONVERSATION_SERVICE_SID+ to store the Twilio Conversation service ID
|
|
22
23
|
#
|
|
23
24
|
# In case both methods are used together,
|
|
24
25
|
# {Twi::Config#configure Twi.configure} takes precedence.
|
|
25
26
|
#
|
|
26
27
|
# @example Set the +sid+ and +secret+ to interact with Twilio API:
|
|
27
|
-
# ENV['TWILIO_SID'] = '
|
|
28
|
+
# ENV['TWILIO_SID'] = 'SK8776d'
|
|
28
29
|
# ENV['TWILIO_SECRET'] = '588213'
|
|
30
|
+
# ENV['TWILIO_ACCOUNT_SID'] = 'AC5129e'
|
|
29
31
|
#
|
|
30
32
|
class Lio
|
|
31
33
|
# Initialize the global configuration settings defaulting to matching environment variables.
|
|
@@ -45,7 +47,7 @@ module Twi
|
|
|
45
47
|
# @return [String] secret - to authenticate API requests made with +api_key+.
|
|
46
48
|
attr_reader :secret
|
|
47
49
|
|
|
48
|
-
# @return [String] Account SID -
|
|
50
|
+
# @return [String] Account SID - the account every request is made under.
|
|
49
51
|
attr_reader :account_sid
|
|
50
52
|
|
|
51
53
|
# @return [String] OAuth token - to authenticate API requests made with +account_sid+.
|
data/lib/twi/resource.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Twi
|
|
|
13
13
|
|
|
14
14
|
def client = Twilio::REST::Client.new Twi.lio.account_sid, Twi.lio.auth_token
|
|
15
15
|
|
|
16
|
-
def api_client = Twilio::REST::Client.new Twi.lio.api_key, Twi.lio.secret
|
|
16
|
+
def api_client = Twilio::REST::Client.new Twi.lio.api_key, Twi.lio.secret, Twi.lio.account_sid
|
|
17
17
|
|
|
18
18
|
def messaging_service = client.messaging.v1.services Twi.lio.messaging_sid.to_s
|
|
19
19
|
|
data/lib/twi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Baccigalupo
|
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
153
|
version: '0'
|
|
154
154
|
requirements: []
|
|
155
|
-
rubygems_version: 4.0.
|
|
155
|
+
rubygems_version: 4.0.20
|
|
156
156
|
specification_version: 4
|
|
157
157
|
summary: An object-oriented Ruby client for the Twilio API.
|
|
158
158
|
test_files: []
|