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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 927f6cdebf1bf8f582f0848935cfba95a7b5426bc84eb5a9c6588ebc0d592e82
4
- data.tar.gz: a2f0bcaacd413d6b611d2656171749ec01d15f5876606c2b3f9f0a0d31aa2d01
3
+ metadata.gz: 0f5d0314196d101409c40151c91115e4b8ac84b1f305e944c19ba12a1f171fa2
4
+ data.tar.gz: 5820ac4f924a4856d408bc7f50db6165394322df1958dceae89fd96b3d533640
5
5
  SHA512:
6
- metadata.gz: 2e9ef2920c4815b451c0620a701aa718ecb5a5d1b339d343ec72f29f800fe42c495ee6040a328cb6a7741ea865b3762733f86abbc349cb70cb9e6f207b352295
7
- data.tar.gz: 260f7cce6f28f7c38c79606aed311984da642c301d9ce0f48580229b859a7d2e8195916fb61a7af42b01ed9589d3674fb36fd07280db854f8b732e629a8f944e
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 = 'AC8776d'
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 SID
20
- # * +TWILIO_SECRET+ to store the Twilio secret
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'] = 'AC8776d'
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 - used for advanced operations like creating numbers.
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
@@ -1,3 +1,3 @@
1
1
  module Twi
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
3
3
  end
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.1
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.3
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: []