Prior to this commit, strings relied on failure_message_for_should
which produced a deprecation warning. Use the suggested alternative
'failure_message' instead to removed the deprecation warning and
ensure the tests are up to date.
Prior to this commit, strings would fail with puppet 4.4.0 and
newer. This was because strings was making use of a method that was
marked API private and thus subject to change. The method was changed
in 4.4.0 release of puppet to take two variables, meaning that strings
much adjust how it calls the method based on the version of puppet
it's running with.
Prior to this commit, the beaker gem and all its dependencies were
being installed just to run spec tests. Excluding beaker when running
spec tests should make things go faster because we won't have to
install so many gems.
Prior to this commit, the gemspec for strings relied on the module
metadata.json. Since we would ultimately like to stop releasing
strings as a module entirely, update the gemspec not to rely on the
module metadata so it is not broken when we ultimately remove it.
Since 0.4.0 will be the last version of strings released as a puppet
module, update the README to reflect the fact that this method of
distribution is deprecated and add a description of how to install
the Ruby gem version of strings.
I'm super enthusiastic about the potential for folks to build things on
top of the JSON output, we've had several related conversations at
Config Management Camp and on puppet-dev recently. I think this is a
sane default, and calling the file strings.json seems a nice
reinforcement.
Without a .yardopts options array.pop is nil, and everything explodes
with an exception. Applying this patch allowed for running rake
strings:generate cleanly.
Note that this did not affect strings:serve.
Prior to this commit, strings would raise an error when the server
command was run against a module directory that contained the strings
module. This was due to the fact that we were trying to reference
the YARD namespace but our own namespace was being prepending to the
front, making Ruby think the two class were the same.
In order to stop this from happening, prepend a :: to the front of the
YARD version of the class to tell Ruby that we mean the YARD namespace.
This commit changes the metadata.json to use the
SPDX licence short identifier in the metadata.json.
SPDX is an effort from the Linux foundation to easily
parse and identify open-source licenses. Some tools
in the Puppet Ecosystem relies on those short
identifiers, like the metadata-json-lint project.
- https://spdx.org/licenses
- https://github.com/puppet-community/metadata-json-lint
We used to extract the string from the source code. We should have extracted
the content of the string. This is the difference between `"String"` and
`String`.
Puppet defined types would print the string representation of the ruby object,
and not representation you would see in puppet. This is the difference between
`Puppet::Pops::Types::PStringType` and `String`.
If a provider and a type with the same name conflict strings will overwrite the
documentation of one of them with the other. That is if both a provider and a
type are named apt_key, strings will write the type to doc/apt_key.html and the
provider to doc/apt_key.html. The fix is to write the provider to
doc/apt_key_provider.html and the type to doc/apt_key_type.html.
Parameter directives with no types will have `tag.type` set to nil. We cannot
append nil to an array, so instead, place it in the array and flatten the
array. If the property is empty the second entry in the array will be nil, as
we expect. If the `tag.type` is an array of types we will have and array with
the form:
[tag.text, type1, type2, type3, ...]