Skip to content

Commit

Permalink
Merge pull request #2104 from rj667/main
Browse files Browse the repository at this point in the history
(fix) Convert unnecessary multi line warnings to single lines
  • Loading branch information
sanfrancrisko authored Dec 7, 2020
2 parents ef00ded + d24a0fe commit cc58595
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions templates/mod/_require.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<% if @requires != nil -%>
<%- _requires = @requires -%>
<% elsif @allow_from != nil and ! @allow_from.empty? -%>
<%- scope.function_warning(["Class #{@title}: Using Allow"]) -%>
<%- scope.function_warning(["is deprecated in Apache #{@_apache_version}"]) -%>
<%- scope.function_warning(["Class #{@title}: Using Allow is deprecated in Apache #{@_apache_version}"]) -%>
<%- _requires = 'ip ' + Array(@allow_from).join(" ") -%>
<% else -%>
<%- _requires = @requires_defaults -%>
Expand All @@ -24,8 +23,7 @@
<%- indentation = ' ' -%>
<%- else -%>
<%- if _requires.has_key?('enforce') -%>
<%- scope.function_warning(["Class #{@title}: Require can only"]) -%>
<%- scope.function_warning(["be overwritten with all, none or any."]) -%>
<%- scope.function_warning(["Class #{@title}: Require can only be overwritten with all, none or any."]) -%>
<%- end -%>
<%- enforce_open = '' -%>
<%- enforce_close = '' -%>
Expand All @@ -38,7 +36,6 @@
<%- end -%>
<%# %><%= enforce_close -%>
<%- else -%>
<%- scope.function_warning(["Class #{@title}: Require hash must have"]) -%>
<%- scope.function_warning(["a key named \"requires\" with array value"]) -%>
<%- scope.function_warning(["Class #{@title}: Require hash must have a key named \"requires\" with array value"]) -%>
<%- end -%>
<% end -%>

0 comments on commit cc58595

Please sign in to comment.