Skip to content

Correct casing of Stdlib::IP::Address #1406

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

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Nov 7, 2023

While Puppet doesn't appear to care about IP vs Ip, but Kafo does and can't find the correct type. This aligns the usage with the actual name in the file.

Fixes: fcbd426 ("Remove deprecated Stdlib::Compat::* data types")

While Puppet doesn't appear to care about IP vs Ip, but Kafo does and
can't find the correct type. This aligns the usage with the actual name
in the file.

Fixes: fcbd426 ("Remove deprecated Stdlib::Compat::* data types")
@@ -1,2 +1,2 @@
# @summary Validate a host (FQDN or IP address)
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::Ip::Address]
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This now matches the casing here:

type Stdlib::IP::Address = Variant[

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting 🤔. For some reason I stick to \A[[:upper:]][[:lower:]]*\z but it seems having more capital letters is valid… I guess what annoyed me is that I wanted to camel_case the type name for the file name as we do with Ruby but this is not supported…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that IP is a bit unusual, but this has been here for a while and sometimes being consistent is more important than other preferences.

@ekohl
Copy link
Collaborator Author

ekohl commented Nov 7, 2023

I think the test failures are unrelated

Copy link
Collaborator

@smortex smortex left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -1,2 +1,2 @@
# @summary Validate a host (FQDN or IP address)
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::Ip::Address]
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting 🤔. For some reason I stick to \A[[:upper:]][[:lower:]]*\z but it seems having more capital letters is valid… I guess what annoyed me is that I wanted to camel_case the type name for the file name as we do with Ruby but this is not supported…

@bastelfreak
Copy link
Collaborator

restarted failed jobs.

@bastelfreak bastelfreak merged commit 44c298c into puppetlabs:main Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants