diff --git a/.idea/compiler.xml b/.idea/compiler.xml index f15a414..b74fec4 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -12,5 +12,8 @@ + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..b8fd050 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 8e676e9..539dfdb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,13 +1,15 @@ - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index a2e9128..0fad7ee 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,8 @@ group 'kweb' version '0.3.1' buildscript { - ext.kotlin_version = '1.3.70' - ext.dokka_version = '0.9.18' + ext.kotlin_version = '1.3.72' + ext.dokka_version = '0.10.1' repositories { jcenter() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1b16c34..b71deac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Thu Apr 23 08:58:13 CDT 2020 +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/kweb/shoebox/samples/samples.kt b/src/main/kotlin/kweb/shoebox/samples/samples.kt index 21ef1b8..a4b5639 100644 --- a/src/main/kotlin/kweb/shoebox/samples/samples.kt +++ b/src/main/kotlin/kweb/shoebox/samples/samples.kt @@ -9,7 +9,7 @@ import java.nio.file.Files */ -fun `basic usage sample`() { +fun basic_usage_sample() { val dir = Files.createTempDirectory("sb-") val userStore = Shoebox(dir.resolve("users")) val usersByEmail = View(Shoebox(dir.resolve("usersByEmail")), userStore, viewBy = User::email) @@ -23,12 +23,12 @@ fun `basic usage sample`() { println(usersByGender["male"]) // [User(name=Ian Clarke, gender=male, email=ian@blah.com), // User(name=Fred Smith, gender=male, email=fred@blah.com)] // note: view["xx]" returns a set of values - usersByGender.onAdd("male", {kv -> + usersByGender.onAdd("male") { kv -> println("${kv.key} became male") - }) - usersByGender.onRemove("male", {kv -> + } + usersByGender.onRemove("male") { kv -> println("${kv.key} ceased to be male") - }) + } userStore["fred"] = userStore["fred"]!!.copy(gender = "female") // Prints "fred ceased to be male" }