Created
October 13, 2010 15:32
Revisions
-
sdb revised this gist
Dec 12, 2010 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class TestProject(info: ProjectInfo) extends DefaultProject(info) with Liquibase override lazy val liquibaseContexts = mode // define an environment for reading props from pwd.properties lazy val liquibaseEnv = new BasicEnvironment { def log = TestProject.this.log def envBackingPath = "pwd.properties" @@ -32,6 +32,6 @@ class TestProject(info: ProjectInfo) extends DefaultProject(info) with Liquibase } // provide username and password as defined in pwd.properties override lazy val liquibaseUsername = liquibaseEnv.username.get.getOrElse(null) override lazy val liquibasePassword = liquibaseEnv.password.get.getOrElse(null) } -
sdb revised this gist
Oct 15, 2010 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,17 +10,17 @@ class TestProject(info: ProjectInfo) extends DefaultProject(info) with Liquibase lazy val mode = system[String]("mode").get.getOrElse(null) // provide the parameters for running liquibase commands lazy val liquibaseChangeLogFile = "config" / "db-changelog.xml" lazy val liquibaseDriver = "org.h2.Driver" // the URL depending on the mode lazy val liquibaseUrl = mode match { case "prd" => "jdbc:h2:tcp://dbserv:8084/~/sample" case _ => "jdbc:h2:file:sample" } // the contexts to run override lazy val liquibaseContexts = mode // define an environment for reading props from pwd.properties lazy val env = new BasicEnvironment @@ -32,6 +32,6 @@ class TestProject(info: ProjectInfo) extends DefaultProject(info) with Liquibase } // provide username and password as defined in pwd.properties override lazy val liquibaseUsername = env.username.get.getOrElse(null) override lazy val liquibasePassword = env.password.get.getOrElse(null) } -
sdb revised this gist
Oct 13, 2010 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ import sbt._ import com.github.sdb.sbt.liquibase._ class TestProject(info: ProjectInfo) extends DefaultProject(info) with LiquibasePlugin { // declare the required database driver as a runtime dependency val h2 = "com.h2database" % "h2" % "1.2.143" % "runtime" @@ -20,6 +19,9 @@ class TestProject(info: ProjectInfo) extends DefaultProject(info) case _ => "jdbc:h2:file:sample" } // the contexts to run override lazy val contexts = mode // define an environment for reading props from pwd.properties lazy val env = new BasicEnvironment { -
sdb created this gist
Oct 13, 2010 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ import sbt._ import com.github.sdb.sbt.liquibase._ class TestProject(info: ProjectInfo) extends DefaultProject(info) with LiquiBasePlugin { // declare the required database driver as a runtime dependency val h2 = "com.h2database" % "h2" % "1.2.143" % "runtime" // fetch the running mode from the system properties (dev, prd, ...) lazy val mode = system[String]("mode").get.getOrElse(null) // provide the parameters for running liquibase commands lazy val changeLogFile = "config" / "db-changelog.xml" lazy val driver = "org.h2.Driver" // the URL depending on the mode lazy val url = mode match { case "prd" => "jdbc:h2:tcp://dbserv:8084/~/sample" case _ => "jdbc:h2:file:sample" } // define an environment for reading props from pwd.properties lazy val env = new BasicEnvironment { def log = TestProject.this.log def envBackingPath = "pwd.properties" lazy val username = property[String] lazy val password = property[String] } // provide username and password as defined in pwd.properties override lazy val username = env.username.get.getOrElse(null) override lazy val password = env.password.get.getOrElse(null) } This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ username=sa password=blabla