diff --git a/README.md b/README.md index 77fc25a..8a1a4c3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # 🗝️ dotenv-kotlin -![](https://travis-ci.org/cdimascio/java-dotenv.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/cdimascio/java-dotenv/badge.svg?branch=v6)](https://coveralls.io/github/cdimascio/java-dotenv?branch=v6) [![Maven Central](https://img.shields.io/maven-central/v/io.github.cdimascio/java-dotenv.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.cdimascio%22%20AND%20a:%22java-dotenv%22) [ ![Download](https://api.bintray.com/packages/cdimascio/maven/java-dotenv/images/download.svg) ](https://bintray.com/cdimascio/maven/java-dotenv/_latestVersion) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/66b8195f0da544f1ad9ed1352c0ea66f)](https://app.codacy.com/app/cdimascio/java-dotenv?utm_source=github.com&utm_medium=referral&utm_content=cdimascio/java-dotenv&utm_campaign=Badge_Grade_Dashboard) [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors) [![](https://img.shields.io/gitter/room/cdimascio-oss/community?color=%23eb205a)](https://gitter.im/cdimascio-oss/community) ![](https://img.shields.io/badge/license-Apache%202.0-orange.svg) +![](https://travis-ci.org/cdimascio/dotenv-kotlin.svg?branch=master) 1 [![Maven Central](https://img.shields.io/maven-central/v/io.github.cdimascio/dotenv-kotlin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.cdimascio%22%20AND%20a:%22dotenv-kotlin%22) [ ![Download](https://api.bintray.com/packages/cdimascio/maven/dotenv-kotlin/images/download.svg) ](https://bintray.com/cdimascio/maven/dotenv-kotlin/_latestVersion) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/66b8195f0da544f1ad9ed1352c0ea66f)](https://app.codacy.com/app/cdimascio/dotenv-kotlin?utm_source=github.com&utm_medium=referral&utm_content=cdimascio/dotenv-kotlin&utm_campaign=Badge_Grade_Dashboard) [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors) [![](https://img.shields.io/gitter/room/cdimascio-oss/community?color=%23eb205a)](https://gitter.im/cdimascio-oss/community) ![](https://img.shields.io/badge/license-Apache%202.0-orange.svg) A port of the Ruby dotenv project for Java and Kotlin. Load environment variables from a `.env` file.

- dotenv + dotenv

Why dotenv? diff --git a/pom.xml b/pom.xml index ca16c6e..bee8b77 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,7 @@ + 1.1.0 1.8 11 11 @@ -57,8 +58,6 @@ io.cdimascio.DotenvKt 4.12 UTF-8 - - 1.0.2 3.0.1 3.0.0 2.6 @@ -252,7 +251,7 @@ coveralls-maven-plugin ${maven.coveralls.plugin} - i3Bl4av26PMqZNekY8X3Jt7t6YhwFXKFu + DTE7449Zg7tuwgrV6HeE0et1YB6JPPfeY diff --git a/src/test/java/tests/JavaTests.java b/src/test/java/tests/JavaTests.java index 917ea82..9184686 100644 --- a/src/test/java/tests/JavaTests.java +++ b/src/test/java/tests/JavaTests.java @@ -1,9 +1,8 @@ package tests; -import io.github.cdimascio.dotenv.DotenvException; import io.github.cdimascio.dotenv.Dotenv; -import io.github.cdimascio.dotenv.Dotenv.EntriesFilter; import io.github.cdimascio.dotenv.DotenvEntry; +import io.github.cdimascio.dotenv.DotenvException; import org.junit.Before; import org.junit.Test; @@ -12,9 +11,7 @@ import java.util.Map; import java.util.Set; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; public class JavaTests { private Map envVars; @@ -62,7 +59,7 @@ public void iteratorOverDotenvWithFilter() { .ignoreIfMalformed() .load(); - Set entriesInFile = dotenv.entries(EntriesFilter.DECLARED_IN_ENV_FILE); + Set entriesInFile = dotenv.entries(DotenvEntry.Filter.DECLARED_IN_ENV_FILE); Set entriesAll = dotenv.entries(); assertTrue(entriesInFile.size() < entriesAll.size()); diff --git a/src/test/kotlin/tests/DslTests.kt b/src/test/kotlin/tests/DslTests.kt index 25bbfb1..f070b7c 100644 --- a/src/test/kotlin/tests/DslTests.kt +++ b/src/test/kotlin/tests/DslTests.kt @@ -2,7 +2,7 @@ package tests import io.github.cdimascio.dotenv.DotenvException import io.github.cdimascio.dotenv.Dotenv -import io.github.cdimascio.dotenv.Dotenv.EntriesFilter +import io.github.cdimascio.dotenv.DotenvEntry import io.github.cdimascio.dotenv.dotenv import kotlin.test.assertTrue import kotlin.test.assertEquals @@ -100,7 +100,7 @@ class DotEnvDslTest { .ignoreIfMalformed() .load() - val entriesInFile = dotenv.entries(EntriesFilter.DECLARED_IN_ENV_FILE) + val entriesInFile = dotenv.entries(DotenvEntry.Filter.DECLARED_IN_ENV_FILE) val entriesAll = dotenv.entries() assertTrue(entriesInFile.size < entriesAll.size)