package com.nhl.bootique.liquibase;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.nhl.bootique.BQBinder;
import com.nhl.bootique.ConfigModule;
import com.nhl.bootique.config.ConfigurationFactory;
import com.nhl.bootique.jdbc.DataSourceFactory;
import com.nhl.bootique.liquibase.command.UpdateCommand;

public class LiquibaseModule extends ConfigModule {

	public LiquibaseModule(String configPrefix) {
		super(configPrefix);
	}

	public LiquibaseModule() {
	}

	@Override
	public void configure(Binder binder) {
		BQBinder.contributeTo(binder).commandTypes(UpdateCommand.class);
	}

	@Provides
	public LiquibaseRunner createRunner(ConfigurationFactory configFactory, DataSourceFactory dataSourceFactory) {
		return configFactory.config(LiquibaseFactory.class, configPrefix).createRunner(dataSourceFactory);
	}
}

@@ -98,16 +98,52 @@
 ovides;%0A
+import com.google.inject.Singleton;%0A
 import c
@@ -160,22 +160,26 @@
 tique.BQ
-Binder
+CoreModule
 ;%0Aimport
@@ -583,22 +583,26 @@
 ) %7B%0A%09%09BQ
-Binder
+CoreModule
 .contrib
@@ -608,10 +608,16 @@
 bute
-To
+Commands
 (bin
@@ -625,34 +625,57 @@
 er).
-commandTypes(UpdateCommand
+addBinding().to(UpdateCommand.class).in(Singleton
 .cla

Upgrade Bootique to 0.12 #3