<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,72 +1,72 @@
 require 'rubygems'
 require 'net/smtp'
 begin
-  require 'tmail'
+	require 'tmail'
 rescue LoadError
-  require 'actionmailer'
+	require 'actionmailer'
 end
 
 module Pony
-  def self.mail(options)
-    raise(ArgumentError, &quot;:to is required&quot;) unless options[:to]
+	def self.mail(options)
+		raise(ArgumentError, &quot;:to is required&quot;) unless options[:to]
 
-    via = options.delete(:via)
-    if via.nil?
-      transport build_tmail(options)
-    else
-      if via_options.include?(via.to_s)
-        send(&quot;transport_via_#{via}&quot;, build_tmail(options), options)
-      else
-        raise(ArgumentError, &quot;:via must be either smtp or sendmail&quot;)
-      end
-    end
-  end
+		via = options.delete(:via)
+		if via.nil?
+			transport build_tmail(options)
+		else
+			if via_options.include?(via.to_s)
+				send(&quot;transport_via_#{via}&quot;, build_tmail(options), options)
+			else
+				raise(ArgumentError, &quot;:via must be either smtp or sendmail&quot;)
+			end
+		end
+	end
 
-  def self.build_tmail(options)
-    mail = TMail::Mail.new
-    mail.to = options[:to]
-    mail.from = options[:from] || 'pony@unknown'
-    mail.subject = options[:subject]
-    mail.body = options[:body] || &quot;&quot;
-    mail
-  end
+	def self.build_tmail(options)
+		mail = TMail::Mail.new
+		mail.to = options[:to]
+		mail.from = options[:from] || 'pony@unknown'
+		mail.subject = options[:subject]
+		mail.body = options[:body] || &quot;&quot;
+		mail
+	end
 
-  def self.sendmail_binary
-    @sendmail_binary ||= `which sendmail`.chomp
-  end
+	def self.sendmail_binary
+		@sendmail_binary ||= `which sendmail`.chomp
+	end
 
-  def self.transport(tmail)
-    if File.executable? sendmail_binary
-      transport_via_sendmail(tmail)
-    else
-      transport_via_smtp(tmail)
-    end
-  end
+	def self.transport(tmail)
+		if File.executable? sendmail_binary
+			transport_via_sendmail(tmail)
+		else
+			transport_via_smtp(tmail)
+		end
+	end
 
-  def self.via_options
-    %w(sendmail smtp)
-  end
+	def self.via_options
+		%w(sendmail smtp)
+	end
 
-  def self.transport_via_sendmail(tmail, options={})
-    IO.popen('-', 'w+') do |pipe|
-      if pipe
-        pipe.write(tmail.to_s)
-      else
-        exec(sendmail_binary, *tmail.to)
-      end
-    end
-  end
+	def self.transport_via_sendmail(tmail, options={})
+		IO.popen('-', 'w+') do |pipe|
+			if pipe
+				pipe.write(tmail.to_s)
+			else
+				exec(sendmail_binary, *tmail.to)
+			end
+		end
+	end
 
-  def self.transport_via_smtp(tmail, options={:smtp =&gt; {}})
-    default_options = {:smtp =&gt; { :host =&gt; 'localhost', :port =&gt; '25', :domain =&gt; 'localhost.localdomain' }}
-    o = default_options[:smtp].merge(options[:smtp])
-    smtp = Net::SMTP.new(o[:host], o[:port])
-    if o.include?(:auth)
-      smtp.start(o[:domain], o[:user], o[:password], o[:auth])
-    else
-      smtp.start(o[:domain])
-    end
-    smtp.send_message tmail.to_s, tmail.from, tmail.to
-    smtp.finish
-  end
+	def self.transport_via_smtp(tmail, options={:smtp =&gt; {}})
+		default_options = {:smtp =&gt; { :host =&gt; 'localhost', :port =&gt; '25', :domain =&gt; 'localhost.localdomain' }}
+		o = default_options[:smtp].merge(options[:smtp])
+		smtp = Net::SMTP.new(o[:host], o[:port])
+		if o.include?(:auth)
+			smtp.start(o[:domain], o[:user], o[:password], o[:auth])
+		else
+			smtp.start(o[:domain])
+		end
+		smtp.send_message tmail.to_s, tmail.from, tmail.to
+		smtp.finish
+	end
 end</diff>
      <filename>lib/pony.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,122 +1,122 @@
 require File.dirname(__FILE__) + '/base'
 
 describe Pony do
-  it &quot;sends mail&quot; do
-    Pony.should_receive(:transport) do |tmail|
-      tmail.to.should == [ 'joe@example.com' ]
-      tmail.from.should == [ 'sender@example.com' ]
-      tmail.subject.should == 'hi'
-      tmail.body.should == 'Hello, Joe.'
-    end
-    Pony.mail(:to =&gt; 'joe@example.com', :from =&gt; 'sender@example.com', :subject =&gt; 'hi', :body =&gt; 'Hello, Joe.')
-  end
-
-  it &quot;requires :to param&quot; do
-    Pony.stub!(:transport)
-    lambda { Pony.mail({}) }.should raise_error(ArgumentError)
-  end
-
-  it &quot;doesn't require any other param&quot; do
-    Pony.stub!(:transport)
-    lambda { Pony.mail(:to =&gt; 'joe@example.com') }.should_not raise_error
-  end
-
-  ####################
-
-  describe &quot;builds a TMail object with field:&quot; do
-    it &quot;to&quot; do
-      Pony.build_tmail(:to =&gt; 'joe@example.com').to.should == [ 'joe@example.com' ]
-    end
-
-    it &quot;from&quot; do
-      Pony.build_tmail(:from =&gt; 'joe@example.com').from.should == [ 'joe@example.com' ]
-    end
-
-    it &quot;from (default)&quot; do
-      Pony.build_tmail({}).from.should == [ 'pony@unknown' ]
-    end
-
-    it &quot;subject&quot; do
-      Pony.build_tmail(:subject =&gt; 'hello').subject.should == 'hello'
-    end
-
-    it &quot;body&quot; do
-      Pony.build_tmail(:body =&gt; 'What do you know, Joe?').body.should == 'What do you know, Joe?'
-    end
-  end
-
-  describe &quot;transport&quot; do
-    it &quot;transports via the sendmail binary if it exists&quot; do
-      File.stub!(:executable?).and_return(true)
-      Pony.should_receive(:transport_via_sendmail).with(:tmail)
-      Pony.transport(:tmail)
-    end
-
-    it &quot;transports via smtp if no sendmail binary&quot; do
-      Pony.stub!(:sendmail_binary).and_return('/does/not/exist')
-      Pony.should_receive(:transport_via_smtp).with(:tmail)
-      Pony.transport(:tmail)
-    end
-
-    it &quot;transports mail via /usr/sbin/sendmail binary&quot; do
-      pipe = mock('sendmail pipe')
-      IO.should_receive(:popen).with('-',&quot;w+&quot;).and_yield(pipe)
-      pipe.should_receive(:write).with('message')
-      Pony.transport_via_sendmail(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
-    end
-
-    describe &quot;SMTP transport&quot; do
-      before do
-        @smtp = mock('net::smtp object')
-        @smtp.stub!(:start)
-        @smtp.stub!(:send_message)
-        @smtp.stub!(:finish)
-        Net::SMTP.stub!(:new).and_return(@smtp)
-      end
-
-      it &quot;defaults to localhost as the SMTP server&quot; do
-        Net::SMTP.should_receive(:new).with('localhost', '25').and_return(@smtp)
-        Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
-      end
-
-      it &quot;uses SMTP authorization when auth key is provided&quot; do
-        o = { :smtp =&gt; { :user =&gt; 'user', :password =&gt; 'password', :auth =&gt; 'plain'}}
-        @smtp.should_receive(:start).with('localhost.localdomain', 'user', 'password', 'plain')
-        Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'), o)
-      end
-
-      it &quot;starts the job&quot; do
-        @smtp.should_receive(:start)
-        Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
-      end
-
-      it &quot;sends a tmail message&quot; do
-        @smtp.should_receive(:send_message)
-        Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
-      end
-
-      it &quot;finishes the job&quot; do
-        @smtp.should_receive(:finish)
-        Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
-      end
-
-    end
-  end
-
-  describe &quot;:via option should over-ride the default transport mechanism&quot; do
-    it &quot;should send via sendmail if :via =&gt; sendmail&quot; do
-      Pony.should_receive(:transport_via_sendmail)
-      Pony.mail(:to =&gt; 'joe@example.com', :via =&gt; :sendmail)
-    end
-
-    it &quot;should send via smtp if :via =&gt; smtp&quot; do
-      Pony.should_receive(:transport_via_smtp)
-      Pony.mail(:to =&gt; 'joe@example.com', :via =&gt; :smtp)
-    end
-
-    it &quot;should raise an error if via is neither smtp nor sendmail&quot; do
-      lambda { Pony.mail(:to =&gt; 'joe@plumber.com', :via =&gt; :pigeon) }.should raise_error(ArgumentError)
-    end
-  end
+	it &quot;sends mail&quot; do
+		Pony.should_receive(:transport) do |tmail|
+			tmail.to.should == [ 'joe@example.com' ]
+			tmail.from.should == [ 'sender@example.com' ]
+			tmail.subject.should == 'hi'
+			tmail.body.should == 'Hello, Joe.'
+		end
+		Pony.mail(:to =&gt; 'joe@example.com', :from =&gt; 'sender@example.com', :subject =&gt; 'hi', :body =&gt; 'Hello, Joe.')
+	end
+
+	it &quot;requires :to param&quot; do
+		Pony.stub!(:transport)
+		lambda { Pony.mail({}) }.should raise_error(ArgumentError)
+	end
+
+	it &quot;doesn't require any other param&quot; do
+		Pony.stub!(:transport)
+		lambda { Pony.mail(:to =&gt; 'joe@example.com') }.should_not raise_error
+	end
+
+	####################
+
+	describe &quot;builds a TMail object with field:&quot; do
+		it &quot;to&quot; do
+			Pony.build_tmail(:to =&gt; 'joe@example.com').to.should == [ 'joe@example.com' ]
+		end
+
+		it &quot;from&quot; do
+			Pony.build_tmail(:from =&gt; 'joe@example.com').from.should == [ 'joe@example.com' ]
+		end
+
+		it &quot;from (default)&quot; do
+			Pony.build_tmail({}).from.should == [ 'pony@unknown' ]
+		end
+
+		it &quot;subject&quot; do
+			Pony.build_tmail(:subject =&gt; 'hello').subject.should == 'hello'
+		end
+
+		it &quot;body&quot; do
+			Pony.build_tmail(:body =&gt; 'What do you know, Joe?').body.should == 'What do you know, Joe?'
+		end
+	end
+
+	describe &quot;transport&quot; do
+		it &quot;transports via the sendmail binary if it exists&quot; do
+			File.stub!(:executable?).and_return(true)
+			Pony.should_receive(:transport_via_sendmail).with(:tmail)
+			Pony.transport(:tmail)
+		end
+
+		it &quot;transports via smtp if no sendmail binary&quot; do
+			Pony.stub!(:sendmail_binary).and_return('/does/not/exist')
+			Pony.should_receive(:transport_via_smtp).with(:tmail)
+			Pony.transport(:tmail)
+		end
+
+		it &quot;transports mail via /usr/sbin/sendmail binary&quot; do
+			pipe = mock('sendmail pipe')
+			IO.should_receive(:popen).with('-',&quot;w+&quot;).and_yield(pipe)
+			pipe.should_receive(:write).with('message')
+			Pony.transport_via_sendmail(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
+		end
+
+		describe &quot;SMTP transport&quot; do
+			before do
+				@smtp = mock('net::smtp object')
+				@smtp.stub!(:start)
+				@smtp.stub!(:send_message)
+				@smtp.stub!(:finish)
+				Net::SMTP.stub!(:new).and_return(@smtp)
+			end
+
+			it &quot;defaults to localhost as the SMTP server&quot; do
+				Net::SMTP.should_receive(:new).with('localhost', '25').and_return(@smtp)
+				Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
+			end
+
+			it &quot;uses SMTP authorization when auth key is provided&quot; do
+				o = { :smtp =&gt; { :user =&gt; 'user', :password =&gt; 'password', :auth =&gt; 'plain'}}
+				@smtp.should_receive(:start).with('localhost.localdomain', 'user', 'password', 'plain')
+				Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'), o)
+			end
+
+			it &quot;starts the job&quot; do
+				@smtp.should_receive(:start)
+				Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
+			end
+
+			it &quot;sends a tmail message&quot; do
+				@smtp.should_receive(:send_message)
+				Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
+			end
+
+			it &quot;finishes the job&quot; do
+				@smtp.should_receive(:finish)
+				Pony.transport_via_smtp(mock('tmail', :to =&gt; 'to', :from =&gt; 'from', :to_s =&gt; 'message'))
+			end
+
+		end
+	end
+
+	describe &quot;:via option should over-ride the default transport mechanism&quot; do
+		it &quot;should send via sendmail if :via =&gt; sendmail&quot; do
+			Pony.should_receive(:transport_via_sendmail)
+			Pony.mail(:to =&gt; 'joe@example.com', :via =&gt; :sendmail)
+		end
+
+		it &quot;should send via smtp if :via =&gt; smtp&quot; do
+			Pony.should_receive(:transport_via_smtp)
+			Pony.mail(:to =&gt; 'joe@example.com', :via =&gt; :smtp)
+		end
+
+		it &quot;should raise an error if via is neither smtp nor sendmail&quot; do
+			lambda { Pony.mail(:to =&gt; 'joe@plumber.com', :via =&gt; :pigeon) }.should raise_error(ArgumentError)
+		end
+	end
 
 end</diff>
      <filename>spec/pony_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e2604b97e8c29e972b3b9ab004137c501f912b55</id>
    </parent>
  </parents>
  <author>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </author>
  <url>http://github.com/adamwiggins/pony/commit/e93a99148fe51d1d1f96f57e9e625692ec364cce</url>
  <id>e93a99148fe51d1d1f96f57e9e625692ec364cce</id>
  <committed-date>2009-03-16T13:03:30-07:00</committed-date>
  <authored-date>2009-02-17T14:17:30-08:00</authored-date>
  <message>spaces to tabs</message>
  <tree>8bcadc29ecdbb0d9a330dce768ac3e867c4b6e7c</tree>
  <committer>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </committer>
</commit>
