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 DataDescriptor: | |
| def __init__(self, name): | |
| self.name = name | |
| def __get__(self, obj, objtype=None): | |
| if obj: | |
| return obj.__dict__[self.name] | |
| else: | |
| return self |
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
| def longMsg = Stub(LongMsg) | |
| longMsg.getPartsIds() >> ids*.id*.toString() |
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()})" | |
| } | |
| } |
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
| // 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
| 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
| 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
| 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
| 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
| 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 |
NewerOlder