actionmail_logger 0.0.1

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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWM5ZjUyZmNkOGZkMTY4NDI2YmVkMTU3YzQ4NzQ1M2ZhNzRmNjI5ZQ==
5
+ data.tar.gz: !binary |-
6
+ N2VhN2YwOWExZTY0ODFlNjc5ZDY1Nzc2OThlODc5ZTYxY2VjYjE5ZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MGIyZmQxZjc3MWRlODI0ODkzZjM3NWNkNTQyMTM2ZTUyMmE1NmE5ODc0MTli
10
+ NjAyZGNhN2VjNGQxZWEzMjFkZGViYTg2ZDZlYjFhNDk2ZWQ3NTU2MmUxM2Vm
11
+ MjQyMmIxMjNhMWM1NmVmYWVhOTJmOWI4YWVmZWM2YjRjNzNkZDY=
12
+ data.tar.gz: !binary |-
13
+ YzdlMDM3MzIwOTBmZGQ1ZWFjOWVjOTIwN2FiMWI3MTVhZmI0MGE5NzdjNjk0
14
+ NGM5NWU1ZmUzODIyYjA5NzRhNDc0ZTdhYWIyMTg5NzViNmJhYzZhZGJhNGQ1
15
+ N2YzYWQ4ZTcwY2EwOWM1YWFjNDZiMTY2YjdjNTZjMGY0ZDI5OTU=
@@ -0,0 +1,13 @@
1
+ require File.expand_path('../lib/actionmail_logger/version', __FILE__)
2
+ Gem::Specification.new do |s|
3
+ s.name = 'actionmail_logger'
4
+ s.summary = 'Prints rails mail to a logger instead of delivering it'
5
+ s.version = ActionmailLogger::VERSION
6
+ s.authors = ['Byron Anderson', 'Jeff Turley']
7
+ s.email = ['byronanderson32@gmail.com', 'pythe314@gmail.com']
8
+ s.require_paths = ['lib']
9
+ s.files = `git ls-files`.split("\n")
10
+ s.license = 'MIT'
11
+
12
+ s.add_dependency 'mail', '>= 2.0.3'
13
+ end
@@ -0,0 +1,2 @@
1
+ require 'actionmail_logger/logger'
2
+ require 'actionmail_logger/railtie' if defined?(Rails)
@@ -0,0 +1,12 @@
1
+ module ActionmailLogger
2
+ class Logger
3
+ attr_reader :logger
4
+ def initialize(options = {})
5
+ @logger = options.fetch(:logger) { Rails.logger }
6
+ end
7
+
8
+ def deliver!(mail)
9
+ logger.info(mail.encoded)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ module ActionmailLogger
2
+ class Railtie < Rails::Railtie
3
+ initializer "actionmail_logger.add_delivery_method" do
4
+ ActiveSupport.on_load :action_mailer do
5
+ ActionMailer::Base.add_delivery_method(:actionmail_logger, ActionmailLogger::Logger)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module ActionmailLogger
2
+ VERSION = '0.0.1'
3
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: actionmail_logger
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Byron Anderson
8
+ - Jeff Turley
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-04-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: mail
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: 2.0.3
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 2.0.3
28
+ description:
29
+ email:
30
+ - byronanderson32@gmail.com
31
+ - pythe314@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - actionmail_logger.gemspec
37
+ - lib/actionmail_logger.rb
38
+ - lib/actionmail_logger/logger.rb
39
+ - lib/actionmail_logger/railtie.rb
40
+ - lib/actionmail_logger/version.rb
41
+ homepage:
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.2.2
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Prints rails mail to a logger instead of delivering it
65
+ test_files: []