Skip to content

Commit

Permalink
Merge branch 'oshai-kl5'
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jul 26, 2023
2 parents 6c1f850 + 494a0dc commit a671d4f
Show file tree
Hide file tree
Showing 82 changed files with 88 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import io.pact.plugins.jvm.core.CatalogueManager
import io.pact.plugins.jvm.core.DefaultPluginManager
import io.pact.plugins.jvm.core.PactPlugin
import io.pact.plugins.jvm.core.PactPluginNotFoundException
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.util.regex.Pattern

open class BaseBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import au.com.dius.pact.core.model.matchingrules.NumberTypeMatcher
import au.com.dius.pact.core.model.matchingrules.RegexMatcher
import au.com.dius.pact.core.support.isNotEmpty
import com.mifmif.common.regex.Generex
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.commons.lang3.time.DateFormatUtils
import org.apache.commons.lang3.time.DateUtils
import java.text.ParseException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import au.com.dius.pact.core.support.deepMerge
import au.com.dius.pact.core.support.json.JsonValue
import groovy.lang.Closure
import io.pact.plugins.jvm.core.ContentMatcher
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

open class SynchronousMessageBuilder(
private val description: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import au.com.dius.pact.core.support.Metrics
import au.com.dius.pact.core.support.expressions.DataType
import au.com.dius.pact.core.support.expressions.ExpressionParser
import au.com.dius.pact.core.support.isNotEmpty
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.extension.AfterAllCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import io.ktor.util.network.port
import io.netty.channel.Channel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.net.SocketAddress
import java.util.zip.DeflaterInputStream
import java.util.zip.GZIPInputStream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import io.ktor.util.network.hostname
import io.pact.plugins.jvm.core.CatalogueEntry
import io.pact.plugins.jvm.core.CatalogueEntryProviderType
import io.pact.plugins.jvm.core.CatalogueEntryType
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.commons.text.StringEscapeUtils
import org.apache.hc.client5.http.classic.methods.HttpOptions
import org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import io.pact.plugins.jvm.core.DefaultPluginManager
import io.pact.plugins.jvm.core.MockServerDetails
import io.pact.plugins.jvm.core.MockServerResults
import io.pact.plugins.jvm.core.PluginManager
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

/**
* Mock server provided by a plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import io.pact.plugins.jvm.core.DefaultPluginManager
import io.pact.plugins.jvm.core.PactPlugin
import io.pact.plugins.jvm.core.PactPluginEntryNotFoundException
import io.pact.plugins.jvm.core.PactPluginNotFoundException
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.nio.file.Path
import java.nio.file.Paths
import kotlin.io.path.exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import au.com.dius.pact.core.model.OptionalBody
import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.padTo
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.hc.core5.http.NameValuePair
import org.apache.hc.core5.net.WWWFormCodec

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package au.com.dius.pact.core.matchers

import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

object HeaderMatcher : KLogging() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.json.JsonParser
import au.com.dius.pact.core.support.json.JsonValue
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

object JsonContentMatcher : ContentMatcher, KLogging() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import au.com.dius.pact.core.support.json.JsonException
import au.com.dius.pact.core.support.json.JsonParser
import au.com.dius.pact.core.support.json.KafkaSchemaRegistryWireFormatter
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

class KafkaJsonSchemaContentMatcher : ContentMatcher {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import com.github.zafarkhaja.semver.Version
import io.pact.plugins.jvm.core.CatalogueEntry
import io.pact.plugins.jvm.core.CatalogueEntryProviderType
import io.pact.plugins.jvm.core.CatalogueEntryType
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.commons.lang3.time.DateUtils
import org.apache.tika.config.TikaConfig
import org.apache.tika.io.TikaInputStream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import au.com.dius.pact.core.model.matchingrules.MinMaxEqualsIgnoreOrderMatcher
import au.com.dius.pact.core.model.matchingrules.ValuesMatcher
import au.com.dius.pact.core.model.parsePath
import au.com.dius.pact.core.support.Either
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.math.BigInteger
import java.util.Comparator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import au.com.dius.pact.core.model.matchingrules.ValuesMatcher
import au.com.dius.pact.core.model.parsePath
import au.com.dius.pact.core.support.padTo
import io.pact.plugins.jvm.core.PluginConfiguration
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.commons.codec.binary.Hex

data class MatchingContext @JvmOverloads constructor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package au.com.dius.pact.core.matchers

import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

object MetadataMatcher : KLogging() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import au.com.dius.pact.core.model.IHttpPart
import au.com.dius.pact.core.model.OptionalBody
import au.com.dius.pact.core.support.Result
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.util.Enumeration
import javax.mail.BodyPart
import javax.mail.Header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import au.com.dius.pact.core.model.OptionalBody
import au.com.dius.pact.core.model.matchingrules.RegexMatcher
import au.com.dius.pact.core.support.Result
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

class PlainTextContentMatcher : ContentMatcher {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import au.com.dius.pact.core.model.ContentType
import au.com.dius.pact.core.model.OptionalBody
import au.com.dius.pact.core.support.Result
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

/**
* Content matcher that delegates to a plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package au.com.dius.pact.core.matchers

import au.com.dius.pact.core.support.padTo
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.atteo.evo.inflector.English

object QueryMatcher : KLogging() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import au.com.dius.pact.core.model.V4Pact
import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonValue
import io.pact.plugins.jvm.core.PluginConfiguration
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

sealed class RequestMatch {
private val score: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package au.com.dius.pact.core.matchers

import au.com.dius.pact.core.model.IResponse
import io.pact.plugins.jvm.core.PluginConfiguration
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

sealed class ResponseMatch
object FullResponseMatch : ResponseMatch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import au.com.dius.pact.core.model.OptionalBody
import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.zipAll
import io.pact.plugins.jvm.core.InteractionContents
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.xerces.dom.TextImpl
import org.w3c.dom.NamedNodeMap
import org.w3c.dom.Node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import au.com.dius.pact.core.model.generators.JsonContentTypeHandler
import au.com.dius.pact.core.model.generators.JsonQueryResult
import au.com.dius.pact.core.model.matchingrules.MatchingRuleCategory
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

object ArrayContainsJsonGenerator : KLogging(), Generator {
override val type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import au.com.dius.pact.core.model.v4.MessageContents
import au.com.dius.pact.core.support.Json.toJson
import au.com.dius.pact.core.support.json.JsonValue
import io.pact.plugins.jvm.core.CatalogueManager
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

interface ResponseGenerator {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.Utils
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.io.File
import java.util.Collections
import kotlin.reflect.full.declaredFunctions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package au.com.dius.pact.core.model

import au.com.dius.pact.core.support.isNotEmpty
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.tika.mime.MediaType
import org.apache.tika.mime.MediaTypeRegistry
import org.apache.tika.mime.MimeTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import au.com.dius.pact.core.model.generators.Generators
import au.com.dius.pact.core.model.matchingrules.MatchingRules
import au.com.dius.pact.core.support.isNotEmpty
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.nio.charset.Charset
import java.util.Base64

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import au.com.dius.pact.core.model.ContentType.Companion.UNKNOWN
import au.com.dius.pact.core.model.ContentType.Companion.XMLREGEXP
import au.com.dius.pact.core.model.ContentType.Companion.XMLREGEXP2
import au.com.dius.pact.core.support.json.JsonParser
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.commons.codec.binary.Hex
import org.apache.tika.config.TikaConfig
import org.apache.tika.io.TikaInputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package au.com.dius.pact.core.model

import au.com.dius.pact.core.support.Result
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

data class MergeResult(val ok: Boolean, val message: String, val result: Pact? = null)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import au.com.dius.pact.core.support.json.map
import au.com.dius.pact.core.support.jsonArray
import au.com.dius.pact.core.support.jsonObject
import au.com.dius.pact.core.support.unwrap
import mu.KLogging
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.hc.client5.http.auth.AuthScope
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials
import org.apache.hc.client5.http.classic.methods.HttpGet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.json.JsonParser
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.PrintWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import au.com.dius.pact.core.model.matchingrules.MatchingRules
import au.com.dius.pact.core.model.matchingrules.MatchingRulesImpl
import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

/**
* Request made by a consumer to a provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package au.com.dius.pact.core.model

import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonParser
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.net.URLEncoder

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import au.com.dius.pact.core.model.generators.Generators
import au.com.dius.pact.core.model.matchingrules.MatchingRules
import au.com.dius.pact.core.model.matchingrules.MatchingRulesImpl
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging

/**
* Response from a provider to a consumer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import au.com.dius.pact.core.model.matchingrules.MatchingRules
import au.com.dius.pact.core.model.matchingrules.MatchingRulesImpl
import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import org.apache.commons.beanutils.BeanUtils

private fun headersFromJson(json: JsonValue): Map<String, List<String>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import au.com.dius.pact.core.support.isNotEmpty
import au.com.dius.pact.core.support.json.JsonValue
import au.com.dius.pact.core.support.json.map
import au.com.dius.pact.core.support.jsonObject
import mu.KLogging
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.commons.lang3.builder.HashCodeBuilder
import java.util.Base64

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import au.com.dius.pact.core.support.generators.expressions.DateExpressionLexer
import au.com.dius.pact.core.support.generators.expressions.DateExpressionParser
import au.com.dius.pact.core.support.generators.expressions.DateOffsetType
import au.com.dius.pact.core.support.generators.expressions.Operation
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.time.DayOfWeek
import java.time.Month
import java.time.OffsetDateTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package au.com.dius.pact.core.model.generators

import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.mapError
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.lang.Integer.parseInt
import java.time.OffsetDateTime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import au.com.dius.pact.core.support.getOr
import au.com.dius.pact.core.support.isNotEmpty
import au.com.dius.pact.core.support.json.JsonValue
import com.mifmif.common.regex.Generex
import mu.KLogging
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.commons.lang3.RandomStringUtils
import org.apache.commons.lang3.RandomUtils
import java.math.BigDecimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonParser
import au.com.dius.pact.core.support.json.JsonValue
import au.com.dius.pact.core.support.json.orNull
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.util.Locale

enum class Category {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import au.com.dius.pact.core.support.generators.expressions.TimeBase
import au.com.dius.pact.core.support.generators.expressions.TimeExpressionLexer
import au.com.dius.pact.core.support.generators.expressions.TimeExpressionParser
import au.com.dius.pact.core.support.generators.expressions.TimeOffsetType
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.time.LocalTime
import java.time.OffsetDateTime
import java.time.ZoneOffset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package au.com.dius.pact.core.model.matchingrules
import au.com.dius.pact.core.model.PactSpecVersion
import au.com.dius.pact.core.model.generators.Generator
import au.com.dius.pact.core.support.json.JsonValue
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.util.Comparator
import java.util.function.Predicate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import au.com.dius.pact.core.support.Either
import au.com.dius.pact.core.support.Json
import au.com.dius.pact.core.support.json.JsonValue
import au.com.dius.pact.core.support.json.map
import mu.KLogging
import io.github.oshai.kotlinlogging.KLogging
import java.lang.RuntimeException

/**
Expand Down
Loading

0 comments on commit a671d4f

Please sign in to comment.