Skip to content

Commit

Permalink
moved up to current gem require style
Browse files Browse the repository at this point in the history
  • Loading branch information
aeden committed Nov 4, 2008
1 parent ef99710 commit b4d9f42
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG
Expand Up @@ -20,4 +20,7 @@

0.4 - September 17, 2007
* Added copy_table method that can copy the structure and data from one table to another. Currently implemented in MySQL (tested), PostgreSQL (tested) and SQL Server adapters (untested).
* Added support for SELECT..INTO for PostgreSQL.
* Added support for SELECT..INTO for PostgreSQL.

0.5 -
* Updated dependencies for gem to current versions of ActiveRecord, ActiveSupport and Rake. May not be compatible with Rails versions less than 2.x.
2 changes: 2 additions & 0 deletions README
@@ -1,5 +1,7 @@
This library provides extensions to Rails' ActiveRecord adapters.

As of version 0.5, adapter_extensions has dependencies on ActiveSupport and ActiveRecord 2.1.x or higher.

To use the MySQL adapter extensions with Rails 2.x, you must patch the mysql_adapter with the mysql_adapter_opt_local_infile.patch.

To execute the unit tests you must first construct a adapter_extensions_unittest database.
8 changes: 8 additions & 0 deletions Rakefile
Expand Up @@ -140,6 +140,14 @@ task :pdoc => [:rdoc] do
Rake::SshDirPublisher.new("aeden@rubyforge.org", "/var/www/gforge-projects/activewarehouse/adapter_extensions/rdoc", "rdoc").upload
end

desc "Install the gem from a local generated package"
task :install => [:package] do
windows = RUBY_PLATFORM =~ /mswin/
sudo = windows ? '' : 'sudo'
gem = windows ? 'gem.bat' : 'gem'
`#{sudo} #{gem} install pkg/#{PKG_NAME}-#{PKG_VERSION}`
end

desc "Reinstall the gem from a local package copy"
task :reinstall => [:package] do
windows = RUBY_PLATFORM =~ /mswin/
Expand Down
15 changes: 2 additions & 13 deletions lib/adapter_extensions.rb
Expand Up @@ -5,19 +5,8 @@
puts "Using AdapterExtensions"

require 'rubygems'
unless Kernel.respond_to?(:gem)
Kernel.send :alias_method, :gem, :require_gem
end

unless defined?(ActiveSupport)
gem 'activesupport'
require 'active_support'
end

unless defined?(ActiveRecord)
gem 'activerecord'
require 'active_record'
end
require 'active_support'
require 'active_record'

$:.unshift(File.dirname(__FILE__))
Dir[File.dirname(__FILE__) + "/adapter_extensions/**/*.rb"].each { |file| require(file) }

0 comments on commit b4d9f42

Please sign in to comment.