Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Stylesheet and language for Squid Errorpage #83

Merged
merged 1 commit into from
Feb 1, 2018
Merged

Define Stylesheet and language for Squid Errorpage #83

merged 1 commit into from
Feb 1, 2018

Conversation

SourceDoctor
Copy link
Contributor

configure Language and Stylesheet for Squid Errorpages

@@ -11,6 +11,8 @@
Pattern[/\d+ KB/] $maximum_object_size_in_memory = $squid::params::maximum_object_size_in_memory,
String $package_name = $squid::params::package_name,
String $service_name = $squid::params::service_name,
Optional[String] $error_directory = $squid::params::error_directory,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you've made these parameters Optional (which is a good idea), you should almost certainly default them to undef.

@@ -19,6 +19,10 @@ access_log <%= @access_log %>
coredump_dir <%= @coredump_dir %>

<% end -%>

error_directory <%= @error_directory %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and wrap these in suitable ifs

@@ -11,6 +11,8 @@
Pattern[/\d+ KB/] $maximum_object_size_in_memory = $squid::params::maximum_object_size_in_memory,
String $package_name = $squid::params::package_name,
String $service_name = $squid::params::service_name,
Optional[String] $error_directory = $squid::params::error_directory,
Optional[String] $err_page_stylesheet = $squid::params::err_page_stylesheet,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Stdlib::Absolutepath instead of String

@traylenator
Copy link
Contributor

@SourceDoctor can you remove the labels if they are addressed.

@SourceDoctor
Copy link
Contributor Author

@traylenator i'd like to, but i can't find a button or something on to my pull request to do so

@@ -19,6 +19,14 @@ access_log <%= @access_log %>
coredump_dir <%= @coredump_dir %>

<% end -%>

<% unless @error_directory.nil? -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a simple <% if @error_directory -%> should be fine here. The default of undef will be false. THat looks to be how the other lines work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 unless @foo.nil? is only needed if the parameter is a boolean.

@alexjfisher alexjfisher dismissed their stale review January 25, 2018 14:38

Needs rebase, but otherwise looks good.

@SourceDoctor
Copy link
Contributor Author

@alexjfisher i thought i did so ;-)

@traylenator
Copy link
Contributor

It's been squashed but not rebased.

@SourceDoctor
Copy link
Contributor Author

now it should be :-)

@traylenator traylenator added enhancement New feature or request and removed needs-rebase labels Feb 1, 2018
@traylenator traylenator merged commit 3f33a80 into voxpupuli:master Feb 1, 2018
@traylenator traylenator changed the title define Stylesheet and language for Squid Errorpage Define Stylesheet and language for Squid Errorpage Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants