lib/lita/handlers/markov/engine.rb in lita-markov-1.0.0 vs lib/lita/handlers/markov/engine.rb in lita-markov-1.0.1

- old
+ new

@@ -8,15 +8,14 @@ DEFAULT_DATABASE_URL = 'mysql2://root@localhost/lita-markov' attr_accessor :handler attr_reader :db - def initialize(handler = nil) + def initialize(database_url = nil) @handler = handler @depth = 2 - database_url = DEFAULT_DATABASE_URL - database_url ||= handler.config.database_url if handler + database_url = database_url || DEFAULT_DATABASE_URL @db = Sequel.connect database_url @db.create_table?(:dictionary) do column :user, String, null: false # The user the states are associated with