Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Updated to 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
code0x378 committed Feb 23, 2020
1 parent adefb74 commit 6bf2ec8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A feature to use the Pebble template engine with ktor.

**Note: Version 0.0.5 is for ktor 1.3+, Version 0.0.4 is for <= 1.2**

## Installation

### Add dependency to gradle
Expand All @@ -15,7 +17,7 @@ maven { url "https://dl.bintray.com/jeffsmithdev/maven" }
Include the artifact:

```groovy
compile 'com.tlogx.ktor:ktor-pebble:0.0.4'
compile 'com.tlogx.ktor:ktor-pebble:0.0.5'
```

Install the feature in ktor with optional config:
Expand Down Expand Up @@ -56,6 +58,9 @@ routing {

## Releases

**0.0.5**
- Updated ktor to 1.3.0

**0.0.4**
- Updated kotlin (1.3.50), ktor (1.2.4) and pebble (3.1.0) - Thanks Richard Scorer

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.ktor_version = '1.2.4'
ext.ktor_version = '1.3.0'
ext.logback_version = '1.2.1'
ext.ktor_pebble_version = '0.0.4'
ext.ktor_pebble_version = '0.0.5'

repositories {
jcenter()
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/tlogx/ktor/pebble/Pebble.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import io.ktor.response.ApplicationSendPipeline
import io.ktor.util.AttributeKey
import io.ktor.util.KtorExperimentalAPI
import io.ktor.util.cio.bufferedWriter
import kotlinx.coroutines.io.ByteWriteChannel
import io.ktor.utils.io.ByteWriteChannel
import java.util.*


Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/com/tlogx/ktor/pebble/PebbleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PebbleTest {
assert(response.content!!.contains(validListItem))
val contentTypeText = assertNotNull(response.headers[HttpHeaders.ContentType])
assertEquals(ContentType.Text.Html.withCharset(Charsets.UTF_8), ContentType.parse(contentTypeText))
assertEquals("e", response.headers[HttpHeaders.ETag])
assertEquals("\"e\"", response.headers[HttpHeaders.ETag])
}
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ class PebbleTest {
assert(content.contains("<li>Brownie</li>"))
val contentTypeText = assertNotNull(response.headers[HttpHeaders.ContentType])
assertEquals(ContentType.Text.Html.withCharset(Charsets.UTF_8), ContentType.parse(contentTypeText))
assertEquals("e", response.headers[HttpHeaders.ETag])
assertEquals("\"e\"", response.headers[HttpHeaders.ETag])
}
}
}
Expand Down

0 comments on commit 6bf2ec8

Please sign in to comment.