Module: Replyr
- Defined in:
- lib/replyr.rb,
lib/replyr/email.rb,
lib/replyr/config.rb,
lib/replyr/engine.rb,
lib/replyr/version.rb,
lib/replyr/handle_reply.rb,
lib/replyr/handle_bounce.rb,
lib/replyr/reply_address.rb,
lib/replyr/bounce_address.rb,
lib/replyr/address_builder.rb,
lib/generators/replyr/install_generator.rb
Defined Under Namespace
Modules: AddressBuilder, Generators, HandleBounce, HandleReply Classes: BounceAddress, Config, Email, Engine, ReplyAddress
Constant Summary collapse
- VERSION =
"0.0.8"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
-
.bounce_pattern ⇒ Object
Regexp for bounce addresses: bounce-newsletter-12-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@bounce.example.com.
- .process(message) ⇒ Object
-
.reply_pattern ⇒ Object
Regexp for reply addresses: reply-comment-12-56-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@reply.example.com.
-
.route ⇒ Object
(also: address_pattern)
Regexp for bounce and reply addresses.
- .setup_logger ⇒ Object
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
20 21 22 |
# File 'lib/replyr.rb', line 20 def config @config end |
.logger ⇒ Object
Returns the value of attribute logger.
20 21 22 |
# File 'lib/replyr.rb', line 20 def logger @logger end |
Class Method Details
.bounce_pattern ⇒ Object
Regexp for bounce addresses: bounce-newsletter-12-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@bounce.example.com
40 41 42 |
# File 'lib/replyr.rb', line 40 def bounce_pattern /#{config.bounce_prefix}-(?<model_name>[a-z,#]+)-(?<model_id>\d+)-(?<token>\S+)@#{config.bounce_host}/ end |
.process(message) ⇒ Object
52 53 54 |
# File 'lib/replyr.rb', line 52 def process() Replyr::Email.process() end |
.reply_pattern ⇒ Object
Regexp for reply addresses: reply-comment-12-56-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@reply.example.com
33 34 35 |
# File 'lib/replyr.rb', line 33 def reply_pattern /#{config.reply_prefix}-(?<model_name>[a-z,#]+)-(?<model_id>\d+)-(?<user_id>\d+)-(?<token>\S+)@#{config.reply_host}/ end |
.route ⇒ Object Also known as: address_pattern
Regexp for bounce and reply addresses. Use this as the Replyr route in your mailman-server.
47 48 49 |
# File 'lib/replyr.rb', line 47 def route /#{reply_pattern}|#{bounce_pattern}/ end |
.setup_logger ⇒ Object
26 27 28 |
# File 'lib/replyr.rb', line 26 def setup_logger @logger = (defined?(Rails) && Rails.logger) ? Rails.logger : Logger.new(STDOUT) end |