This file contains hidden or 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 characters
"com.typesafe.slick" %% "slick-codegen" % "3.2.1", | |
"org.slf4j" % "log4j-over-slf4j" % "1.7.25", | |
"ch.qos.logback" % "logback-classic" % "1.2.3", | |
"ch.qos.logback" % "logback-core" % "1.2.3", | |
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2" |
This file contains hidden or 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 characters
package org.opal.db | |
object SchemaGenerator extends App { | |
slick.codegen.SourceCodeGenerator.main( | |
Array( | |
"slick.jdbc.MySQLProfile", | |
"com.mysql.cj.jdbc.Driver", | |
"jdbc:mysql://localhost:3306/test", | |
"src/main/scala", | |
"org.opal.db.model", |
This file contains hidden or 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 characters
val dbUser = System.getProperty("db.user", "test") | |
val dbPass = System.getProperty("db.pass", "test") | |
val dbUrl = System.getProperty("db.url", "jdbc:mysql://localhost:3306/test") | |
enablePlugins(FlywayPlugin) | |
flywayUrl := dbUrl | |
flywayUser := dbUser | |
flywayPassword := dbPass |
This file contains hidden or 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 characters
enablePlugins(CodegenPlugin) | |
slickCodegenDatabaseUrl := dbUrl | |
slickCodegenDatabaseUser := dbUser | |
slickCodegenDatabasePassword := dbPass | |
slickCodegenDriver := slick.jdbc.MySQLProfile | |
slickCodegenJdbcDriver := "com.mysql.cj.jdbc.Driver" | |
slickCodegenOutputPackage := "org.opal.db.model" | |
slickCodegenOutputDir := file("src/main/scala") |
This file contains hidden or 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 characters
VERSION_CLASS=DefaultVersion ./gradlew check -i |
This file contains hidden or 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 characters
VERSION_CLASS=FailedVersionSnapshotAlwaysFalse ./gradlew check -i |
This file contains hidden or 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 characters
tasks { | |
"test" { | |
inputs.property("version.class", System.getenv().getOrDefault("VERSION_CLASS", "")) | |
} | |
} |
This file contains hidden or 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 characters
// variables | |
variable availability_zone { | |
type = "string" | |
default = "ap-southeast-2a" | |
} | |
variable vpc_id { | |
type = "string" | |
default = "vpc-xxx" | |
} |
This file contains hidden or 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 characters
@Grapes([ | |
@Grab(group='org.mongodb', module='mongo-java-driver', version='3.11.0'), | |
@Grab(group='org.spockframework', module='spock-core', version='1.3-groovy-2.5'), | |
@Grab(group='cglib', module='cglib-nodep', version='3.2.10'), | |
]) | |
import org.bson.types.ObjectId | |
import spock.lang.Specification | |
import spock.lang.Subject | |
import spock.lang.Shared |
This file contains hidden or 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 characters
class MsgId { | |
ObjectId id | |
String toString() { | |
"MsgId(id=ObjectId(${id.toString()})" | |
} | |
} |