Skip to content

Commit

Permalink
fix xdg path and bump version to 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
strogiyotec committed Aug 11, 2020
1 parent ae9798b commit 479bd56
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

<groupId>jfill</groupId>
<artifactId>jfill</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<version>2.1</version>


<properties>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/jfill/Defaults.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public interface Defaults {

String NO_TAG = "noTag";

String VERSION = "jfillin 2.0";
String VERSION = "jfillin 2.1";

String CACHE_PATH = Optional.ofNullable(System.getenv("XDG_CONFIG_HOME"))
.or(() -> Optional.of(System.getProperty("user.home")))
.map(path -> path + "/.config/jfillin/fillin.json")
.map(path -> path + "/jfillin/fillin.json")
.get();

}
4 changes: 3 additions & 1 deletion src/main/java/jfill/ResolvedValuesStorage.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package jfill;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -57,7 +58,8 @@ String getValueByTag(final String tag, final String key) {
*
* @param cache Cache
*/
void flush(final Cache cache) {
void flush(final Cache cache) throws IOException {
this.storage.forEach(cache::addEntry);
cache.save();
}
}
2 changes: 1 addition & 1 deletion src/test/java/jfill/ExecuteTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void testVersion() throws Exception {
new Cache()
)
).execute();
Assertions.assertTrue(stream.toString().contains("jfillin 2.0"));
Assertions.assertTrue(stream.toString().contains(Defaults.VERSION));
}
}
}
Expand Down

0 comments on commit 479bd56

Please sign in to comment.