Skip to content

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

Merged
bastelfreak merged 1 commit intopuppetlabs:mainfrom
ekohl:correct-casing
Nov 8, 2023
Merged

Correct casing of Stdlib::IP::Address#1406
bastelfreak merged 1 commit intopuppetlabs:mainfrom
ekohl:correct-casing

Conversation

@ekohl
Copy link
Copy Markdown
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")
Comment thread types/host.pp
@@ -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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

ekohl commented Nov 7, 2023

I think the test failures are unrelated

Copy link
Copy Markdown
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!

Comment thread types/host.pp
@@ -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
Copy Markdown
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
Copy Markdown
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