peeping_tom 0.1.1 → 0.2
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/peeping_tom.rb +1 -2
- data/lib/peeping_tom/dsl.rb +1 -0
- data/lib/peeping_tom/notifier/email.rb +7 -7
- metadata +2 -3
data/lib/peeping_tom.rb
CHANGED
@@ -3,7 +3,6 @@ require File.join(File.dirname(__FILE__), "peeping_tom", "peeper")
|
|
3
3
|
require File.join(File.dirname(__FILE__), "peeping_tom", "site")
|
4
4
|
require File.join(File.dirname(__FILE__), "peeping_tom", "dsl")
|
5
5
|
|
6
|
-
require File.join(File.dirname(__FILE__), "peeping_tom", "notifier", "email")
|
7
6
|
|
8
7
|
module PeepingTom
|
9
8
|
def self.peeper(name = nil)
|
@@ -22,4 +21,4 @@ end
|
|
22
21
|
|
23
22
|
include PeepingTom::DSL
|
24
23
|
|
25
|
-
$stdout.puts "[PeepingTom] Let me creep this place up a bit..."
|
24
|
+
$stdout.puts "[PeepingTom] Let me creep this place up a bit..."
|
data/lib/peeping_tom/dsl.rb
CHANGED
@@ -60,6 +60,7 @@ module PeepingTom
|
|
60
60
|
require File.join(File.dirname(__FILE__), "notifier", "irc")
|
61
61
|
channel = PeepingTom::Notifier::IRC.new(*opts)
|
62
62
|
elsif type == :email
|
63
|
+
require File.join(File.dirname(__FILE__), "notifier", "email")
|
63
64
|
channel = PeepingTom::Notifier::Email.new(*opts)
|
64
65
|
else
|
65
66
|
raise ArgumentError, "unknown channel type: #{type}"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'mmmail'
|
2
2
|
|
3
3
|
module PeepingTom
|
4
4
|
module Notifier
|
@@ -18,12 +18,12 @@ module PeepingTom
|
|
18
18
|
|
19
19
|
private
|
20
20
|
def send_email(to, subject, msg)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
MmMail::Transport::DefaultConfig.method = :sendmail
|
22
|
+
MmMail.mail(:to => to,
|
23
|
+
:from => "PeepingTom@creepy.com",
|
24
|
+
:subject => subject,
|
25
|
+
:body => msg)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
|
-
end
|
29
|
+
end
|