From 292e313b44759f70e10296c86b3bd105d2f0ca8f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Nov 2017 22:30:04 -0800 Subject: [PATCH] Version 0.9.3 --- README.md | 30 ++++++++++++++++++------------ kobalt/src/Build.kt | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0974365..9a9a920 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ To install and run from Maven, configure an artifact as follows: net.thauvin.erik pinboard-poster - 0.9.2 + 0.9.3 ``` @@ -51,7 +51,7 @@ To install and run from Gradle, add the following to the build.gradle file: ```gradle dependencies { - compile 'net.thauvin.erik:pinboard-poster:0.9.2' + compile 'net.thauvin.erik:pinboard-poster:0.9.3' } ``` @@ -61,7 +61,7 @@ To install and run from Kobalt, add the following to the Build.kt file: ```gradle dependencies { - compile("net.thauvin.erik:pinboard-poster:0.9.2") + compile("net.thauvin.erik:pinboard-poster:0.9.3") } ``` @@ -130,14 +130,10 @@ PINBOARD_API_TOKEN=user\:TOKEN ``` ```kotlin -val properties = Properties().apply { - Files.newInputStream(Paths.get("local.properties")).use { fis -> load(fis) } -} - -val poster = PinboardPoster(properties) +val poster = PinboardPoster(Paths.get("local.properties")) ``` -To specify your own key: +or by specifying your own key: ```ini # my.properties @@ -145,13 +141,23 @@ my.api.key=user\:TOKEN ``` ```kotlin -val properties = Properties().apply { FileInputStream("my.properties").use { fis -> load(fis) } } -val poster = PinboardPoster(properties, "my.api.key") +val poster = PinboardPoster(Paths.get("my.properties"), "my.api.key") ``` +or even specifying your own property: + +```kotlin +val p = Properties() +p.setProperty("api.key", "user:TOKEN") + +val poster = PinboardPoster(p, "api.key") +``` + +_In all cases, the value of the `PINBOARD_API_TOKEN` environment variable is used by default if the specified property is invalid or not found._ + ### Environment Variable -If no arguments are passed to the constructor, the `PINBOARD_API_TOKEN` environment variable will be used, if any. +If no arguments are passed to the constructor, the value of the `PINBOARD_API_TOKEN` environment variable will be used, if any. ```sh export PINBOARD_API_TOKEN="user:TOKEN" diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 03e6f1d..0439817 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -21,7 +21,7 @@ val p = project { group = "net.thauvin.erik" description = "Pinboard Poster for Kotlin/Java" artifactId = name - version = "0.9.2" + version = "0.9.3" pom = Model().apply { description = project.description