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.1.0"
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.
17 18 19 |
# File 'lib/replyr.rb', line 17 def config @config end |
.logger ⇒ Object
Returns the value of attribute logger.
17 18 19 |
# File 'lib/replyr.rb', line 17 def logger @logger end |
Class Method Details
.bounce_pattern ⇒ Object
Regexp for bounce addresses: bounce-newsletter-12-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@bounce.example.com
37 38 39 |
# File 'lib/replyr.rb', line 37 def bounce_pattern /#{config.bounce_prefix}-(?<model_name>[a-z,#]+)-(?<model_id>\d+)-(?<token>\S+)@#{config.bounce_host}/ end |
.process(message) ⇒ Object
49 50 51 |
# File 'lib/replyr.rb', line 49 def process() Replyr::Email.process() end |
.reply_pattern ⇒ Object
Regexp for reply addresses: reply-comment-12-56-01ce26dc69094af9246ea7e7ce9970aff2b81cc9@reply.example.com
30 31 32 |
# File 'lib/replyr.rb', line 30 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.
44 45 46 |
# File 'lib/replyr.rb', line 44 def route /#{reply_pattern}|#{bounce_pattern}/ end |
.setup_logger ⇒ Object
23 24 25 |
# File 'lib/replyr.rb', line 23 def setup_logger @logger = (defined?(Rails) && Rails.logger) ? Rails.logger : Logger.new(STDOUT) end |