From 9a1922773c02e83cf1526e2494c4b1ccd30f9710 Mon Sep 17 00:00:00 2001 From: Anatoly Kislov Date: Wed, 8 Nov 2017 15:18:07 +0300 Subject: [PATCH] feat: update dependencies --- build.gradle | 32 +++++++++---------- src/main/kotlin/app/api/ServerApi.kt | 5 ++- src/main/kotlin/app/utils/RequestException.kt | 4 +-- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index e4d8b82e..84d929b2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,15 @@ // Copyright 2017 Sourcerer Inc. All Rights Reserved. buildscript { - ext.kotlin_version = '1.1.4-2' + ext.kotlin_version = '1.1.51' repositories { mavenCentral() jcenter() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.1" - classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC2" + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.3" + classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.1" } } @@ -84,32 +84,32 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.beust:jcommander:1.72" - compile 'com.google.protobuf:protobuf-java:3.0.0' - compile group: 'commons-codec', name: 'commons-codec', version: '1.5' + compile 'com.google.protobuf:protobuf-java:3.4.0' + compile 'commons-codec:commons-codec:1.5' compile 'com.fasterxml.jackson.core:jackson-databind:2.8.9' compile 'com.fasterxml.jackson.module:jackson-module-kotlin:2.8.9' compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.9' - compile "io.reactivex.rxjava2:rxjava:2.1.1" - compile 'com.github.kittinunf.fuel:fuel:1.9.0' - compile 'com.github.kittinunf.fuel:fuel-rxjava:1.9.0' - compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', - version: '4.8.0.201706111038-r' - compile "org.slf4j:slf4j-nop:1.7.2" + compile 'io.reactivex.rxjava2:rxjava:2.1.6' + compile 'com.github.kittinunf.fuel:fuel:1.11.0' + compile 'com.github.kittinunf.fuel:fuel-rxjava:1.11.0' + compile 'org.eclipse.jgit:org.eclipse.jgit:4.9.0.201710071750-r' + compile 'org.slf4j:slf4j-nop:1.7.2' compile 'org.jpmml:pmml-evaluator:1.3.9' compile 'io.sentry:sentry:1.6.0' - compile group: 'net.razorvine', name: 'pyrolite', version: '4.19' + compile 'net.razorvine:pyrolite:4.19' compile 'org.jpmml:jpmml-converter:1.2.6' + compile name: 'jpmml-sklearn-1.3-SNAPSHOT' testCompile 'org.jetbrains.kotlin:kotlin-test' - testCompile 'org.jetbrains.spek:spek-api:1.1.4' - testCompile 'org.junit.platform:junit-platform-runner:1.0.0-RC2' - testRuntime 'org.jetbrains.spek:spek-junit-platform-engine:1.1.4' + testCompile 'org.jetbrains.spek:spek-api:1.1.5' + testCompile 'org.junit.platform:junit-platform-runner:1.0.1' + testRuntime 'org.jetbrains.spek:spek-junit-platform-engine:1.1.5' } protobuf { protoc { - artifact = "com.google.protobuf:protoc:3.0.0" + artifact = "com.google.protobuf:protoc:3.4.0" } } diff --git a/src/main/kotlin/app/api/ServerApi.kt b/src/main/kotlin/app/api/ServerApi.kt index ca6952a5..7053d3b3 100644 --- a/src/main/kotlin/app/api/ServerApi.kt +++ b/src/main/kotlin/app/api/ServerApi.kt @@ -41,11 +41,10 @@ class ServerApi (private val configurator: Configurator) : Api { } private fun cookieResponseInterceptor() = { _: Request, res: Response -> - val newToken = res.httpResponseHeaders[HEADER_SET_COOKIE] + val newToken = res.headers[HEADER_SET_COOKIE] ?.find { it.startsWith(KEY_TOKEN) } if (newToken != null && newToken.isNotBlank()) { - token = newToken.substringAfter(KEY_TOKEN) - .substringBefore(';') + token = newToken.substringAfter(KEY_TOKEN).substringBefore(';') } res } diff --git a/src/main/kotlin/app/utils/RequestException.kt b/src/main/kotlin/app/utils/RequestException.kt index 7a6f57db..fd56e7ef 100644 --- a/src/main/kotlin/app/utils/RequestException.kt +++ b/src/main/kotlin/app/utils/RequestException.kt @@ -21,8 +21,8 @@ class RequestException(exception: Exception) : Exception(exception.message) { var isParseError = false constructor(fuelError: FuelError) : this(fuelError as Exception) { - httpStatusCode = fuelError.response.httpStatusCode - httpResponseMessage = fuelError.response.httpResponseMessage + httpStatusCode = fuelError.response.statusCode + httpResponseMessage = fuelError.response.responseMessage httpBodyMessage = fuelError.response.data .toString(Charset.defaultCharset()) }