diff --git a/README.md b/README.md index f8f297738..00a506370 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ C:\\ \\\\host\\windows ``` -Unacceptable input example: +Valid values: A windows filepath. #### `Stdlib::Filesource` @@ -421,33 +421,13 @@ http://example.com https://example.com file:///hello/bla - -/usr2/username/bin - -C:\foo\bar - -/var/opt/../lib/puppet - -puppet:///modules/foo/bar.log ``` -Unacceptable input example: - -```shell -*/Users//nope - -\Users/hc/wksp/stdlib - -C:noslashes - -puppet:///foo/bar.log - -ftp://ftp.example.com -``` +Valid values: A filepath. #### `Stdlib::Fqdn` -Matches paths on fully quallified domain name. +Matches paths on fully qualified domain name. Acceptable input example: @@ -458,14 +438,7 @@ example.com www.example.com ``` - -Unacceptable input example: - -```shell -'www www.example.com' - -2001:DB8::1 -``` +Valid values: Domain name of a server. #### `Stdlib::Host` @@ -476,26 +449,12 @@ Acceptable input example: ```shell localhost -example.com - www.example.com -2001:0db8::1 - 192.0.2.1 ``` -Unacceptable input example: - -```shell -'www www.example.com' - -2001:0d8 - -%.example.com - -bob@example.com -``` +Valid values: An IP address or domain name. #### `Stdlib::Port` @@ -508,22 +467,10 @@ Acceptable input examples: 443 -1337 - 65000 ``` -Unacceptable input example: - -```shell --1 - -65536 - -'443' - -'https' -``` +Valid values: An Integer. #### `Stdlib::Port::Privileged` @@ -539,17 +486,7 @@ Acceptable input examples: 1023 ``` -Unacceptable input example: - -```shell --1 - -1337 - -'443' - -'https' -``` +Valid values: A number less than 1024. #### `Stdlib::Port::Unprivileged` @@ -566,21 +503,7 @@ Acceptable input examples: ``` -Unacceptable input example: - -```shell --1 - -80 - -443 - -1023 - -'443' - -'https' -``` +Valid values: A number more than or equal to 1024. #### `Stdlib::Base32` @@ -594,21 +517,9 @@ ASDASDDASD3453453 asdasddasd3453453= ASDASDDASD3453453== - -asdasddasd3453453=== ``` -Unacceptable input example: - -```shell -asdasd!@#$ - -=asdasd9879876876+/ - -asdads asdasd - -asdasddasd3453453======= -``` +Valid values: A base32 string. #### `Stdlib::Base64` @@ -624,17 +535,7 @@ asdasdASDSADA34238683274/6+ asdasdASDSADA3423868327/46+== ``` -Unacceptable input example: - -```shell -asdasd!@#$ - -=asdasd9879876876+/ - -asda=sd9879876876+/ - -asdads asdasd -``` +Valid values: A base64 string. #### `Stdlib::Ipv4` @@ -650,19 +551,7 @@ Acceptable input example: 127.0.0.1 ``` -Unacceptable input example: - -```shell -0000 - -0.0.0.0. - -0.0.0.256 - -2001:0db8::1 - -1.2.3.4.5 -``` +Valid values: An IPv4 address. #### `Stdlib::Ipv6` @@ -673,30 +562,12 @@ Acceptable input example: ```shell 2001:0db8:85a3:0000:0000:8a2e:0370:7334 -fe80:0000:0000:0000:0204:61ff:fe9d:f156 - 2001:db8:: -::1 - 2001:db8::80 ``` -Unacceptable input example: - -```shell -0.0.0.0 - -192.0.2.1 - -127.0.0.1 - -2000:7334 - -::ffff:2.3.4 - -foobar2001:db8::1 -``` +Valid values: An IPv6 address. #### `Stdlib::Ip_address` @@ -707,85 +578,47 @@ Acceptable input example: ```shell 0.0.0.0 -192.0.2.1 - 127.0.0.1 -2001:0db8:85a3:0000:0000:8a2e:0370:7334 - fe80:0000:0000:0000:0204:61ff:fe9d:f156 - -2001:db8:: - -::1 - -2001:db8::80 ``` -Unacceptable input example: - -```shell -0000 - -0.0.0.0. - -0.0.0.256 - -1.2.3.4.5 - -2000:7334 - -::ffff:2.3.4 - -foobar2001:db8::1 -``` +Valid values: An IP address. #### `Stdlib::IP::Address` -Matches any IP address, including both IPv4 and IPv6 addresses. It will -match them either with or without an address prefix as used in CIDR -format IPv4 addresses. +Matches any IP address, including both IPv4 and IPv6 addresses. It will match them either with or without an address prefix as used in CIDR format IPv4 addresses. Examples: ``` '127.0.0.1' =~ Stdlib::IP::Address # true -'8.8.4.4' =~ Stdlib::IP::Address # true '10.1.240.4/24' =~ Stdlib::IP::Address # true '52.10.10.141' =~ Stdlib::IP::Address # true '192.168.1' =~ Stdlib::IP::Address # false 'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210' =~ Stdlib::IP::Address # true 'FF01:0:0:0:0:0:0:101' =~ Stdlib::IP::Address # true -'FF01::101' =~ Stdlib::IP::Address # true -'FF01:0:0:0:0:0:0:101/32' =~ Stdlib::IP::Address # true -'FF01::101/60' =~ Stdlib::IP::Address # true -'::' =~ Stdlib::IP::Address # true -'12AB::CD30:192.168.0.1' =~ Stdlib::IP::Address # true ``` #### `Stdlib::IP::Address::V4` -Match any string consisting of an IPv4 address in the quad-dotted -decimal format, with or without a CIDR prefix. It will not match any -abbreviated form (e.g., 192.168.1) because these are poorly documented -and inconsistently supported. +Match any string consisting of an IPv4 address in the quad-dotted decimal format, with or without a CIDR prefix. It will not match any abbreviated form (for example, 192.168.1) because these are poorly documented and inconsistently supported. Examples: ``` '127.0.0.1' =~ Stdlib::IP::Address::V4 # true -'8.8.4.4' =~ Stdlib::IP::Address::V4 # true '10.1.240.4/24' =~ Stdlib::IP::Address::V4 # true -'52.10.10.141' =~ Stdlib::IP::Address::V4 # true '192.168.1' =~ Stdlib::IP::Address::V4 # false 'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210' =~ Stdlib::IP::Address::V4 # false '12AB::CD30:192.168.0.1' =~ Stdlib::IP::Address::V4 # false ``` +Valid values: An IPv4 address. + #### `Stdlib::IP::Address::V6` -Match any string consistenting of an IPv6 address in any of the -documented formats in RFC 2373, with or without an address prefix. +Match any string consistenting of an IPv6 address in any of the documented formats in RFC 2373, with or without an address prefix. Examples: @@ -795,48 +628,40 @@ Examples: 'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210' =~ Stdlib::IP::Address::V6 # true 'FF01:0:0:0:0:0:0:101' =~ Stdlib::IP::Address::V6 # true 'FF01::101' =~ Stdlib::IP::Address::V6 # true -'FF01:0:0:0:0:0:0:101/32' =~ Stdlib::IP::Address::V6 # true -'FF01::101/60' =~ Stdlib::IP::Address::V6 # true -'::' =~ Stdlib::IP::Address::V6 # true -'12AB::CD30:192.168.0.1' =~ Stdlib::IP::Address::V6 # true ``` +Valid values: An IPv6 address. + #### `Stdlib::IP::Address::Nosubnet` -Match the same things as the `Stdlib::IP::Address` alias, except it will not -match an address that includes an address prefix (e.g., it will match -`192.168.0.6` but not `192.168.0.6/24`). +Match the same things as the `Stdlib::IP::Address` alias, except it will not match an address that includes an address prefix (for example, it will match '192.168.0.6' but not '192.168.0.6/24'). + +Valid values: An IP address with no subnet. #### `Stdlib::IP::Address::V4::CIDR` -Match an IPv4 address in the CIDR format. It will only match if the -address contains an address prefix (e.g., it will match `192.168.0.6/24` -but not `192.168.0.6`). +Match an IPv4 address in the CIDR format. It will only match if the address contains an address prefix (for example, it will match '192.168.0.6/24' +but not '192.168.0.6'). + +Valid values: An IPv4 address with a CIDR provided eg: '192.186.8.101/105'. This will match anything inclusive of '192.186.8.101' to '192.168.8.105'. #### `Stdlib::IP::Address::V4::Nosubnet` -Match an IPv4 address only if the address does not contain an address -prefix (e.g., it will match `192.168.0.6` but not `192.168.0.6/24`). +Match an IPv4 address only if the address does not contain an address prefix (for example, it will match '192.168.0.6' but not '192.168.0.6/24'). + +Valid values: An IPv4 address with no subnet. #### `Stdlib::IP::Address::V6::Full` -Match an IPv6 address formatted in the "preferred form" as documented in -section 2.2.1 of RFC 2373, with or without an address prefix as -documented in section 2.3 of RFC 2373. +Match an IPv6 address formatted in the "preferred form" as documented in section 2.2.1 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt), with or without an address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). #### `Stdlib::IP::Address::V6::Alternate` -Match an IPv6 address formatted in the "alternative form" allowing for -representing the last two 16-bit pieces of the address with a -quad-dotted decimal, as documented in section 2.2.1 of RFC 2373. It will -match addresses with or without an address prefix as documented in -section 2.3 of RFC 2373. +Match an IPv6 address formatted in the "alternative form" allowing for representing the last two 16-bit pieces of the address with a quad-dotted decimal, as documented in section 2.2.1 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will match addresses with or without an address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). #### `Stdlib::IP::Address::V6::Compressed` -Match an IPv6 address which may contain `::` used to compress zeros as -documented in section 2.2.2 of RFC 2373. It will match addresses with -or without an address prefix as documented in section 2.3 of RFC 2373. +Match an IPv6 address which may contain `::` used to compress zeros as documented in section 2.2.2 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will match addresses with or without an address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). #### `Stdlib::IP::Address::V6::Nosubnet` @@ -846,23 +671,16 @@ Alias to allow `Stdlib::IP::Address::V6::Nosubnet::Full`, #### `Stdlib::IP::Address::V6::Nosubnet::Full` -Match an IPv6 address formatted in the "preferred form" as documented in -section 2.2.1 of RFC 2373. It will not match addresses with address -prefix as documented in section 2.3 of RFC 2373. +Match an IPv6 address formatted in the "preferred form" as documented in section 2.2.1 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will not match addresses with address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). #### `Stdlib::IP::Address::V6::Nosubnet::Alternate` -Match an IPv6 address formatted in the "alternative form" allowing for -representing the last two 16-bit pieces of the address with a -quad-dotted decimal, as documented in section 2.2.1 of RFC 2373. It will -only match addresses without an address prefix as documented in section -2.3 of RFC 2373. +Match an IPv6 address formatted in the "alternative form" allowing for representing the last two 16-bit pieces of the address with a quad-dotted decimal, as documented in section 2.2.1 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will only match addresses without an address prefix as documented in section +2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). #### `Stdlib::IP::Address::V6::Nosubnet::Compressed` -Match an IPv6 address which may contain `::` used to compress zeros as -documented in section 2.2.2 of RFC 2373. It will only match addresses -without an address prefix as documented in section 2.3 of RFC 2373. +Match an IPv6 address which may contain `::` used to compress zeros as documented in section 2.2.2 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will only match addresses without an address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). ### Facts @@ -2244,7 +2062,7 @@ Arguments: A string specifying the time in `strftime` format. See the Ruby [strf * `%X`: Preferred representation for the time alone, no date * `%y`: Year without a century (00..99) * `%Y`: Year with century -* `%z`: Time zone as hour offset from UTC (e.g. +0900) +* `%z`: Time zone as hour offset from UTC (for example +0900) * `%Z`: Time zone name * `%%`: Literal '%' character