Age | Commit message (Collapse) | Author | Files | Lines |
|
Prior to this commit there wasn't much verification for module dependencies.
This commit adds verification the module dependencies have sane names and version
ranges. If verification fails, it will raise an argument exception.
|
|
Given an object with an attr_accessor and using an example shortcut like so:
subject { metadata.to_hash }
its(:keys) do
subject.sort.should == %w[ name version author summary license source issues_url project_page dependencies ].sort
end
The value of subject in the example varies between RSpec 2.11 and 2.13.
This commit removes the shortcut in favor of a slightly longer but more
compatible test that explicitly invokes the #keys method and does an
expectation on that.
|
|
Prior to Puppet 3.6.0, users had a ‘description’ property which they
could reliably expand into their module skeleton’s ERB templates. This
property was removed from the default set of properties in Puppet 3.6.0,
which effectively broke template expansion for users relying on it.
This change ensures that users can continue to rely on this property.
|
|
pvande/task/master/pup2284_puppet_module_generate_interview
Add an interview to the PMT `generate` action.
|
|
Prior to this commit, validation would raise non-sensical validation
errors if you attempted to validate a module name that contained a
separator (either '-' or '/'), but less than one character on either
side. This change adds validation for those cases.
|
|
Previously the code that validated module names took a pessimistic
approach, validating conformance only to assert unrelated non-conformance.
As it turns out, this is messy to read and understand, so this change
rewrites the logic in a more straightforward manner.
|
|
Prior to this commit, when you generated a new module, it created a simple
metadata.json file with the same standard defaults for every module. Since
JSON may not be the most familiar language for all of our users, we now do
some work up front to pre-fill that JSON file with useful data based on user
input.
|
|
Prior to this commit, the Modulefile was used as the primary source of user-facing metadata for modules. This file was executable Ruby, which was intended to describe a simple data structure. This causes a few problems for us in the long-term, including making automated module builds a significantly more difficult proposition, and making changes to acceptable metadata a slow process (requiring new releases of Puppet). In addition, the only piece of Puppet code that interacted directly with the Module file was the `module build` action – anywhere we actually need to know something about the module, we look it up from the metadata.json file.
This commit removes this level of indirection between user input and module data, making the metadata.json file a first-class citizen in Puppet modules. It similarly deprecates the Modulefile as a supported source of module data. Checksums have also been moved into their own file (per PE-3124), and `puppet module changes` has been updated to leverage the new file when available (per PE-3120).
For users building a module containing only a Modulefile, this will issue a warning that the Modulefile is deprecated, and output the corresponding metadata.json file.
For users building a module containing both a Modulefile and a metadata.json file, this will issue a warning that the Modulefile is deprecated and is being ignored.
|
|
pmt currently will only include specific fields from the ModuleFile when
building a module. This means that as we add features to forge that rely on new
fields those won't be available to users with older versions of PMT. By allowing
metadata.json to be written to directly we ensure that module authors can take
advantage of all forge features without updating puppet. All existing workflows
continue to work for those who do not want to leverage these features.
|
|
Without this patch, Puppet will monkey patch the existing implementation
of the puppet-module Gem if it is used. This is bad because the two
implementations are all jumbled up inside of one another and behavior
may become unpredictable. Warnings are also displayed directly to the
end user in the form of redefined constants.
This patch fixes the problem by renaming Puppet::Module::Tool inside of
Puppet to Puppet::ModuleTool This fixes the problem because Puppet will
no longer monkey-patch the Puppet::Module::Tool module inside of the
puppet-module Gem.
This patch also has the added benefit of making the Module's name match
up with the CamelCase filepath (puppet/module_tool/ =>
Puppet::ModuleTool) As a result, no file moves are necessary.
|
|
Before this patch, the module generate action generates Modulefiles
with the license set to UNKNOWN, which is not a valid license.
This patch fixes this issue by setting the default value of the
`Puppet::Module::Tool::Metadata#license` attribute to 'Apache License,
Version 2.0' by default. This patch also adds a new unit test verifying
this this change.
|