Permalink
Browse files

Added dependency for pony

  • Loading branch information...
avdgaag committed Jul 6, 2010
1 parent 6505752 commit 92261a065f96e1d8cb123c5a4425cde8dd45601b
Showing with 13 additions and 6 deletions.
  1. +1 −0 Rakefile
  2. +9 −0 lib/subtrigger.rb
  3. +3 −5 lib/subtrigger/dsl.rb
  4. +0 −1 lib/subtrigger/revision.rb
View
@@ -12,6 +12,7 @@ begin
gem.authors = ["Arjan van der Gaag"]
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
gem.add_development_dependency "mocha", ">= 0"
+ gem.add_dependency 'pony'
end
Jeweler::GemcutterTasks.new
rescue LoadError
View
@@ -1,3 +1,12 @@
+# Libraries
+begin
+ require 'pony'
+rescue LoadError
+ puts 'WARNING: Subtrigger requires Pony to send e-mails.'
+end
+require 'time'
+
+# Load internals
require 'lib/subtrigger/dsl'
require 'lib/subtrigger/revision'
require 'lib/subtrigger/rule'
View
@@ -7,11 +7,9 @@ def on(*args, &block)
Rule.new(*args, &block)
end
- # Create and deliver a new Mail object
- #
- # @see Subtrigger::Mail#initialize
- def mail(*args, &block)
- Mail.new(*args, &block).deliver
+ # Create and deliver a new Mail object using Pony
+ def mail(*args)
+ ::Pony.mail(*args)
end
# Call Subversion commands using the configured svn executable.
@@ -1,4 +1,3 @@
-require 'time'
module Subtrigger
# = Revision
#

0 comments on commit 92261a0

Please sign in to comment.