File tree Expand file tree Collapse file tree 5 files changed +8
-25
lines changed
main/java/pl/allegro/tech/boot/autoconfigure/handlebars
test/groovy/pl/allegro/tech/boot/autoconfigure/handlebars
test-dependencies/src/test/groovy/pl/allegro/tech/boot/autoconfigure/handlebars Expand file tree Collapse file tree 5 files changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,10 @@ Add any handlebars helper to dependencies and you can start using it.
34
34
dependencies {
35
35
compile 'com.github.jknack:handlebars-helpers:4.2.0',
36
36
'com.github.jknack:handlebars-jackson2:4.2.0',
37
- 'com.github.jknack:handlebars-humanize:4.2.0',
38
- 'com.github.jknack:handlebars-markdown:4.2.0'
37
+ 'com.github.jknack:handlebars-humanize:4.2.0'
39
38
}
40
39
```
41
- NOTE: Jackson2Helper and MarkdownHelper will register with name ` json ` and ` md ` respectively .
40
+ NOTE: Jackson2Helper will register with name ` json ` .
42
41
Every other helper will register with its default name.
43
42
44
43
More information about available helpers can be found on
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ project.version = scmVersion.version
29
29
ext {
30
30
jodaVersion = ' 2.10.10'
31
31
spockVersion = ' 2.0-groovy-3.0'
32
- handlebarsVersion = ' 4.2.0 '
32
+ handlebarsVersion = ' 4.3.1 '
33
33
springBootVersion = ' 2.6.1'
34
34
}
35
35
@@ -39,6 +39,10 @@ allprojects {
39
39
}
40
40
apply plugin : ' groovy'
41
41
sourceCompatibility = 1.8
42
+
43
+ test {
44
+ useJUnitPlatform()
45
+ }
42
46
}
43
47
dependencies {
44
48
compile ' org.springframework.boot:spring-boot-starter-web:' + springBootVersion,
@@ -48,7 +52,6 @@ dependencies {
48
52
compile ' joda-time:joda-time:' + jodaVersion, optional
49
53
compile ' com.github.jknack:handlebars-helpers:' + handlebarsVersion, optional
50
54
compile ' com.github.jknack:handlebars-humanize:' + handlebarsVersion, optional
51
- compile ' com.github.jknack:handlebars-markdown:' + handlebarsVersion, optional
52
55
compile ' com.github.jknack:handlebars-jackson2:' + handlebarsVersion, optional
53
56
compile ' org.springframework.boot:spring-boot-configuration-processor:' + springBootVersion, optional
54
57
@@ -91,10 +94,6 @@ jacocoTestReport {
91
94
}
92
95
}
93
96
94
- test {
95
- useJUnitPlatform()
96
- }
97
-
98
97
java {
99
98
withSourcesJar()
100
99
withJavadocJar()
Original file line number Diff line number Diff line change 2
2
3
3
import com .github .jknack .handlebars .HumanizeHelper ;
4
4
import com .github .jknack .handlebars .Jackson2Helper ;
5
- import com .github .jknack .handlebars .MarkdownHelper ;
6
5
import com .github .jknack .handlebars .helper .AssignHelper ;
7
6
import com .github .jknack .handlebars .helper .IncludeHelper ;
8
7
import com .github .jknack .handlebars .helper .JodaHelper ;
@@ -66,19 +65,6 @@ public void registerHelper() {
66
65
}
67
66
}
68
67
69
- @ Configuration
70
- @ ConditionalOnClass (MarkdownHelper .class )
71
- static class MarkdownHelperAutoConfiguration {
72
-
73
- @ Autowired
74
- private HandlebarsViewResolver handlebarsViewResolver ;
75
-
76
- @ PostConstruct
77
- public void registerHelper () {
78
- handlebarsViewResolver .registerHelper ("md" , MarkdownHelper .INSTANCE );
79
- }
80
- }
81
-
82
68
@ Configuration
83
69
@ ConditionalOnClass (NumberHelper .class )
84
70
static class NumberHelpersAutoConfiguration {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class HandlebarsPropertiesSpec extends Specification {
18
18
properties. applyToMvcViewResolver(viewResolver)
19
19
20
20
then :
21
- viewResolver. valueResolvers. length == 2
21
+ viewResolver. valueResolvers. size() == 2
22
22
viewResolver. valueResolvers. contains(JavaBeanValueResolver . INSTANCE )
23
23
viewResolver. valueResolvers. contains(MapValueResolver . INSTANCE )
24
24
viewResolver. registerMessageHelper
Original file line number Diff line number Diff line change @@ -32,6 +32,5 @@ class HandlebarsHelpersDependenciesSpec extends Specification {
32
32
resolver. helper(' assign' )
33
33
resolver. helper(' include' )
34
34
resolver. helper(' camelize' )
35
- resolver. helper(' md' )
36
35
}
37
36
}
You can’t perform that action at this time.
0 commit comments