repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/engine.rb
actioncable/lib/action_cable/engine.rb
# frozen_string_literal: true # :markup: markdown require "rails" require "action_cable" require "active_support/core_ext/hash/indifferent_access" module ActionCable class Engine < Rails::Engine # :nodoc: config.action_cable = ActiveSupport::OrderedOptions.new config.action_cable.mount_path = ActionCable::...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/gem_version.rb
actioncable/lib/action_cable/gem_version.rb
# frozen_string_literal: true # :markup: markdown module ActionCable # Returns the currently loaded version of Action Cable as a `Gem::Version`. def self.gem_version Gem::Version.new VERSION::STRING end module VERSION MAJOR = 8 MINOR = 2 TINY = 0 PRE = "alpha" STRING = [MAJOR, MIN...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/helpers/action_cable_helper.rb
actioncable/lib/action_cable/helpers/action_cable_helper.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Helpers module ActionCableHelper # Returns an "action-cable-url" meta tag with the value of the URL specified in # your configuration. Ensure this is above your JavaScript tag: # # <head> # <%= ac...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/stream_event_loop.rb
actioncable/lib/action_cable/connection/stream_event_loop.rb
# frozen_string_literal: true # :markup: markdown require "nio" module ActionCable module Connection class StreamEventLoop def initialize @nio = @executor = @thread = nil @map = {} @stopping = false @todo = Queue.new @spawn_mutex = Mutex.new end def t...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/test_case.rb
actioncable/lib/action_cable/connection/test_case.rb
# frozen_string_literal: true # :markup: markdown require "active_support" require "active_support/test_case" require "active_support/core_ext/hash/indifferent_access" require "action_dispatch" require "action_dispatch/http/headers" require "action_dispatch/testing/test_request" module ActionCable module Connectio...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb
actioncable/lib/action_cable/connection/tagged_logger_proxy.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection # # Action Cable Connection TaggedLoggerProxy # # Allows the use of per-connection tags against the server logger. This wouldn't # work using the traditional ActiveSupport::TaggedLogging enhanced Rails.logger, ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/client_socket.rb
actioncable/lib/action_cable/connection/client_socket.rb
# frozen_string_literal: true # :markup: markdown require "websocket/driver" module ActionCable module Connection #-- # This class is heavily based on faye-websocket-ruby # # Copyright (c) 2010-2015 James Coglan class ClientSocket # :nodoc: def self.determine_url(env) scheme = sec...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/stream.rb
actioncable/lib/action_cable/connection/stream.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection #-- # This class is heavily based on faye-websocket-ruby # # Copyright (c) 2010-2015 James Coglan class Stream # :nodoc: def initialize(event_loop, socket) @event_loop = event_loop @so...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/callbacks.rb
actioncable/lib/action_cable/connection/callbacks.rb
# frozen_string_literal: true # :markup: markdown require "active_support/callbacks" module ActionCable module Connection # # Action Cable Connection Callbacks # # The [before_command](rdoc-ref:ClassMethods#before_command), # [after_command](rdoc-ref:ClassMethods#after_command), and # [around_c...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/base.rb
actioncable/lib/action_cable/connection/base.rb
# frozen_string_literal: true # :markup: markdown require "action_dispatch" require "active_support/rescuable" module ActionCable module Connection # # Action Cable Connection Base # # For every WebSocket connection the Action Cable server accepts, a Connection # object will be instantiated. This i...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/internal_channel.rb
actioncable/lib/action_cable/connection/internal_channel.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection # # Action Cable InternalChannel # # Makes it possible for the RemoteConnection to disconnect a specific # connection. module InternalChannel extend ActiveSupport::Concern private def inte...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/message_buffer.rb
actioncable/lib/action_cable/connection/message_buffer.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection # Allows us to buffer messages received from the WebSocket before the Connection # has been fully initialized, and is ready to receive them. class MessageBuffer # :nodoc: def initialize(connection) @conn...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/authorization.rb
actioncable/lib/action_cable/connection/authorization.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection module Authorization class UnauthorizedError < StandardError; end # Closes the WebSocket connection if it is open and returns an "unauthorized" # reason. def reject_unauthorized_connection log...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/subscriptions.rb
actioncable/lib/action_cable/connection/subscriptions.rb
# frozen_string_literal: true # :markup: markdown require "active_support/core_ext/hash/indifferent_access" module ActionCable module Connection # # Action Cable Connection Subscriptions # # Collection class for all the channel subscriptions established on a given # connection. Responsible for rout...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/identification.rb
actioncable/lib/action_cable/connection/identification.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Connection module Identification extend ActiveSupport::Concern included do class_attribute :identifiers, default: Set.new end module ClassMethods # Mark a key as being a connection identifier in...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/connection/web_socket.rb
actioncable/lib/action_cable/connection/web_socket.rb
# frozen_string_literal: true # :markup: markdown require "websocket/driver" module ActionCable module Connection # # Action Cable Connection WebSocket # # Wrap the real socket to minimize the externally-presented API class WebSocket # :nodoc: def initialize(env, event_target, event_loop, pro...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/test.rb
actioncable/lib/action_cable/subscription_adapter/test.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter # ## Test adapter for Action Cable # # The test adapter should be used only in testing. Along with # ActionCable::TestHelper it makes a great tool to test your Rails application. # # To use the te...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/inline.rb
actioncable/lib/action_cable/subscription_adapter/inline.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter class Inline < Base # :nodoc: def initialize(*) super @subscriber_map = nil end def broadcast(channel, payload) subscriber_map.broadcast(channel, payload) end d...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/redis.rb
actioncable/lib/action_cable/subscription_adapter/redis.rb
# frozen_string_literal: true # :markup: markdown gem "redis", ">= 4", "< 6" require "redis" require "active_support/core_ext/hash/except" module ActionCable module SubscriptionAdapter class Redis < Base # :nodoc: prepend ChannelPrefix # Overwrite this factory method for Redis connections if you ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb
actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter module ChannelPrefix # :nodoc: def broadcast(channel, payload) channel = channel_with_prefix(channel) super end def subscribe(channel, callback, success_callback = nil) chan...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/base.rb
actioncable/lib/action_cable/subscription_adapter/base.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter class Base attr_reader :logger, :server def initialize(server) @server = server @logger = @server.logger end def broadcast(channel, payload) raise NotImplementedError...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb
actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter class SubscriberMap def initialize @subscribers = Hash.new { |h, k| h[k] = [] } @sync = Mutex.new end def add_subscriber(channel, subscriber, on_success) @sync.synchronize d...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/postgresql.rb
actioncable/lib/action_cable/subscription_adapter/postgresql.rb
# frozen_string_literal: true # :markup: markdown gem "pg", "~> 1.1" require "pg" require "openssl" module ActionCable module SubscriptionAdapter class PostgreSQL < Base # :nodoc: prepend ChannelPrefix def initialize(*) super @listener = nil end def broadcast(channel, ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/subscription_adapter/async.rb
actioncable/lib/action_cable/subscription_adapter/async.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module SubscriptionAdapter class Async < Inline # :nodoc: private def new_subscriber_map AsyncSubscriberMap.new(server.event_loop) end class AsyncSubscriberMap < SubscriberMap def initialize(e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/broadcasting.rb
actioncable/lib/action_cable/server/broadcasting.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Server # # Action Cable Server Broadcasting # # Broadcasting is how other parts of your application can send messages to a # channel's subscribers. As explained in Channel, most of the time, these # broadcastings are str...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/base.rb
actioncable/lib/action_cable/server/base.rb
# frozen_string_literal: true # :markup: markdown require "monitor" module ActionCable module Server # # Action Cable Server Base # # A singleton ActionCable::Server instance is available via ActionCable.server. # It's used by the Rack process that starts the Action Cable server, but is also # ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/configuration.rb
actioncable/lib/action_cable/server/configuration.rb
# frozen_string_literal: true # :markup: markdown require "rack" module ActionCable module Server # # Action Cable Server Configuration # # An instance of this configuration object is available via # ActionCable.server.config, which allows you to tweak Action Cable # configuration in a Rails co...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/connections.rb
actioncable/lib/action_cable/server/connections.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Server # # Action Cable Server Connections # # Collection class for all the connections that have been established on this # specific server. Remember, usually you'll run many Action Cable servers, so # you can't use thi...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/worker.rb
actioncable/lib/action_cable/server/worker.rb
# frozen_string_literal: true # :markup: markdown require "active_support/callbacks" require "active_support/core_ext/module/attribute_accessors_per_thread" require "concurrent" module ActionCable module Server # Worker used by Server.send_async to do connection work in threads. class Worker # :nodoc: ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb
actioncable/lib/action_cable/server/worker/active_record_connection_management.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Server class Worker module ActiveRecordConnectionManagement extend ActiveSupport::Concern included do if defined?(ActiveRecord::Base) set_callback :work, :around, :with_database_connections ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/periodic_timers.rb
actioncable/lib/action_cable/channel/periodic_timers.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Channel module PeriodicTimers extend ActiveSupport::Concern included do class_attribute :periodic_timers, instance_reader: false, default: [] after_subscribe :start_periodic_timers after_unsubscri...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/test_case.rb
actioncable/lib/action_cable/channel/test_case.rb
# frozen_string_literal: true # :markup: markdown require "active_support" require "active_support/test_case" require "active_support/core_ext/hash/indifferent_access" require "json" module ActionCable module Channel class NonInferrableChannelError < ::StandardError def initialize(name) super "Un...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/callbacks.rb
actioncable/lib/action_cable/channel/callbacks.rb
# frozen_string_literal: true # :markup: markdown require "active_support/callbacks" module ActionCable module Channel # # Action Cable Channel Callbacks # # Action Cable Channel provides callback hooks that are invoked during the life # cycle of a channel: # # * [before_subscribe](rdoc-r...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/broadcasting.rb
actioncable/lib/action_cable/channel/broadcasting.rb
# frozen_string_literal: true # :markup: markdown require "active_support/core_ext/object/to_param" module ActionCable module Channel module Broadcasting extend ActiveSupport::Concern module ClassMethods # Broadcast a hash to a unique broadcasting for this array of `broadcastables` in this...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/base.rb
actioncable/lib/action_cable/channel/base.rb
# frozen_string_literal: true # :markup: markdown require "active_support/rescuable" require "active_support/parameter_filter" module ActionCable module Channel # # Action Cable Channel Base # # The channel provides the basic structure of grouping behavior into logical # units when communicating ov...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/streams.rb
actioncable/lib/action_cable/channel/streams.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Channel # # Action Cable Channel Streams # # Streams allow channels to route broadcastings to the subscriber. A # broadcasting is, as discussed elsewhere, a pubsub queue where any data placed # into it is automatically s...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actioncable/lib/action_cable/channel/naming.rb
actioncable/lib/action_cable/channel/naming.rb
# frozen_string_literal: true # :markup: markdown module ActionCable module Channel module Naming extend ActiveSupport::Concern module ClassMethods # Returns the name of the channel, underscored, without the `Channel` ending. If # the channel is in a namespace, then the namespaces a...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/jobs/action_mailbox/routing_job.rb
actionmailbox/app/jobs/action_mailbox/routing_job.rb
# frozen_string_literal: true module ActionMailbox # Routing a new InboundEmail is an asynchronous operation, which allows the ingress controllers to quickly # accept new incoming emails without being burdened to hang while they're actually being processed. class RoutingJob < ActiveJob::Base queue_as { Actio...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/jobs/action_mailbox/incineration_job.rb
actionmailbox/app/jobs/action_mailbox/incineration_job.rb
# frozen_string_literal: true module ActionMailbox # You can configure when this +IncinerationJob+ will be run as a time-after-processing using the # +config.action_mailbox.incinerate_after+ or +ActionMailbox.incinerate_after+ setting. # # Since this incineration is set for the future, it'll automatically igno...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/rails/conductor/base_controller.rb
actionmailbox/app/controllers/rails/conductor/base_controller.rb
# frozen_string_literal: true module Rails # TODO: Move this to Rails::Conductor gem class Conductor::BaseController < ActionController::Base layout "rails/conductor" before_action :ensure_development_env private def ensure_development_env head :forbidden unless Rails.env.development? ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
# frozen_string_literal: true # :enddoc: module Rails class Conductor::ActionMailbox::InboundEmailsController < Rails::Conductor::BaseController def index @inbound_emails = ActionMailbox::InboundEmail.order(created_at: :desc) end def new end def show @inbound_email = ActionMailbox:...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
# frozen_string_literal: true # :enddoc: module Rails # Rerouting will run routing and processing on an email that has already been, or attempted to be, processed. class Conductor::ActionMailbox::ReroutesController < Rails::Conductor::BaseController def create inbound_email = ActionMailbox::InboundEmail...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller.rb
actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller.rb
# frozen_string_literal: true # :enddoc: module Rails # Incinerating will destroy an email that is due and has already been processed. class Conductor::ActionMailbox::IncineratesController < Rails::Conductor::BaseController def create ActionMailbox::InboundEmail.find(params[:inbound_email_id]).incinerat...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb
actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb
# frozen_string_literal: true # :enddoc: module Rails class Conductor::ActionMailbox::InboundEmails::SourcesController < Rails::Conductor::BaseController # :nodoc: def new end def create inbound_email = ActionMailbox::InboundEmail.create_and_extract_message_id! params[:source] redirect_to m...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/base_controller.rb
actionmailbox/app/controllers/action_mailbox/base_controller.rb
# frozen_string_literal: true module ActionMailbox # The base class for all Action Mailbox ingress controllers. class BaseController < ActionController::Base skip_forgery_protection before_action :ensure_configured private def ensure_configured unless ActionMailbox.ingress == ingress_na...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller.rb
actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller.rb
# frozen_string_literal: true module ActionMailbox # Ingests inbound emails relayed from an SMTP server. # # Authenticates requests using HTTP basic access authentication. The username is always +actionmailbox+, and the # password is read from the application's encrypted credentials or an environment variable....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller.rb
actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller.rb
# frozen_string_literal: true module ActionMailbox # Ingests inbound emails from Postmark. Requires a +RawEmail+ parameter containing a full RFC 822 message. # # Authenticates requests using HTTP basic access authentication. The username is always +actionmailbox+, and the # password is read from the applicatio...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb
actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb
# frozen_string_literal: true module ActionMailbox # Ingests inbound emails from Mailgun. Requires the following parameters: # # - +body-mime+: The full RFC 822 message # - +timestamp+: The current time according to Mailgun as the number of seconds passed since the UNIX epoch # - +token+: A randomly-generate...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb
actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb
# frozen_string_literal: true module ActionMailbox # Ingests inbound emails from SendGrid. Requires an +email+ parameter containing a full RFC 822 message. # # Authenticates requests using HTTP basic access authentication. The username is always +actionmailbox+, and the # password is read from the application'...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb
actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb
# frozen_string_literal: true module ActionMailbox # Ingests inbound emails from Mandrill. # # Requires a +mandrill_events+ parameter containing a JSON array of Mandrill inbound email event objects. # Each event is expected to have a +msg+ object containing a full RFC 822 message in its +raw_msg+ property. #...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/record.rb
actionmailbox/app/models/action_mailbox/record.rb
# frozen_string_literal: true module ActionMailbox class Record < ActiveRecord::Base # :nodoc: self.abstract_class = true end end ActiveSupport.run_load_hooks :action_mailbox_record, ActionMailbox::Record
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/inbound_email.rb
actionmailbox/app/models/action_mailbox/inbound_email.rb
# frozen_string_literal: true require "mail" module ActionMailbox # The +InboundEmail+ is an Active Record that keeps a reference to the raw email stored in Active Storage # and tracks the status of processing. By default, incoming emails will go through the following lifecycle: # # * Pending: Just received b...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/inbound_email/routable.rb
actionmailbox/app/models/action_mailbox/inbound_email/routable.rb
# frozen_string_literal: true # A newly received +InboundEmail+ will not be routed synchronously as part of ingress controller's receival. # Instead, the routing will be done asynchronously, using a +RoutingJob+, to ensure maximum parallel capacity. # # By default, all newly created +InboundEmail+ records that have th...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb
actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb
# frozen_string_literal: true # The +Message-ID+ as specified by rfc822 is supposed to be a unique identifier for that individual email. # That makes it an ideal tracking token for debugging and forensics, just like +X-Request-Id+ does for # web request. # # If an inbound email does not, against the rfc822 mandate, sp...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb
actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb
# frozen_string_literal: true # Ensure that the +InboundEmail+ is automatically scheduled for later incineration if the status has been # changed to +processed+. The later incineration will be invoked at the time specified by the # +ActionMailbox.incinerate_after+ time using the +IncinerationJob+. module ActionMailbox...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb
actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb
# frozen_string_literal: true module ActionMailbox # Command class for carrying out the actual incineration of the +InboundMail+ that's been scheduled # for removal. Before the incineration – which really is just a call to +#destroy!+ – is run, we verify # that it's both eligible (by virtue of having already bee...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb
actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb
class CreateActionMailboxTables < ActiveRecord::Migration[6.0] def change create_table :action_mailbox_inbound_emails, id: primary_key_type do |t| t.integer :status, default: 0, null: false t.string :message_id, null: false t.string :message_checksum, null: false t.timestamps t.i...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/migrations_test.rb
actionmailbox/test/migrations_test.rb
# frozen_string_literal: true require "test_helper" require ActionMailbox::Engine.root.join("db/migrate/20180917164000_create_action_mailbox_tables.rb").to_s class ActionMailbox::MigrationsTest < ActiveSupport::TestCase setup do @original_verbose = ActiveRecord::Migration.verbose ActiveRecord::Migration.ver...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/test_helper.rb
actionmailbox/test/test_helper.rb
# frozen_string_literal: true require_relative "../../tools/strict_warnings" ENV["RAILS_ENV"] = "test" ENV["RAILS_INBOUND_EMAIL_PASSWORD"] = "tbsy84uSV1Kt3ZJZELY2TmShPRs91E3yL4tzf96297vBCkDWgL" require_relative "../test/dummy/config/environment" ActiveRecord::Migrator.migrations_paths = [ File.expand_path("../test/d...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/jobs/incineration_job_test.rb
actionmailbox/test/jobs/incineration_job_test.rb
# frozen_string_literal: true require "test_helper" class ActionMailbox::IncinerationJobTest < ActiveJob::TestCase setup { @inbound_email = create_inbound_email_from_fixture("welcome.eml") } test "ignoring a missing inbound email" do @inbound_email.destroy! perform_enqueued_jobs do assert_nothing_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb
actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" class Rails::Conductor::ActionMailbox::InboundEmailsControllerTest < ActionDispatch::IntegrationTest test "create inbound email" do with_rails_env("development") do assert_difference -> { ActionMailbox::InboundEmail.count }, +1 do post rails_cond...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/ingresses/relay/inbound_emails_controller_test.rb
actionmailbox/test/controllers/ingresses/relay/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" class ActionMailbox::Ingresses::Relay::InboundEmailsControllerTest < ActionDispatch::IntegrationTest setup { ActionMailbox.ingress = :relay } test "receiving an inbound email relayed from an SMTP server" do assert_difference -> { ActionMailbox::InboundEmail...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/ingresses/postmark/inbound_emails_controller_test.rb
actionmailbox/test/controllers/ingresses/postmark/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" class ActionMailbox::Ingresses::Postmark::InboundEmailsControllerTest < ActionDispatch::IntegrationTest setup { ActionMailbox.ingress = :postmark } test "receiving an inbound email from Postmark" do assert_difference -> { ActionMailbox::InboundEmail.count }...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/ingresses/mailgun/inbound_emails_controller_test.rb
actionmailbox/test/controllers/ingresses/mailgun/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" ENV["MAILGUN_INGRESS_SIGNING_KEY"] = "tbsy84uSV1Kt3ZJZELY2TmShPRs91E3yL4tzf96297vBCkDWgL" class ActionMailbox::Ingresses::Mailgun::InboundEmailsControllerTest < ActionDispatch::IntegrationTest setup { ActionMailbox.ingress = :mailgun } test "receiving an inbou...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/ingresses/sendgrid/inbound_emails_controller_test.rb
actionmailbox/test/controllers/ingresses/sendgrid/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" class ActionMailbox::Ingresses::Sendgrid::InboundEmailsControllerTest < ActionDispatch::IntegrationTest setup { ActionMailbox.ingress = :sendgrid } test "receiving an inbound email from Sendgrid" do assert_difference -> { ActionMailbox::InboundEmail.count }...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/controllers/ingresses/mandrill/inbound_emails_controller_test.rb
actionmailbox/test/controllers/ingresses/mandrill/inbound_emails_controller_test.rb
# frozen_string_literal: true require "test_helper" ENV["MANDRILL_INGRESS_API_KEY"] = "1l9Qf7lutEf7h73VXfBwhw" class ActionMailbox::Ingresses::Mandrill::InboundEmailsControllerTest < ActionDispatch::IntegrationTest setup do ActionMailbox.ingress = :mandrill @events = JSON.generate([{ event: "inbound", msg:...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/models/table_name_test.rb
actionmailbox/test/models/table_name_test.rb
# frozen_string_literal: true require "test_helper" class ActionMailbox::TableNameTest < ActiveSupport::TestCase setup do @old_prefix = ActiveRecord::Base.table_name_prefix @old_suffix = ActiveRecord::Base.table_name_suffix ActiveRecord::Base.table_name_prefix = @prefix = "abc_" ActiveRecord::Base....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/generators/mailbox_generator_test.rb
actionmailbox/test/generators/mailbox_generator_test.rb
# frozen_string_literal: true require "test_helper" require "rails/generators/mailbox/mailbox_generator" class MailboxGeneratorTest < Rails::Generators::TestCase destination File.expand_path("../../tmp", __dir__) setup :prepare_destination tests Rails::Generators::MailboxGenerator arguments ["inbox"] def ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/jobs/application_job.rb
actionmailbox/test/dummy/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/helpers/application_helper.rb
actionmailbox/test/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/controllers/application_controller.rb
actionmailbox/test/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/models/application_record.rb
actionmailbox/test/dummy/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base primary_abstract_class end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/mailers/application_mailer.rb
actionmailbox/test/dummy/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/channels/application_cable/channel.rb
actionmailbox/test/dummy/app/channels/application_cable/channel.rb
module ApplicationCable class Channel < ActionCable::Channel::Base end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/channels/application_cable/connection.rb
actionmailbox/test/dummy/app/channels/application_cable/connection.rb
module ApplicationCable class Connection < ActionCable::Connection::Base end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/mailboxes/application_mailbox.rb
actionmailbox/test/dummy/app/mailboxes/application_mailbox.rb
# frozen_string_literal: true class ApplicationMailbox < ActionMailbox::Base # routing /something/i => :somewhere end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/app/mailboxes/messages_mailbox.rb
actionmailbox/test/dummy/app/mailboxes/messages_mailbox.rb
class MessagesMailbox < ApplicationMailbox def process end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/db/schema.rb
actionmailbox/test/dummy/db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/db/migrate/20180208205311_create_action_mailbox_tables.rb
actionmailbox/test/dummy/db/migrate/20180208205311_create_action_mailbox_tables.rb
class CreateActionMailboxTables < ActiveRecord::Migration[6.0] def change create_table :action_mailbox_inbound_emails, id: primary_key_type do |t| t.integer :status, default: 0, null: false t.string :message_id, null: false t.string :message_checksum, null: false t.timestamps t.i...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/db/migrate/20180212164506_create_active_storage_tables.active_storage.rb
actionmailbox/test/dummy/db/migrate/20180212164506_create_active_storage_tables.active_storage.rb
# This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[5.2] def change create_table :active_storage_blobs do |t| t.string :key, null: false t.string :filename, null: false t.string :content_type t....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/application.rb
actionmailbox/test/dummy/config/application.rb
require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Dummy class Application < Rails::Application config.load_defaults Rails::VERSION::STRING.to_f # For compatibil...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/environment.rb
actionmailbox/test/dummy/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/puma.rb
actionmailbox/test/dummy/config/puma.rb
# This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. # Puma can serve each request in a thread from an internal thread pool. # The `threa...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/routes.rb
actionmailbox/test/dummy/config/routes.rb
Rails.application.routes.draw do end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/boot.rb
actionmailbox/test/dummy/config/boot.rb
# Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/initializers/content_security_policy.rb
actionmailbox/test/dummy/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy. # See the Securing Rails Applications Guide for more information: # https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/initializers/filter_parameter_logging.rb
actionmailbox/test/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # notations and behaviors. Rails.application.config.filter_parameters += [ ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/initializers/inflections.rb
actionmailbox/test/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/initializers/assets.rb
actionmailbox/test/dummy/config/initializers/assets.rb
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/environments/test.rb
actionmailbox/test/dummy/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/environments/development.rb
actionmailbox/test/dummy/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/dummy/config/environments/production.rb
actionmailbox/test/dummy/config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your app...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/test_helper_test.rb
actionmailbox/test/unit/test_helper_test.rb
# frozen_string_literal: true require_relative "../test_helper" module ActionMailbox class TestHelperTest < ActiveSupport::TestCase test "multi-part mail can be built in tests using a block" do inbound_email = create_inbound_email_from_mail do to "test@example.com" from "hello@example.com"...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/inbound_email_test.rb
actionmailbox/test/unit/inbound_email_test.rb
# frozen_string_literal: true require_relative "../test_helper" require "minitest/mock" module ActionMailbox class InboundEmailTest < ActiveSupport::TestCase test "mail provides the parsed source" do assert_equal "Discussion: Let's debate these attachments", create_inbound_email_from_fixture("welcome.eml"...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/relayer_test.rb
actionmailbox/test/unit/relayer_test.rb
# frozen_string_literal: true require_relative "../test_helper" require "action_mailbox/relayer" module ActionMailbox class RelayerTest < ActiveSupport::TestCase URL = "https://example.com/rails/action_mailbox/relay/inbound_emails" INGRESS_PASSWORD = "secret" setup do @relayer = ActionMailbox::R...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/router_test.rb
actionmailbox/test/unit/router_test.rb
# frozen_string_literal: true require_relative "../test_helper" class RootMailbox < ActionMailbox::Base def process $processed_by = self.class.to_s $processed_mail = mail end end class FirstMailbox < RootMailbox end class SecondMailbox < RootMailbox end module Nested class FirstMailbox < RootMailbo...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/inbound_email/message_id_test.rb
actionmailbox/test/unit/inbound_email/message_id_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ActionMailbox::InboundEmail::MessageIdTest < ActiveSupport::TestCase test "message id is extracted from raw email" do inbound_email = create_inbound_email_from_fixture("welcome.eml") assert_equal "0CB459E0-0336-41DA-BC88-E6E28C697DDB@3...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/inbound_email/incineration_test.rb
actionmailbox/test/unit/inbound_email/incineration_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ActionMailbox::InboundEmail::IncinerationTest < ActiveSupport::TestCase test "incinerating 30 days after delivery" do freeze_time assert_enqueued_with job: ActionMailbox::IncinerationJob, at: 30.days.from_now do create_inbound_e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/mailbox/bouncing_test.rb
actionmailbox/test/unit/mailbox/bouncing_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class BouncingWithReplyMailbox < ActionMailbox::Base def process bounce_with BounceMailer.bounce(to: mail.from) end end class BouncingWithImmediateReplyMailbox < ActionMailbox::Base def process bounce_now_with BounceMailer.bounce(to: ma...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionmailbox/test/unit/mailbox/routing_test.rb
actionmailbox/test/unit/mailbox/routing_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ApplicationMailbox < ActionMailbox::Base routing "replies@example.com" => :replies end class RepliesMailbox < ActionMailbox::Base def process $processed = mail.subject end end class ActionMailbox::Base::RoutingTest < ActiveSupport::T...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false