summaryrefslogtreecommitdiff
path: root/spec/unit/module_tool/application_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2013-04-15(#11276) Enable module tool on WindowsJosh Cooper1-3/+1
This commit allows the module tool to run on windows and updates the spec tests as they are no longer pending.
2012-09-07RSpec 3 is deprecating `expect {}.should` - respect that.Daniel Pittman1-1/+1
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>
2012-04-24Merge 2.7.x into master.Daniel Pittman1-1/+1
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>
2012-04-23(#13682) Rename Puppet::Module::Tool to Puppet::ModuleToolJeff McCune1-1/+1
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.
2012-04-18Use conditional pending to block out "fails_on_windows" tests.Daniel Pittman1-6/+6
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>
2012-03-30Add Module ToolMatt Robinson1-5/+3
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.
2012-02-15(#12424) Update SemVer to use ranges and new comparison operatorsMatt Robinson1-3/+3
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.
2011-12-06(#7656) Use core Puppet semver.rb libKelsey Hightower1-0/+29
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.