Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V6 #49

Merged
merged 4 commits into from
Sep 20, 2020
Merged

V6 #49

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

<p align="center">
<img src="https://raw.githubusercontent.com/cdimascio/dotenv-kotlin/master/assets/kotlin-dotenv-logo.png" alt="dotenv" />
<img src="https://raw.githubusercontent.com/cdimascio/dotenv-kotlin/master/assets/dotenv-kotlin-logo.png" alt="dotenv" />
</p>

Why dotenv?
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@


<properties>
<dotenv.version>1.1.0</dotenv.version>
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<kotlin.version>1.4.0</kotlin.version>
<main.class>io.cdimascio.DotenvKt</main.class>
<junit.version>4.12</junit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<dotenv.version>1.0.2</dotenv.version>
<maven.source.plugin>3.0.1</maven.source.plugin>
<maven.javadoc.plugin>3.0.0</maven.javadoc.plugin>
<maven.jar.plugin>2.6</maven.jar.plugin>
Expand Down Expand Up @@ -252,7 +251,7 @@
<artifactId>coveralls-maven-plugin</artifactId>
<version>${maven.coveralls.plugin}</version>
<configuration>
<repoToken>i3Bl4av26PMqZNekY8X3Jt7t6YhwFXKFu</repoToken>
<repoToken>DTE7449Zg7tuwgrV6HeE0et1YB6JPPfeY</repoToken>
</configuration>
<dependencies>
<dependency>
Expand Down
9 changes: 3 additions & 6 deletions src/test/java/tests/JavaTests.java
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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<String, String> envVars;
Expand Down Expand Up @@ -62,7 +59,7 @@ public void iteratorOverDotenvWithFilter() {
.ignoreIfMalformed()
.load();

Set<DotenvEntry> entriesInFile = dotenv.entries(EntriesFilter.DECLARED_IN_ENV_FILE);
Set<DotenvEntry> entriesInFile = dotenv.entries(DotenvEntry.Filter.DECLARED_IN_ENV_FILE);
Set<DotenvEntry> entriesAll = dotenv.entries();
assertTrue(entriesInFile.size() < entriesAll.size());

Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/tests/DslTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down