Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit allows the module tool to run on windows and updates the spec
tests as they are no longer pending.
|
|
This updates a handful of tests to use `expect {} .to` since the should
variant is being deprecated in RSpec 3 - and has started throwing
deprecation warnings.
There should be absolutely no functional change as a result of this.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
This manually fixes up a pile of Puppet Module Tool conflicts by hand, related
to overlapping changes with nothing but textual translation. The rest of the
merge was smooth and simple.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
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.
|
|
A whole bunch of tests scattered through the system fail on Windows, around
features that are not supported on that platform. (They are things that only
the master does, which an agent-only platform doesn't need to support.)
These were tagged `fails_on_windows` to allow filtering them from rspec runs,
which is great, but doesn't actually communicate nearly as much useful
information as it would if we used the "conditionally pending" facilities that
rspec has supported since 2.3.
That gives us two key things: one, it works automatically based on our
knowledge of the platform, which means you can't forget to turn off failing
tests.
Two, it means that if the test starts unexpectedly passing we also get a
failure, since we should respond to "works when it shouldn't" as seriously as
"fails when it shouldn't".
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
This rather large commit includes all the work needed to get the `puppet
module` face in Puppet with all it's actions. I tried to break this up
into smaller commits, but it was difficult to do so and keep the
individual commits in a state that had passing specs since many changes
in shared module_tool code affected multiple actions. This code was
developed in an integration branch over a few montsh and is now being
merged back into Puppet core in the same state that shipped with Puppet
Enterprise 2.5.
The work here was done by Pieter van de Bruggen <pieter@puppetlabs.com>,
Kelsey Hightower <kelsey@puppetlabs.com> and myself.
|
|
Having range intersection allows easier checking of version constraints,
and new comparson operators allow for ranged version constraints like
you would expect from a typical packaging system (ex 1.2.x).
There is also a slight change to the way prerelease version numbers are
validated so that a dash is required between the patch version and
prerelease string. This was done to comply with the declared semver
spec:
A pre-release version number MAY be denoted by appending an arbitrary
string immediately following the patch version and a dash
This could affect forge module versions, or face versions, but neither
of these were found to be using prerelease versioning anyway.
Pieter van de Bruggen was the original author of these changes, but I'm
submitting them as part a larger rebase for module tool change. I've
also reviewed the changes.
|
|
Before this patch, the module face uses it's own Regex for testing
if version strings meet Semantic Versioning Specification (SemVer)
requirements. The code base also has an mis-named semver_spec.rb test,
while it does test semver, it is more specific to the application base
class for the module application.
This patch fixes these issues by renaming the
`spec/unit/module_tool/semver_spec.rb` file to
`spec/unit/module_tool/application_spec.rb` and using the semver module
in code Puppet.
This patch also adds a custom setter method for the version
attribute in the `Puppet::Module::Tool::Metadata` class, which validates
version strings meet semver requirements before setting the version
attribute.
|