Skip to content

Commit ef48814

Browse files
committed
Fix failing tests
1 parent 8a48d99 commit ef48814

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/main/kotlin/insyncwithfoo/ryecharm/Registry.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ private interface Prefixed {
99
val parentPrefix: String?
1010
val ownPrefix: String
1111

12+
val fullPrefix: String
13+
get() = listOfNotNull(parentPrefix, ownPrefix).joinToString(".")
14+
1215
private fun key(name: String) =
13-
listOfNotNull(parentPrefix, ownPrefix, name).joinToString(".")
16+
"$fullPrefix.$name"
1417

1518
fun key(property: KProperty0<*>) =
1619
key(property.name)
@@ -32,7 +35,7 @@ internal class Common(override val parentPrefix: String) : Prefixed {
3235

3336
override val ownPrefix = "common"
3437

35-
val logging = Logging(ownPrefix)
38+
val logging = Logging(fullPrefix)
3639

3740
}
3841

@@ -69,8 +72,8 @@ internal object RyeCharmRegistry : Prefixed {
6972
override val parentPrefix = null
7073
override val ownPrefix = RyeCharm.ID
7174

72-
val common = Common(ownPrefix)
73-
val uv = UV(ownPrefix)
74-
val ty = TY(ownPrefix)
75+
val common = Common(fullPrefix)
76+
val uv = UV(fullPrefix)
77+
val ty = TY(fullPrefix)
7578

7679
}

0 commit comments

Comments
 (0)