Skip to content

Commit 6bce684

Browse files
author
Ilya Brin
committed
Merge remote-tracking branch 'upstream/master'
2 parents ded97c1 + 91d8df2 commit 6bce684

47 files changed

Lines changed: 494 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,6 @@ Hello {{#child}}{{this.value}}{{/child}}
10381038
## Dependencies
10391039

10401040
```text
1041-
+- org.apache.commons:commons-lang3:jar:3.1
1042-
+- org.antlr:antlr4-runtime:jar:4.5.1-1
1043-
+- org.mozilla:rhino:jar:1.7R4
10441041
+- org.slf4j:slf4j-api:jar:1.6.4
10451042
```
10461043

handlebars-guava-cache/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.github.jknack</groupId>
77
<artifactId>handlebars.java</artifactId>
8-
<version>4.1.0-SNAPSHOT</version>
8+
<version>4.1.3-SNAPSHOT</version>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>

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-helpers/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.github.jknack</groupId>
66
<artifactId>handlebars.java</artifactId>
7-
<version>4.1.0-SNAPSHOT</version>
7+
<version>4.1.3-SNAPSHOT</version>
88
</parent>
99

1010
<modelVersion>4.0.0</modelVersion>

handlebars-helpers/src/main/java/com/github/jknack/handlebars/helper/JodaHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* Handlebars Helper for JodaTime ReadableInstance objects.
3131
*
32-
* @author @mrhanlon https://github.com/mrhanlon
32+
* @author mrhanlon
3333
*/
3434
public enum JodaHelper implements Helper<ReadableInstant> {
3535

handlebars-helpers/src/main/java/com/github/jknack/handlebars/helper/NumberHelper.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ public enum NumberHelper implements Helper<Object> {
3636
* You can use the isEven helper to return a value only if the first argument
3737
* is even. Otherwise return null.
3838
*
39+
* <pre>{@code
3940
* <li class="{{isEven value "leftBox"}}">
40-
*
41+
* }</pre>
4142
* If value is 2, the output will be "leftBox".
4243
*
4344
*/
@@ -52,8 +53,9 @@ public CharSequence safeApply(final Number value, final Options options) {
5253
* You can use the isOdd helper to return a value only if the first argument
5354
* is odd. Otherwise return null.
5455
*
56+
* <pre>{@code
5557
* <li class="{{isOdd value "rightBox"}}">
56-
*
58+
* }</pre>
5759
* If value is 3, the output will be "rightBox".
5860
*
5961
*/
@@ -68,8 +70,9 @@ public CharSequence safeApply(final Number value, final Options options) {
6870
* You can use the stripes helper to return different value if the passed
6971
* argument is odd or even.
7072
*
73+
* <pre>{@code
7174
* <tr class="{{stripes value "row-even" "row-odd"}}">
72-
*
75+
* }</pre>
7376
* If value is 2, the output will be "row-even".
7477
*
7578
*/

handlebars-humanize/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.github.jknack</groupId>
66
<artifactId>handlebars.java</artifactId>
7-
<version>4.1.0-SNAPSHOT</version>
7+
<version>4.1.3-SNAPSHOT</version>
88
</parent>
99

1010
<modelVersion>4.0.0</modelVersion>

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

Lines changed: 5 additions & 21 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
/**
@@ -235,7 +236,7 @@ public Object apply(final Object value, final Options options)
235236
* <p>
236237
* Constructs a message with pluralization logic from the given template.
237238
* </p>
238-
* <h5>Examples:</h5>
239+
* Examples:
239240
*
240241
* <pre>
241242
* MessageFormat msg =
@@ -274,7 +275,7 @@ public Object apply(final Object value, final Options options)
274275
* {{pluralize "pattern" arg0, arg1, ..., argn [locale="default"]}}
275276
* </pre>
276277
*
277-
* @see Humanize#pluralize(String, Locale)
278+
* @see Humanize#pluralizeFormat(String, Locale)
278279
*/
279280
pluralize {
280281
@Override
@@ -289,6 +290,7 @@ public Object apply(final Object value, final Options options)
289290
* <p>
290291
* Transforms a text into a representation suitable to be used in an URL.
291292
* </p>
293+
* <pre>{@code
292294
* <table border="0" cellspacing="0" cellpadding="3" width="100%">
293295
* <tr>
294296
* <th class="colFirst">Input</th>
@@ -303,6 +305,7 @@ public Object apply(final Object value, final Options options)
303305
* <td>"lo-siento-no-hablo-espanol"</td>
304306
* </tr>
305307
* </table>
308+
* }</pre>
306309
*
307310
* <pre>
308311
* {{slugify string}}
@@ -378,25 +381,6 @@ public Object apply(final Object value, final Options options)
378381
}
379382
},
380383

381-
/**
382-
* <p>
383-
* Strips diacritic marks.
384-
* </p>
385-
*
386-
* <pre>
387-
* {{transliterate string}}
388-
* </pre>
389-
*
390-
* @see Humanize#transliterate(String)
391-
*/
392-
transliterate {
393-
@Override
394-
public Object apply(final Object value, final Options options)
395-
throws IOException {
396-
return Humanize.transliterate((String) value);
397-
}
398-
},
399-
400384
/**
401385
* <p>
402386
* 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-jackson2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.github.jknack</groupId>
66
<artifactId>handlebars.java</artifactId>
7-
<version>4.1.0-SNAPSHOT</version>
7+
<version>4.1.3-SNAPSHOT</version>
88
</parent>
99

1010
<modelVersion>4.0.0</modelVersion>

0 commit comments

Comments
 (0)