lib/sequella/plugin.rb in sequella-1.0.0 vs lib/sequella/plugin.rb in sequella-1.0.1
- old
+ new
@@ -1,12 +1,9 @@
require 'sequel'
+require 'sequella/service'
class Sequella::Plugin < Adhearsion::Plugin
- extend ActiveSupport::Autoload
-
- autoload :Service, 'sequella/plugin/service'
-
# Configure a database to use Sequel-backed models.
# See http://sequel.rubyforge.org/rdoc/classes/Sequel/Database.html
#
# MySQL options are preconfigured. If you want o use another adapter, make sure to include the
# required options in your configuration file
@@ -28,10 +25,10 @@
namespace :sequella do
desc "Run Sequel migrations"
task :migrate => :environment do
Service.start Adhearsion.config[:sequella]
Sequel.extension :migration
- Sequel::Migrator.run Sequella::Plugin::Service.connection, File.join(Adhearsion.root, 'db', 'migrations'), :use_transactions=>true
+ Sequel::Migrator.run Sequella::Service.connection, File.join(Adhearsion.root, 'db', 'migrations'), :use_transactions=>true
puts "Successfully migrated database"
end
end
end
end