Skip to content

Commit 913673f

Browse files
committed
version bump: dependencies upgrade fix #659
1 parent af480a2 commit 913673f

File tree

9 files changed

+42
-54
lines changed

9 files changed

+42
-54
lines changed

handlebars-guava-cache/src/test/java/com/github/jknack/handlebars/io/GuavaCachedTemplateLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void testCacheWithExpiration() throws Exception {
2424

2525
final int TOTAL = 1000;
2626

27-
Stopwatch sw = new Stopwatch().start();
27+
Stopwatch sw = Stopwatch.createStarted();
2828
for (int i = 0; i < TOTAL; i++) {
2929
loader.sourceAt("template");
3030
}

handlebars-humanize/src/main/java/com/github/jknack/handlebars/HumanizeHelper.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.Locale;
2525

2626
import com.github.jknack.handlebars.internal.Locales;
27+
2728
import static java.util.Objects.requireNonNull;
2829

2930
/**
@@ -380,25 +381,6 @@ public Object apply(final Object value, final Options options)
380381
}
381382
},
382383

383-
/**
384-
* <p>
385-
* Strips diacritic marks.
386-
* </p>
387-
*
388-
* <pre>
389-
* {{transliterate string}}
390-
* </pre>
391-
*
392-
* @see Humanize#transliterate(String)
393-
*/
394-
transliterate {
395-
@Override
396-
public Object apply(final Object value, final Options options)
397-
throws IOException {
398-
return Humanize.transliterate((String) value);
399-
}
400-
},
401-
402384
/**
403385
* <p>
404386
* Makes a phrase underscored instead of spaced.

handlebars-humanize/src/test/java/com/github/jknack/handlebars/HumanizeHelperTest.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void binaryPrefix() throws IOException {
2020
assertEquals("2 bytes",
2121
handlebars.compileInline("{{binaryPrefix this}}").apply(2));
2222

23-
assertEquals("1.5 kB",
23+
assertEquals("1.5 KB",
2424
handlebars.compileInline("{{binaryPrefix this}}").apply(1536));
2525

2626
assertEquals("5 MB",
@@ -211,13 +211,6 @@ public void titleize() throws IOException {
211211
.apply("Handlebars.java rocks!"));
212212
}
213213

214-
@Test
215-
public void transliterate() throws IOException {
216-
assertEquals("Hablo espanol",
217-
handlebars.compileInline("{{transliterate this}}")
218-
.apply("Hablo español"));
219-
}
220-
221214
@Test
222215
public void underscore() throws IOException {
223216
assertEquals("Handlebars_Java_rock",

handlebars-markdown/output.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<h1>Header 1</h1>
2+
<ul>
3+
<li>Item 1</li>
4+
<li>Item 2</li>
5+
<li>Item 3</li>
6+
</ul>
7+
<h2>Header 2</h2>

handlebars-markdown/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
<scope>test</scope>
4747
</dependency>
4848

49+
<dependency>
50+
<groupId>org.apache.commons</groupId>
51+
<artifactId>commons-lang3</artifactId>
52+
<optional>true</optional>
53+
</dependency>
54+
4955
</dependencies>
5056

5157
</project>

handlebars-markdown/src/test/java/com/github/jknack/handlebars/MarkdownHelperTest.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import static org.junit.Assert.assertEquals;
2121

2222
import java.io.IOException;
23+
import java.nio.charset.StandardCharsets;
24+
import java.nio.file.Files;
25+
import java.nio.file.Paths;
2326

2427
import org.junit.Test;
2528

@@ -53,13 +56,13 @@ public void markdown() throws IOException {
5356
handlebars.registerHelper("markdown", new MarkdownHelper());
5457
Template template = handlebars.compileInline("{{markdown .}}");
5558

56-
String expected = "<h1>Header 1</h1>\n";
57-
expected += "<ul>\n";
58-
expected += " <li>Item 1</li>\n";
59-
expected += " <li>Item 2</li>\n";
60-
expected += " <li>Item 3</li>\n";
61-
expected += "</ul><h2>Header 2</h2>";
62-
System.out.println(template.apply(text));
59+
String expected = "<h1>Header 1</h1>\n"
60+
+ "<ul>\n"
61+
+ " <li>Item 1</li>\n"
62+
+ " <li>Item 2</li>\n"
63+
+ " <li>Item 3</li>\n"
64+
+ "</ul>\n"
65+
+ "<h2>Header 2</h2>";
6366
assertEquals(expected, template.apply(text));
6467
}
6568

handlebars-proto/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<name>A standalone Handlebars Server</name>
1515

1616
<properties>
17-
<jetty-version>8.1.7.v20120910</jetty-version>
17+
<jetty-version>9.3.24.v20180605</jetty-version>
1818
</properties>
1919

2020
<build>

handlebars/src/main/java/com/github/jknack/handlebars/internal/Partial.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ protected void merge(final Context context, final Writer writer)
219219
throw fnf;
220220
}
221221
}
222-
} else {
223-
partials.removeLast();
224222
}
225223
context.data(Context.CALLEE, this);
226224
Map<String, Object> hash = hash(context);

pom.xml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@
6565
<dependency>
6666
<groupId>org.apache.commons</groupId>
6767
<artifactId>commons-lang3</artifactId>
68-
<version>3.7</version>
68+
<version>3.8.1</version>
6969
</dependency>
7070

7171
<dependency>
7272
<groupId>org.apache.commons</groupId>
7373
<artifactId>commons-text</artifactId>
74-
<version>1.3</version>
74+
<version>1.6</version>
7575
</dependency>
7676

7777
<!-- Guava -->
7878
<dependency>
7979
<groupId>com.google.guava</groupId>
8080
<artifactId>guava</artifactId>
81-
<version>14.0.1</version>
81+
<version>18.0</version>
8282
</dependency>
8383

8484
<dependency>
@@ -98,7 +98,7 @@
9898
<dependency>
9999
<groupId>org.slf4j</groupId>
100100
<artifactId>slf4j-api</artifactId>
101-
<version>1.6.4</version>
101+
<version>1.7.25</version>
102102
</dependency>
103103

104104
<!-- Servlet API -->
@@ -109,13 +109,6 @@
109109
<scope>provided</scope>
110110
</dependency>
111111

112-
<!-- Jackson 1.x -->
113-
<dependency>
114-
<groupId>org.codehaus.jackson</groupId>
115-
<artifactId>jackson-mapper-asl</artifactId>
116-
<version>${jackson-version}</version>
117-
</dependency>
118-
119112
<!-- Jackson 2.x -->
120113
<dependency>
121114
<groupId>com.fasterxml.jackson.core</groupId>
@@ -127,21 +120,27 @@
127120
<dependency>
128121
<groupId>org.pegdown</groupId>
129122
<artifactId>pegdown</artifactId>
130-
<version>1.2.1</version>
123+
<version>1.6.0</version>
131124
</dependency>
132125

133126
<!-- Humanize -->
134127
<dependency>
135128
<groupId>com.github.mfornos</groupId>
136129
<artifactId>humanize-slim</artifactId>
137-
<version>1.1.1</version>
130+
<version>${humanize.version}</version>
131+
</dependency>
132+
133+
<dependency>
134+
<groupId>com.github.mfornos</groupId>
135+
<artifactId>humanize-icu</artifactId>
136+
<version>${humanize.version}</version>
138137
</dependency>
139138

140139
<!-- Test dependencies -->
141140
<dependency>
142141
<groupId>ch.qos.logback</groupId>
143142
<artifactId>logback-classic</artifactId>
144-
<version>1.0.3</version>
143+
<version>1.2.3</version>
145144
<scope>test</scope>
146145
</dependency>
147146

@@ -422,8 +421,8 @@
422421
<properties>
423422
<!-- Encoding UTF-8 -->
424423
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
425-
<jackson2-version>2.1.4</jackson2-version>
426-
<jackson-version>1.9.12</jackson-version>
424+
<jackson2-version>2.9.7</jackson2-version>
425+
<humanize.version>1.2.2</humanize.version>
427426
<jacoco.version>0.8.1</jacoco.version>
428427
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
429428
<timestamp>${maven.build.timestamp}</timestamp>

0 commit comments

Comments
 (0)