log4r-mail 0.0.2 → 0.0.3
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.
- data/lib/log4r/mail_outputter.rb +3 -2
- metadata +4 -4
data/lib/log4r/mail_outputter.rb
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#coding: utf-8
|
|
2
2
|
require "log4r/outputter/outputter"
|
|
3
3
|
require "mail"
|
|
4
|
+
require "nkf"
|
|
4
5
|
|
|
5
6
|
module Log4r
|
|
6
7
|
class MailOutputter < Log4r::Outputter
|
|
7
|
-
VERSION = "0.0.
|
|
8
|
+
VERSION = "0.0.3"
|
|
8
9
|
attr_accessor :host, :port, :from, :to, :subject, :body, :encoding
|
|
9
10
|
def initialize(_name, hash={})
|
|
10
11
|
super(_name, hash)
|
|
@@ -59,7 +60,7 @@ module Log4r
|
|
|
59
60
|
|
|
60
61
|
def apply_encoding(encoding, content)
|
|
61
62
|
if encoding == "ISO-2022-JP"
|
|
62
|
-
NKF.nkf("-j", content).force_encoding("binary")
|
|
63
|
+
::NKF.nkf("-j", content).force_encoding("binary")
|
|
63
64
|
else
|
|
64
65
|
content
|
|
65
66
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: log4r-mail
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-10-
|
|
12
|
+
date: 2012-10-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: log4r
|
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
74
74
|
version: '0'
|
|
75
75
|
segments:
|
|
76
76
|
- 0
|
|
77
|
-
hash:
|
|
77
|
+
hash: 2237328309993654068
|
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
none: false
|
|
80
80
|
requirements:
|
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
83
83
|
version: '0'
|
|
84
84
|
segments:
|
|
85
85
|
- 0
|
|
86
|
-
hash:
|
|
86
|
+
hash: 2237328309993654068
|
|
87
87
|
requirements: []
|
|
88
88
|
rubyforge_project:
|
|
89
89
|
rubygems_version: 1.8.24
|