Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gems/actioncable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ If you have any questions, please contact the maintainers. Refer to `_reviewers.
## Target gems

- actioncable
- actionmailbox
- actionmailer
- actionpack
- actiontext
Expand Down
8 changes: 8 additions & 0 deletions gems/actionmailbox/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inherit_from: ../../.rubocop.yml

RBS/Layout:
Enabled: true
RBS/Lint:
Enabled: true
RBS/Style:
Enabled: true
42 changes: 42 additions & 0 deletions gems/actionmailbox/8.1/_test/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Write Ruby code to test the RBS.
# It is type checked by `steep check` command.

require "actionmailbox"

class ForwardsMailbox < ActionMailbox::Base
before_processing :require_sender

def process
mail.subject
inbound_email.message_id.size
bounced! unless inbound_email.processed?
end

private

def require_sender
end
end

class ApplicationMailbox < ActionMailbox::Base
routing all: :forwards
end

inbound_email = ActionMailbox::InboundEmail.new
inbound_email.status.to_sym
inbound_email.message_id.size
inbound_email.message_checksum.size
inbound_email.created_at.to_date
inbound_email.raw_email.attached?
inbound_email.delivered! unless inbound_email.bounced? || inbound_email.failed?
inbound_email.processing! if inbound_email.pending?
inbound_email.mail.subject
inbound_email.source.size
inbound_email.processed? || ForwardsMailbox.receive(inbound_email)

class ForwardsMailboxTest < ActionMailbox::TestCase
def test_receive
receive_inbound_email_from_mail(to: "save@example.com", subject: "Hello")
create_inbound_email_from_mail(to: "save@example.com")
end
end
14 changes: 14 additions & 0 deletions gems/actionmailbox/8.1/_test/test.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class ForwardsMailbox < ActionMailbox::Base
def process: () -> void

private

def require_sender: () -> void
end

class ApplicationMailbox < ActionMailbox::Base
end

class ForwardsMailboxTest < ActionMailbox::TestCase
def test_receive: () -> void
end
Loading
Loading