twi 0.3.5 → 0.3.7

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: 2e73b4423acd7d63164371b1b07d13105d88086f447a5c028480bbcaa70d4a5d
4
- data.tar.gz: 9ba48ff41e2aa89da55a625ed1d17db93a4a38a178d080da9aaf7c8dea52c428
3
+ metadata.gz: e8c957d74b898c3ab852a7700121f6d7253cda84f7bceb394fed035b45f28191
4
+ data.tar.gz: fdaa6dab79e1ebe8e2eebe78284bc1626719bc4a55efced0174ae122efc26e0f
5
5
  SHA512:
6
- metadata.gz: 8c3cee0bbf42e1e877973e13fd4766d5f0dc7881e7fdc1ea0cf7e77e916e1ce818a8e035fd79ea9c39f307acaab504638a8a3e0b3049e133722bdcd0f4bd045d
7
- data.tar.gz: 398a2e7b30149f845836438074c4f5a14d194689c5d5b82e4c15a82ccd71a669fcafa539379aec2e6c2ad607e869c20111af902bb3ee8385b8d1495bc944b118
6
+ metadata.gz: 445e5cb41568e27ce5854eae647a7bd86ff99e0519291cafea81ed7e40fdd7c2112ea30d9af6617c68cda4f49f03d886df20812c84f88286d52e0d033c7321b6
7
+ data.tar.gz: 503cc0c15fdcfcf19ee583d64b971013eef12fcaf76268afdf9cb1e6b5e500e21c7dd9612317b2578505d2532967dc1ea1e7ecaf201fb30a5f80af84f572f0d9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.3.7] - 2026-06-01
2
+
3
+ - [Fix] Expose Twi::Mock::Message#sid
4
+
5
+ ## [0.3.6] - 2026-06-01
6
+
7
+ - [Fix] Expose Twi::Conversation#id and #status
8
+
1
9
  ## [0.3.5] - 2026-06-01
2
10
 
3
11
  - [Fix] Ignore 404 on conversation.delete
@@ -8,8 +8,7 @@ module Twi
8
8
  params = create_params_for participants
9
9
  conversation = conversation_service.conversation_with_participants.create **params
10
10
 
11
- @id = conversation.sid
12
- @status = conversation.state
11
+ @params = { id: conversation.sid, status: conversation.state }
13
12
  rescue Twilio::REST::RestError => error
14
13
  case error.code
15
14
  when 50438 then raise ExistingConversationError.new(code: error.code, message: error.error_message)
@@ -56,10 +55,14 @@ module Twi
56
55
  JSON(response.body)['sid']
57
56
  end
58
57
 
58
+ def id = @params[:id]
59
+
60
+ def status = @params[:status]
61
+
59
62
  private
60
63
 
61
64
  def conversation
62
- conversation_service.conversations @params[:id]
65
+ conversation_service.conversations id
63
66
  end
64
67
 
65
68
  def create_params_for(participants)
@@ -8,8 +8,7 @@ module Twi
8
8
  when 50214 then raise TooManyConversationsError.new(error)
9
9
  end
10
10
  elsif Twi.mock.conversation
11
- @id = Twi.mock.conversation[:id]
12
- @status = Twi.mock.conversation[:status]
11
+ @params = { id: Twi.mock.conversation[:id], status: Twi.mock.conversation[:status] }
13
12
  end
14
13
  end
15
14
 
@@ -3,6 +3,9 @@ module Twi
3
3
  # @return [String] unique identifier
4
4
  def id = @params[:id]
5
5
 
6
+ # @return [String] unique identifier
7
+ def sid = @params[:id]
8
+
6
9
  def create
7
10
  if error = Twi.mock.message_error
8
11
  Twi.mock.message_error = nil
data/lib/twi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Twi
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.7'
5
5
  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.3.5
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo