Skip to content

Commit 2b80f0c

Browse files
author
Simon Naumov
committed
⬆️ version bumps
1 parent 73d9aec commit 2b80f0c

File tree

20 files changed

+57
-37
lines changed

20 files changed

+57
-37
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.2.9] - 03.03.2023
4+
5+
### Changed
6+
7+
- Dependency version bumps
8+
39
## [1.2.8] - 02.06.2022
410

511
### Fixed
@@ -157,6 +163,7 @@
157163
- Implicit party pulling
158164
- Rude mode
159165

166+
[1.2.9]: https://github.com/pool-party/pull-party-bot/compare/v1.2.8...v1.2.9
160167
[1.2.8]: https://github.com/pool-party/pull-party-bot/compare/v1.2.7...v1.2.8
161168
[1.2.7]: https://github.com/pool-party/pull-party-bot/compare/v1.2.6...v1.2.7
162169
[1.2.6]: https://github.com/pool-party/pull-party-bot/compare/v1.2.5...v1.2.6

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: java -jar build/libs/pull-party-bot-1.2.8.jar
1+
web: java -jar build/libs/pull-party-bot-1.2.9.jar

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Use these commands to mention members of needed parties, see the information and
9797

9898
> To set up required version of gradle and dependencies run `gradlew` script (according to your system) with `build` target.
9999
100-
- [Heroku deployment service](https://www.heroku.com)
100+
- [Northflank deployment service](https://northflank.com/)
101101

102102
- [JetBrains Exposed SQL DSL](https://github.com/JetBrains/Exposed)
103103

@@ -124,11 +124,12 @@ Use these commands to mention members of needed parties, see the information and
124124
In order to be able to launch the bot server locally you have to compile sources with gradle and set the following environment variables
125125
or provide corresponding values in [`defaults.properties`](src/main/resources/defaults.properties):
126126

127-
- `TELEGRAM_TOKEN` - the one you get from [`BotFather`](https://t.me/BotFather)
127+
- `TELEGRAM_TOKEN` - the one you get from [`BotFather`](https://t.me/BotFather)
128+
- `DATABASE_URL`
129+
- `LONGPOLL=true` for using long polling instead of web hooking (common usage case is local launch and debugging)
130+
- `APP_URL` - webhook url
131+
- `DEVELOPER_CHAT_ID` for error logs
128132

129-
- `JDBC_DATABASE_URL`, `JDBC_DATABASE_USERNAME`, `JDBC_DATABASE_PASSWORD` - all provided by heroku on database deployment
130-
131-
- `LONGPOLL=true` for using long polling instead of web hooking (common usage case is local launch and debugging)
132133

133134
### Database migrations
134135

build.gradle.kts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ plugins {
88
}
99

1010
group = "org.pool-party"
11-
version = "1.2.8"
11+
version = "1.2.9"
1212

1313
repositories {
1414
maven("https://jitpack.io")
1515
mavenCentral()
1616
}
1717

1818
dependencies {
19-
2019
implementation(libs.kotlin.std)
2120
implementation(libs.kotlin.reflect)
2221
implementation(libs.kotlin.serialization)
@@ -65,3 +64,14 @@ tasks.withType<KotlinCompile>().configureEach {
6564
kotlinOptions.freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
6665
kotlinOptions.freeCompilerArgs += "-Xcontext-receivers"
6766
}
67+
68+
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
69+
disabledRules.set(
70+
setOf(
71+
"package-name",
72+
"multiline-if-else",
73+
"trailing-comma-on-call-site",
74+
"trailing-comma-on-declaration-site",
75+
)
76+
)
77+
}

gradle/libs.versions.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[versions]
2-
kotlin = "1.7.0"
3-
testContainers = "1.17.1"
4-
jupiter = "5.8.2"
5-
exposed = "0.38.1"
6-
flyway = "8.5.8"
2+
kotlin = "1.8.10"
3+
testContainers = "1.17.6"
4+
jupiter = "5.9.2"
5+
exposed = "0.41.1"
6+
flyway = "9.15.1"
77

88
[plugins]
99
jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1010
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
11-
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "10.3.0" }
11+
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "11.2.0" }
1212
flyway = { id = "org.flywaydb.flyway", version.ref = "flyway" }
1313

1414
[libraries]
@@ -17,22 +17,22 @@ flyway = { id = "org.flywaydb.flyway", version.ref = "flyway" }
1717

1818
kotlin-std = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
1919
kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
20-
kotlin-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.3.3" }
20+
kotlin-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.5.0" }
2121

2222
exposed-core = { group = "org.jetbrains.exposed", name = "exposed-core", version.ref = "exposed" }
2323
exposed-dao = { group = "org.jetbrains.exposed", name = "exposed-dao", version.ref = "exposed" }
2424
exposed-jdbc = { group = "org.jetbrains.exposed", name = "exposed-jdbc", version.ref = "exposed" }
2525
exposed-jodatime = { group = "org.jetbrains.exposed", name = "exposed-jodatime", version.ref = "exposed" }
26-
postgresql = { group = "org.postgresql", name = "postgresql", version = "42.3.4" }
26+
postgresql = { group = "org.postgresql", name = "postgresql", version = "42.5.4" }
2727

28-
telegramBot = { group = "com.github.elbekD", name = "kt-telegram-bot", version = "2.1.4" }
28+
telegramBot = { group = "com.github.elbekD", name = "kt-telegram-bot", version = "2.2.0" }
2929

3030
flyway = { group = "org.flywaydb", name = "flyway-core", version.ref = "flyway" }
3131

3232
konfig = { group = "com.natpryce", name = "konfig", version = "1.6.10.0" }
3333

3434
slf4j = { group = "org.slf4j", name = "slf4j-simple", version = "2.0.0-alpha7" }
35-
logging = { group = "io.github.microutils", name = "kotlin-logging", version = "2.1.21" }
35+
logging = { group = "io.github.microutils", name = "kotlin-logging", version = "4.0.0-beta-2" }
3636

3737
stringSimilarity = { group = "info.debatty", name = "java-string-similarity", version = "2.0.0" }
3838

@@ -42,6 +42,6 @@ kotlin-test-junit5 = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit
4242
jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "jupiter" }
4343
jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "jupiter" }
4444

45-
mockk = { group = "io.mockk", name = "mockk", version = "1.12.4" }
45+
mockk = { group = "io.mockk", name = "mockk", version = "1.13.4" }
4646
testContainers-jupiter = { group = "org.testcontainers", name = "junit-jupiter", version.ref = "testContainers" }
4747
testContainers-postgres = { group = "org.testcontainers", name = "postgresql", version.ref = "testContainers" }

src/main/kotlin/com/github/pool_party/pull_party_bot/Configuration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ object Configuration {
6969
private fun double() = Configured(doubleType)
7070

7171
private fun getDatabaseUrl(): MatchResult =
72-
"""postgres://(\w+):([\w\d]+)@([\w\d\-\.]+):(\d+)/([\w\d]+)""".toRegex().matchEntire(DATABASE_URL)
72+
"""postgresql://([_\w]+):([_\w\d]+)@([\w\d\-\.]+):(\d+)/([_\w\d]+)""".toRegex().matchEntire(DATABASE_URL)
7373
?: throw RuntimeException("Bad DATABASE_URL format")
7474

7575
private val <T> KProperty<T>.configName

src/main/kotlin/com/github/pool_party/pull_party_bot/commands/Callback.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.elbekd.bot.types.CallbackQuery
55
import kotlinx.serialization.Serializable
66
import kotlinx.serialization.decodeFromString
77
import kotlinx.serialization.json.Json
8-
import mu.KotlinLogging
8+
import mu.two.KotlinLogging
99

1010
private val logger = KotlinLogging.logger {}
1111

src/main/kotlin/com/github/pool_party/pull_party_bot/commands/Command.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.github.pool_party.pull_party_bot.commands.messages.ON_ADMINS_PARTY_CH
1111
import com.github.pool_party.pull_party_bot.commands.messages.ON_PERMISSION_DENY
1212
import com.github.pool_party.pull_party_bot.commands.messages.ON_SENDER_FAIL
1313
import com.github.pool_party.pull_party_bot.database.dao.ChatDao
14-
import mu.KotlinLogging
14+
import mu.two.KotlinLogging
1515
import java.time.LocalDateTime
1616
import kotlin.system.measureNanoTime
1717

src/main/kotlin/com/github/pool_party/pull_party_bot/commands/Handlers.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ import com.github.pool_party.pull_party_bot.commands.handlers.callback.PingCallb
2525
import com.github.pool_party.pull_party_bot.commands.messages.onError
2626
import com.github.pool_party.pull_party_bot.database.dao.ChatDaoImpl
2727
import com.github.pool_party.pull_party_bot.database.dao.PartyDaoImpl
28-
import mu.KotlinLogging
28+
import mu.two.KotlinLogging
2929

3030
suspend fun Bot.initHandlers() {
31-
3231
val partyDaoImpl = PartyDaoImpl()
3332

3433
val chatDaoImpl = ChatDaoImpl()
@@ -82,7 +81,11 @@ private suspend fun Bot.processThrowable(throwable: Throwable): Nothing {
8281
if (throwable is SendingMessageException) "${throwable.action}: " to throwable.reason else "" to throwable
8382

8483
logger.error { "$prefix${reason.message}:\n${reason.stackTraceToString()}" }
85-
sendMessage(Configuration.DEVELOP_CHAT_ID.toChatId(), onError(reason).escapeSpecial(), ParseMode.MarkdownV2)
84+
sendMessage(
85+
Configuration.DEVELOP_CHAT_ID.toChatId(),
86+
onError(reason).escapeSpecial(),
87+
parseMode = ParseMode.MarkdownV2,
88+
)
8689

8790
throw reason
8891
}

src/main/kotlin/com/github/pool_party/pull_party_bot/commands/MessageUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.elbekd.bot.types.ChatMember
77
import com.elbekd.bot.types.Message
88
import com.elbekd.bot.types.ParseMode
99
import com.elbekd.bot.types.ReplyKeyboard
10-
import mu.KotlinLogging
10+
import mu.two.KotlinLogging
1111

1212
private val logger = KotlinLogging.logger { }
1313

@@ -39,7 +39,7 @@ suspend fun Bot.sendMessageLogging(
3939
return sendMessage(
4040
chatId.toChatId(),
4141
text.escapeSpecial(),
42-
ParseMode.MarkdownV2,
42+
parseMode = ParseMode.MarkdownV2,
4343
replyToMessageId = replyTo,
4444
replyMarkup = markup,
4545
)

0 commit comments

Comments
 (0)