mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Rearrange vendor bundles so gem overrides work correctly.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8112 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
57cde63138
commit
709dc33c92
32 changed files with 17 additions and 11 deletions
|
@ -31,23 +31,15 @@ unless defined?(ActionController)
|
|||
end
|
||||
end
|
||||
|
||||
# attempt to load the TMail gem
|
||||
begin
|
||||
require 'rubygems'
|
||||
gem 'TMail', '> 1.1.0'
|
||||
require 'tmail'
|
||||
rescue Gem::LoadError
|
||||
# no gem, fall back to vendor copy
|
||||
end
|
||||
|
||||
$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/")
|
||||
|
||||
require 'action_mailer/vendor'
|
||||
require 'tmail'
|
||||
|
||||
require 'action_mailer/base'
|
||||
require 'action_mailer/helpers'
|
||||
require 'action_mailer/mail_helper'
|
||||
require 'action_mailer/quoting'
|
||||
require 'action_mailer/test_helper'
|
||||
|
||||
require 'net/smtp'
|
||||
|
||||
ActionMailer::Base.class_eval do
|
||||
|
|
14
actionmailer/lib/action_mailer/vendor.rb
Normal file
14
actionmailer/lib/action_mailer/vendor.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Prefer gems to the bundled libs.
|
||||
require 'rubygems'
|
||||
|
||||
begin
|
||||
gem 'tmail', '~> 1.1.0'
|
||||
rescue Gem::LoadError
|
||||
$:.unshift "#{File.dirname(__FILE__)}/vendor/tmail-1.1.0"
|
||||
end
|
||||
|
||||
begin
|
||||
gem 'text-format', '>= 0.6.3'
|
||||
rescue Gem::LoadError
|
||||
$:.unshift "#{File.dirname(__FILE__)}/vendor/text-format-0.6.3"
|
||||
end
|
Loading…
Reference in a new issue