Skip to content

Commit cc58595

Browse files
Merge pull request #2104 from rj667/main
(fix) Convert unnecessary multi line warnings to single lines
2 parents ef00ded + d24a0fe commit cc58595

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

templates/mod/_require.erb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<% if @requires != nil -%>
22
<%- _requires = @requires -%>
33
<% elsif @allow_from != nil and ! @allow_from.empty? -%>
4-
<%- scope.function_warning(["Class #{@title}: Using Allow"]) -%>
5-
<%- scope.function_warning(["is deprecated in Apache #{@_apache_version}"]) -%>
4+
<%- scope.function_warning(["Class #{@title}: Using Allow is deprecated in Apache #{@_apache_version}"]) -%>
65
<%- _requires = 'ip ' + Array(@allow_from).join(" ") -%>
76
<% else -%>
87
<%- _requires = @requires_defaults -%>
@@ -24,8 +23,7 @@
2423
<%- indentation = ' ' -%>
2524
<%- else -%>
2625
<%- if _requires.has_key?('enforce') -%>
27-
<%- scope.function_warning(["Class #{@title}: Require can only"]) -%>
28-
<%- scope.function_warning(["be overwritten with all, none or any."]) -%>
26+
<%- scope.function_warning(["Class #{@title}: Require can only be overwritten with all, none or any."]) -%>
2927
<%- end -%>
3028
<%- enforce_open = '' -%>
3129
<%- enforce_close = '' -%>
@@ -38,7 +36,6 @@
3836
<%- end -%>
3937
<%# %><%= enforce_close -%>
4038
<%- else -%>
41-
<%- scope.function_warning(["Class #{@title}: Require hash must have"]) -%>
42-
<%- scope.function_warning(["a key named \"requires\" with array value"]) -%>
39+
<%- scope.function_warning(["Class #{@title}: Require hash must have a key named \"requires\" with array value"]) -%>
4340
<%- end -%>
4441
<% end -%>

0 commit comments

Comments
 (0)