summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--README.markdown13
-rw-r--r--spec/unit/puppet/parser/functions/validate_cmd_spec.rb11
3 files changed, 16 insertions, 10 deletions
diff --git a/Gemfile b/Gemfile
index 636f930..1cf399f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -21,7 +21,7 @@ group :development, :test do
gem 'rspec', "~> 2.11.0", :require => false
gem 'mocha', "~> 0.10.5", :require => false
gem 'puppetlabs_spec_helper', :require => false
- gem 'rspec-puppet', :require => false
+ gem 'rspec-puppet', "~> 0.1.6", :require => false
end
facterversion = ENV['GEM_FACTER_VERSION']
diff --git a/README.markdown b/README.markdown
index 5635343..fa02274 100644
--- a/README.markdown
+++ b/README.markdown
@@ -31,8 +31,9 @@ list of integration branches are:
* v2.1.x (v2.1.1 released in PE 1)
* v2.2.x (Never released as part of PE, only to the Forge)
* v2.3.x (Released in PE 2)
- * v3.0.x (Never released as part of PE, only to the Forge)
- * v4.0.x (Drops support for Puppet 2.7)
+ * v3.0.x (Released in PE 3)
+ * v4.0.x (Maintains compatibility with v3.x despite the major semantic version bump. Compatible with Puppet 2.7.x)
+ * v5.x (To be released when stdlib can drop support for Puppet 2.7.x. Please see [this discussion](https://github.com/puppetlabs/puppetlabs-stdlib/pull/176#issuecomment-30251414))
* master (mainline development branch)
The first Puppet Enterprise version including the stdlib module is Puppet
@@ -44,7 +45,7 @@ Puppet Versions | < 2.6 | 2.6 | 2.7 | 3.x |
:---------------|:-----:|:---:|:---:|:----:
**stdlib 2.x** | no | **yes** | **yes** | no
**stdlib 3.x** | no | no | **yes** | **yes**
-**stdlib 4.x** | no | no | no | **yes**
+**stdlib 4.x** | no | no | **yes** | **yes**
The stdlib module does not work with Puppet versions released prior to Puppet
2.6.0.
@@ -60,8 +61,10 @@ supports Puppet 2 and Puppet 3.
## stdlib 4.x ##
-The 4.0 major release of stdlib drops support for Puppet 2.7. Stdlib 4.x
-supports Puppet 3. Notably, ruby 1.8.5 is no longer supported though ruby
+The 4.0 major release of stdlib was intended to drop support for Puppet 2.7,
+but the impact on end users was too high. The decision was made to treat
+stdlib 4.x as a continuation of stdlib 3.x support. Stdlib 4.x supports Puppet
+2.7 and 3. Notably, ruby 1.8.5 is no longer supported though ruby
1.8.7, 1.9.3, and 2.0.0 are fully supported.
# Functions #
diff --git a/spec/unit/puppet/parser/functions/validate_cmd_spec.rb b/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
index 0aa3ba7..a86cb01 100644
--- a/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
@@ -1,5 +1,8 @@
require 'spec_helper'
+TESTEXE = File.exists?('/usr/bin/test') ? '/usr/bin/test' : '/bin/test'
+TOUCHEXE = File.exists?('/usr/bin/touch') ? '/usr/bin/touch' : '/bin/touch'
+
describe Puppet::Parser::Functions.function(:validate_cmd) do
let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
@@ -19,8 +22,8 @@ describe Puppet::Parser::Functions.function(:validate_cmd) do
describe "on validation failure" do
it "includes the command error output" do
expect {
- subject.call ['', '/bin/touch /cant/touch/this']
- }.to raise_error Puppet::ParseError, /cannot touch/
+ subject.call ['', "#{TOUCHEXE} /cant/touch/this"]
+ }.to raise_error Puppet::ParseError, /(cannot touch|o such file or)/
end
it "includes the command return value" do
@@ -32,12 +35,12 @@ describe Puppet::Parser::Functions.function(:validate_cmd) do
describe "when performing actual validation" do
it "can positively validate file content" do
- expect { subject.call ["non-empty", "/usr/bin/test -s"] }.to_not raise_error
+ expect { subject.call ["non-empty", "#{TESTEXE} -s"] }.to_not raise_error
end
it "can negatively validate file content" do
expect {
- subject.call ["", "/usr/bin/test -s"]
+ subject.call ["", "#{TESTEXE} -s"]
}.to raise_error Puppet::ParseError, /failed to validate.*test -s/
end
end