Skip to content

Commit

Permalink
Change package names to match new group id
Browse files Browse the repository at this point in the history
  • Loading branch information
Koriit committed Jan 31, 2022
1 parent 0f11316 commit 6ba84d7
Show file tree
Hide file tree
Showing 24 changed files with 74 additions and 72 deletions.
2 changes: 2 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ image:https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg[ktlint,link
image:https://img.shields.io/maven-central/v/com.koriit.kotlin/ktor-controllers.svg?label=Maven%20Central[Maven Central, link="https://search.maven.org/search?q=g:%22com.koriit.kotlin%22%20AND%20a:%22ktor-controllers%22"]
image:https://img.shields.io/github/license/koriit/ktor-controllers[GitHub]

WARNING: From version 0.7.0 all package names have been renamed to match new artifact group id.

Helpers to create powerful Ktor controllers.

[WARNING]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.server.engine.ApplicationEngine
import kotlinx.coroutines.channels.Channel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.application.ApplicationCall
import io.ktor.application.call
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@file:Suppress("MatchingDeclarationName")

package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import korrit.kotlin.ktor.controllers.delegates.HeaderParamDelegate
import korrit.kotlin.ktor.controllers.delegates.PathParamDelegate
import korrit.kotlin.ktor.controllers.delegates.QueryParamDelegate
import com.korrit.kotlin.ktor.controllers.delegates.HeaderParamDelegate
import com.korrit.kotlin.ktor.controllers.delegates.PathParamDelegate
import com.korrit.kotlin.ktor.controllers.delegates.QueryParamDelegate
import kotlin.reflect.KProperty

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// intended to differentiate from core functions
@file:Suppress("FunctionName")

package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.routing.Route
import io.ktor.routing.delete
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package korrit.kotlin.ktor.controllers.delegates
package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Input
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import io.ktor.features.conversionService
import korrit.kotlin.ktor.controllers.Input
import korrit.kotlin.ktor.controllers.exceptions.InputException
import java.lang.reflect.Type
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package korrit.kotlin.ktor.controllers.delegates
package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Input
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import io.ktor.features.conversionService
import korrit.kotlin.ktor.controllers.Input
import korrit.kotlin.ktor.controllers.exceptions.InputException
import java.lang.reflect.Type
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package korrit.kotlin.ktor.controllers.delegates
package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Input
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import io.ktor.features.conversionService
import korrit.kotlin.ktor.controllers.Input
import korrit.kotlin.ktor.controllers.exceptions.InputException
import java.lang.reflect.Type
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers.exceptions
package com.korrit.kotlin.ktor.controllers.exceptions

import io.ktor.features.BadRequestException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package korrit.kotlin.ktor.controllers.patch
package com.korrit.kotlin.ktor.controllers.patch

import korrit.kotlin.ktor.controllers.exceptions.InputException
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KMutableProperty1
import kotlin.reflect.KProperty
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package korrit.kotlin.ktor.controllers.patch
package com.korrit.kotlin.ktor.controllers.patch

import korrit.kotlin.ktor.controllers.exceptions.InputException
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import java.util.concurrent.ConcurrentHashMap
import kotlin.reflect.KClass
import kotlin.reflect.KFunction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.features
package com.korrit.kotlin.ktor.features

import io.ktor.application.ApplicationCallPipeline
import io.ktor.application.ApplicationFeature
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import io.ktor.http.ContentType.Text
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.BadRequest
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.header
import io.ktor.response.respondText
import korrit.kotlin.ktor.controllers.exceptions.InputException
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.server.cio.CIO
import io.ktor.server.engine.embeddedServer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import io.ktor.http.ContentType.Application
import io.ktor.http.HttpHeaders.ContentType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import com.koriit.kotlin.slf4j.logger
import kotlinx.coroutines.TimeoutCancellationException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package korrit.kotlin.ktor.controllers
package com.korrit.kotlin.ktor.controllers

import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.databind.json.JsonMapper
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.korrit.kotlin.ktor.convertTime
import com.korrit.kotlin.ktor.features.UUIDCallId
import io.ktor.application.install
import io.ktor.features.ContentNegotiation
import io.ktor.features.DataConversion
Expand All @@ -15,7 +16,6 @@ import io.ktor.routing.Routing
import io.ktor.routing.routing
import io.ktor.server.engine.applicationEngineEnvironment
import io.ktor.server.testing.TestApplicationEngine
import korrit.kotlin.ktor.features.UUIDCallId

fun testServer(
controller: Routing.() -> Unit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package korrit.kotlin.ktor.controllers.delegates
package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.EmptyBodyInput
import com.korrit.kotlin.ktor.controllers.GET
import com.korrit.kotlin.ktor.controllers.header
import com.korrit.kotlin.ktor.controllers.testServer
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.BadRequest
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.respond
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.EmptyBodyInput
import korrit.kotlin.ktor.controllers.GET
import korrit.kotlin.ktor.controllers.header
import korrit.kotlin.ktor.controllers.testServer
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package korrit.kotlin.ktor.controllers.delegates
package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.EmptyBodyInput
import com.korrit.kotlin.ktor.controllers.GET
import com.korrit.kotlin.ktor.controllers.path
import com.korrit.kotlin.ktor.controllers.testServer
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.BadRequest
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.respond
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.EmptyBodyInput
import korrit.kotlin.ktor.controllers.GET
import korrit.kotlin.ktor.controllers.path
import korrit.kotlin.ktor.controllers.testServer
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package korrit.kotlin.ktor.controllers.delegates

package com.korrit.kotlin.ktor.controllers.delegates

import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.EmptyBodyInput
import com.korrit.kotlin.ktor.controllers.GET
import com.korrit.kotlin.ktor.controllers.path
import com.korrit.kotlin.ktor.controllers.query
import com.korrit.kotlin.ktor.controllers.testServer
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.BadRequest
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.respond
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.EmptyBodyInput
import korrit.kotlin.ktor.controllers.GET
import korrit.kotlin.ktor.controllers.path
import korrit.kotlin.ktor.controllers.query
import korrit.kotlin.ktor.controllers.testServer
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package korrit.kotlin.ktor.controllers.features

package com.korrit.kotlin.ktor.controllers.features

import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.EmptyBodyInput
import com.korrit.kotlin.ktor.controllers.GET
import com.korrit.kotlin.ktor.controllers.header
import com.korrit.kotlin.ktor.controllers.testServer
import com.korrit.kotlin.ktor.features.UUIDCallId
import io.ktor.features.callId
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.respond
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.EmptyBodyInput
import korrit.kotlin.ktor.controllers.GET
import korrit.kotlin.ktor.controllers.header
import korrit.kotlin.ktor.controllers.testServer
import korrit.kotlin.ktor.features.UUIDCallId
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotEquals
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
package korrit.kotlin.ktor.controllers.patch
package com.korrit.kotlin.ktor.controllers.patch

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import com.koriit.kotlin.slf4j.logger
import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.Input
import com.korrit.kotlin.ktor.controllers.PATCH
import com.korrit.kotlin.ktor.controllers.PUT
import com.korrit.kotlin.ktor.controllers.exceptions.InputException
import com.korrit.kotlin.ktor.controllers.testCases
import com.korrit.kotlin.ktor.controllers.testServer
import io.ktor.client.utils.EmptyContent
import io.ktor.http.ContentType.Application
import io.ktor.http.HttpHeaders.ContentType
Expand All @@ -13,13 +20,6 @@ import io.ktor.http.HttpStatusCode.Companion.NoContent
import io.ktor.request.httpMethod
import io.ktor.response.respond
import io.ktor.server.testing.setBody
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.Input
import korrit.kotlin.ktor.controllers.PATCH
import korrit.kotlin.ktor.controllers.PUT
import korrit.kotlin.ktor.controllers.exceptions.InputException
import korrit.kotlin.ktor.controllers.testCases
import korrit.kotlin.ktor.controllers.testServer
import org.junit.jupiter.api.Assertions.assertDoesNotThrow
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package korrit.kotlin.ktor.controllers.validation
package com.korrit.kotlin.ktor.controllers.validation

import com.korrit.kotlin.ktor.controllers.Ctx
import com.korrit.kotlin.ktor.controllers.EmptyBodyInput
import com.korrit.kotlin.ktor.controllers.GET
import com.korrit.kotlin.ktor.controllers.header
import com.korrit.kotlin.ktor.controllers.testServer
import io.ktor.http.HttpMethod.Companion.Get
import io.ktor.http.HttpStatusCode.Companion.BadRequest
import io.ktor.http.HttpStatusCode.Companion.OK
import io.ktor.response.respond
import korrit.kotlin.ktor.controllers.Ctx
import korrit.kotlin.ktor.controllers.EmptyBodyInput
import korrit.kotlin.ktor.controllers.GET
import korrit.kotlin.ktor.controllers.header
import korrit.kotlin.ktor.controllers.testServer
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.fail
Expand Down

0 comments on commit 6ba84d7

Please sign in to comment.