summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2017-07-13 17:37:47 +0100
committerGitHub <noreply@github.com>2017-07-13 17:37:47 +0100
commit54d4937c5b2d8918ee9f89f728c0c29e0d9e774f (patch)
tree353dc4ca3c7290ead7d85299c859882d310cac84
parent5a17bf1c338c74bd6c8dbacc9a05b4cd501ecc23 (diff)
parent715c40dc9083068598387ab67396136e87eb553d (diff)
Merge pull request #790 from puppetlabs/msync_modules5187
(MODULES-5187) mysnc puppet 5 and ruby 2.4
-rw-r--r--.travis.yml6
-rw-r--r--appveyor.yml22
-rw-r--r--spec/aliases/integer_spec.rb6
-rwxr-xr-xspec/functions/merge_spec.rb2
4 files changed, 26 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index 4981b25..0c6f904 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,10 +22,10 @@ matrix:
script: bundle exec rake beaker
services: docker
sudo: required
- - rvm: 2.3.1
+ - rvm: 2.4.0
bundler_args: --without system_tests
- env: PUPPET_GEM_VERSION="~> 4.0"
- - rvm: 2.1.7
+ env: PUPPET_GEM_VERSION="~> 5.0"
+ - rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0"
notifications:
diff --git a/appveyor.yml b/appveyor.yml
index c87ed7c..7e05880 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -14,16 +14,28 @@ environment:
RUBY_VER: 21
- PUPPET_GEM_VERSION: ~> 4.0
RUBY_VER: 21-x64
- - PUPPET_GEM_VERSION: ~> 4.0
- RUBY_VER: 23
- - PUPPET_GEM_VERSION: ~> 4.0
- RUBY_VER: 23-x64
- - PUPPET_GEM_VERSION: 4.2.3
+ - PUPPET_GEM_VERSION: ~> 5.0
+ RUBY_VER: 24
+ - PUPPET_GEM_VERSION: ~> 5.0
+ RUBY_VER: 24-x64
+ - PUPPET_GEM_VERSION: 4.7.1
RUBY_VER: 21-x64
matrix:
fast_finish: true
install:
- SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH%
+- ps: |
+ # AppVeyor appears to have OpenSSL headers available already
+ # which msys2 would normally install with:
+ # pacman -S mingw-w64-x86_64-openssl --noconfirm
+ #
+ if ( $(ruby --version) -match "^ruby\s+2\.4" ) {
+ Write-Output "Building OpenSSL gem ~> 2.0.4 to fix Ruby 2.4 / AppVeyor issue"
+ gem install openssl --version '~> 2.0.4' --no-ri --no-rdoc
+ }
+
+ gem list openssl
+ ruby -ropenssl -e 'puts \"OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}\"; puts \"OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}\"'
- bundle install --jobs 4 --retry 2 --without system_tests
- type Gemfile.lock
build: off
diff --git a/spec/aliases/integer_spec.rb b/spec/aliases/integer_spec.rb
index 8cb4658..aec9fd6 100644
--- a/spec/aliases/integer_spec.rb
+++ b/spec/aliases/integer_spec.rb
@@ -22,7 +22,11 @@ if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
[ "foo\nbar", true, 'true', false, 'false', 'iAmAString', '1test', '1 test', 'test 1', 'test 1 test', {}, { 'key' => 'value' }, { 1=> 2 }, '', :undef , 'x', 3.7, '3.7',-3.7, '-342.2315e-12' ].each do |value|
describe value.inspect do
let(:params) {{ value: value }}
- it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value of type Integer, Pattern(\[.*\]+)?, or Array/) }
+ if Gem::Version.new(Puppet.version) >= Gem::Version.new('5.0.0')
+ it { is_expected.to compile.and_raise_error(/parameter 'value' expects a Stdlib::Compat::Integer = Variant\[Integer, Pattern\[.*\], Array\[.*\]\] value/) }
+ else
+ it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value of type Integer, Pattern(\[.*\]+)?, or Array/) }
+ end
end
end
end
diff --git a/spec/functions/merge_spec.rb b/spec/functions/merge_spec.rb
index 7b53363..3b2e3ef 100755
--- a/spec/functions/merge_spec.rb
+++ b/spec/functions/merge_spec.rb
@@ -4,7 +4,7 @@ describe 'merge' do
it { is_expected.not_to eq(nil) }
it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
it { is_expected.to run.with_params({}, 'two').and_raise_error(Puppet::ParseError, /unexpected argument type String/) }
- it { is_expected.to run.with_params({}, 1).and_raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) }
+ it { is_expected.to run.with_params({}, 1).and_raise_error(Puppet::ParseError, /unexpected argument type (Fixnum|Integer)/) }
it {
pending 'should not special case this'
is_expected.to run.with_params({}).and_return({})