Skip to content

Commit 54d4937

Browse files
authored
Merge pull request #790 from puppetlabs/msync_modules5187
(MODULES-5187) mysnc puppet 5 and ruby 2.4
2 parents 5a17bf1 + 715c40d commit 54d4937

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ matrix:
2222
script: bundle exec rake beaker
2323
services: docker
2424
sudo: required
25-
- rvm: 2.3.1
25+
- rvm: 2.4.0
2626
bundler_args: --without system_tests
27-
env: PUPPET_GEM_VERSION="~> 4.0"
28-
- rvm: 2.1.7
27+
env: PUPPET_GEM_VERSION="~> 5.0"
28+
- rvm: 2.1.9
2929
bundler_args: --without system_tests
3030
env: PUPPET_GEM_VERSION="~> 4.0"
3131
notifications:

appveyor.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,28 @@ environment:
1414
RUBY_VER: 21
1515
- PUPPET_GEM_VERSION: ~> 4.0
1616
RUBY_VER: 21-x64
17-
- PUPPET_GEM_VERSION: ~> 4.0
18-
RUBY_VER: 23
19-
- PUPPET_GEM_VERSION: ~> 4.0
20-
RUBY_VER: 23-x64
21-
- PUPPET_GEM_VERSION: 4.2.3
17+
- PUPPET_GEM_VERSION: ~> 5.0
18+
RUBY_VER: 24
19+
- PUPPET_GEM_VERSION: ~> 5.0
20+
RUBY_VER: 24-x64
21+
- PUPPET_GEM_VERSION: 4.7.1
2222
RUBY_VER: 21-x64
2323
matrix:
2424
fast_finish: true
2525
install:
2626
- SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH%
27+
- ps: |
28+
# AppVeyor appears to have OpenSSL headers available already
29+
# which msys2 would normally install with:
30+
# pacman -S mingw-w64-x86_64-openssl --noconfirm
31+
#
32+
if ( $(ruby --version) -match "^ruby\s+2\.4" ) {
33+
Write-Output "Building OpenSSL gem ~> 2.0.4 to fix Ruby 2.4 / AppVeyor issue"
34+
gem install openssl --version '~> 2.0.4' --no-ri --no-rdoc
35+
}
36+
37+
gem list openssl
38+
ruby -ropenssl -e 'puts \"OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}\"; puts \"OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}\"'
2739
- bundle install --jobs 4 --retry 2 --without system_tests
2840
- type Gemfile.lock
2941
build: off

spec/aliases/integer_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
[ "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|
2323
describe value.inspect do
2424
let(:params) {{ value: value }}
25-
it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value of type Integer, Pattern(\[.*\]+)?, or Array/) }
25+
if Gem::Version.new(Puppet.version) >= Gem::Version.new('5.0.0')
26+
it { is_expected.to compile.and_raise_error(/parameter 'value' expects a Stdlib::Compat::Integer = Variant\[Integer, Pattern\[.*\], Array\[.*\]\] value/) }
27+
else
28+
it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value of type Integer, Pattern(\[.*\]+)?, or Array/) }
29+
end
2630
end
2731
end
2832
end

spec/functions/merge_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
it { is_expected.not_to eq(nil) }
55
it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
66
it { is_expected.to run.with_params({}, 'two').and_raise_error(Puppet::ParseError, /unexpected argument type String/) }
7-
it { is_expected.to run.with_params({}, 1).and_raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) }
7+
it { is_expected.to run.with_params({}, 1).and_raise_error(Puppet::ParseError, /unexpected argument type (Fixnum|Integer)/) }
88
it {
99
pending 'should not special case this'
1010
is_expected.to run.with_params({}).and_return({})

0 commit comments

Comments
 (0)