diff --git a/lib/activerecord-import.rb b/lib/activerecord-import.rb index 4508333..19a9055 100644 --- a/lib/activerecord-import.rb +++ b/lib/activerecord-import.rb @@ -1,2 +1,2 @@ require File.join File.dirname(__FILE__), "activerecord-import/base" -ActiveRecord::Extensions.load \ No newline at end of file +ActiveRecord::Import.load \ No newline at end of file diff --git a/lib/activerecord-import/active_record/adapters/abstract_adapter.rb b/lib/activerecord-import/active_record/adapters/abstract_adapter.rb index 60fa7e6..d191ae6 100644 --- a/lib/activerecord-import/active_record/adapters/abstract_adapter.rb +++ b/lib/activerecord-import/active_record/adapters/abstract_adapter.rb @@ -3,8 +3,8 @@ require "activerecord-import/adapters/abstract_adapter" module ActiveRecord # :nodoc: module ConnectionAdapters # :nodoc: class AbstractAdapter # :nodoc: - extend ActiveRecord::Extensions::Import::AbstractAdapter::ClassMethods - include ActiveRecord::Extensions::Import::AbstractAdapter::InstanceMethods + extend ActiveRecord::Import::AbstractAdapter::ClassMethods + include ActiveRecord::Import::AbstractAdapter::InstanceMethods end end end diff --git a/lib/activerecord-import/active_record/adapters/mysql2_adapter.rb b/lib/activerecord-import/active_record/adapters/mysql2_adapter.rb index d7923fe..6288128 100644 --- a/lib/activerecord-import/active_record/adapters/mysql2_adapter.rb +++ b/lib/activerecord-import/active_record/adapters/mysql2_adapter.rb @@ -2,5 +2,5 @@ require "active_record/connection_adapters/mysql2_adapter" require "activerecord-import/adapters/mysql_adapter" class ActiveRecord::ConnectionAdapters::Mysql2Adapter - include ActiveRecord::Extensions::Import::MysqlAdapter::InstanceMethods + include ActiveRecord::Import::MysqlAdapter::InstanceMethods end \ No newline at end of file diff --git a/lib/activerecord-import/active_record/adapters/mysql_adapter.rb b/lib/activerecord-import/active_record/adapters/mysql_adapter.rb index 565f083..7798ffd 100644 --- a/lib/activerecord-import/active_record/adapters/mysql_adapter.rb +++ b/lib/activerecord-import/active_record/adapters/mysql_adapter.rb @@ -2,5 +2,5 @@ require "active_record/connection_adapters/mysql_adapter" require "activerecord-import/adapters/mysql_adapter" class ActiveRecord::ConnectionAdapters::MysqlAdapter - include ActiveRecord::Extensions::Import::MysqlAdapter::InstanceMethods + include ActiveRecord::Import::MysqlAdapter::InstanceMethods end \ No newline at end of file diff --git a/lib/activerecord-import/active_record/adapters/postgresql_adapter.rb b/lib/activerecord-import/active_record/adapters/postgresql_adapter.rb index 1a295c0..8da024b 100644 --- a/lib/activerecord-import/active_record/adapters/postgresql_adapter.rb +++ b/lib/activerecord-import/active_record/adapters/postgresql_adapter.rb @@ -2,6 +2,6 @@ require "active_record/connection_adapters/postgresql_adapter" require "activerecord-import/adapters/postgresql_adapter" class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter - include ActiveRecord::Extensions::Import::PostgreSQLAdapter::InstanceMethods + include ActiveRecord::Import::PostgreSQLAdapter::InstanceMethods end diff --git a/lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb b/lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb index 716b65f..45d6d58 100644 --- a/lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb +++ b/lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb @@ -2,6 +2,6 @@ require "active_record/connection_adapters/sqlite3_adapter" require "activerecord-import/adapters/sqlite3_adapter" class ActiveRecord::ConnectionAdapters::Sqlite3Adapter - include ActiveRecord::Extensions::Import::Sqlite3Adapter::InstanceMethods + include ActiveRecord::Import::Sqlite3Adapter::InstanceMethods end diff --git a/lib/activerecord-import/adapters/abstract_adapter.rb b/lib/activerecord-import/adapters/abstract_adapter.rb index df7f704..f95d5b6 100644 --- a/lib/activerecord-import/adapters/abstract_adapter.rb +++ b/lib/activerecord-import/adapters/abstract_adapter.rb @@ -1,4 +1,4 @@ -module ActiveRecord::Extensions::Import::AbstractAdapter +module ActiveRecord::Import::AbstractAdapter NO_MAX_PACKET = 0 QUERY_OVERHEAD = 8 #This was shown to be true for MySQL, but it's not clear where the overhead is from. diff --git a/lib/activerecord-import/adapters/mysql_adapter.rb b/lib/activerecord-import/adapters/mysql_adapter.rb index c084319..81c7911 100644 --- a/lib/activerecord-import/adapters/mysql_adapter.rb +++ b/lib/activerecord-import/adapters/mysql_adapter.rb @@ -1,9 +1,9 @@ -module ActiveRecord::Extensions::Import::MysqlAdapter +module ActiveRecord::Import::MysqlAdapter module InstanceMethods def self.included(klass) klass.instance_eval do - include ActiveRecord::Extensions::Import::ImportSupport - include ActiveRecord::Extensions::Import::OnDuplicateKeyUpdateSupport + include ActiveRecord::Import::ImportSupport + include ActiveRecord::Import::OnDuplicateKeyUpdateSupport end end diff --git a/lib/activerecord-import/adapters/postgresql_adapter.rb b/lib/activerecord-import/adapters/postgresql_adapter.rb index 3b944a8..5077c4e 100644 --- a/lib/activerecord-import/adapters/postgresql_adapter.rb +++ b/lib/activerecord-import/adapters/postgresql_adapter.rb @@ -1,4 +1,4 @@ -module ActiveRecord::Extensions::Import::PostgreSQLAdapter +module ActiveRecord::Import::PostgreSQLAdapter module InstanceMethods def next_value_for_sequence(sequence_name) %{nextval('#{sequence_name}')} diff --git a/lib/activerecord-import/adapters/sqlite3_adapter.rb b/lib/activerecord-import/adapters/sqlite3_adapter.rb index 0b82619..e023b8b 100644 --- a/lib/activerecord-import/adapters/sqlite3_adapter.rb +++ b/lib/activerecord-import/adapters/sqlite3_adapter.rb @@ -1,4 +1,4 @@ -module ActiveRecord::Extensions::Import::Sqlite3Adapter +module ActiveRecord::Import::Sqlite3Adapter module InstanceMethods def next_value_for_sequence(sequence_name) %{nextval('#{sequence_name}')} diff --git a/lib/activerecord-import/base.rb b/lib/activerecord-import/base.rb index 10f074b..44f0756 100644 --- a/lib/activerecord-import/base.rb +++ b/lib/activerecord-import/base.rb @@ -2,9 +2,9 @@ require "pathname" require "active_record" require "active_record/version" -module ActiveRecord::Extensions +module ActiveRecord::Import AdapterPath = File.join File.expand_path(File.dirname(__FILE__)), "/active_record/adapters" - + # Loads the import functionality for a specific database adapter def self.require_adapter(adapter) require File.join(AdapterPath,"/abstract_adapter") diff --git a/lib/activerecord-import/import.rb b/lib/activerecord-import/import.rb index e0bfe88..5e8354c 100644 --- a/lib/activerecord-import/import.rb +++ b/lib/activerecord-import/import.rb @@ -1,8 +1,8 @@ require "ostruct" -module ActiveRecord::Extensions::ConnectionAdapters ; end +module ActiveRecord::Import::ConnectionAdapters ; end -module ActiveRecord::Extensions::Import #:nodoc: +module ActiveRecord::Import #:nodoc: module ImportSupport #:nodoc: def supports_import? #:nodoc: true