@@ -60,7 +60,7 @@ def build_url(platform)
60
60
end
61
61
62
62
hosts . each do |host |
63
- if host [ 'platform' ] =~ %r{debian}
63
+ if %r{debian} . match? ( host [ 'platform' ] )
64
64
on host , 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
65
65
end
66
66
# install_puppet
@@ -81,7 +81,7 @@ def build_url(platform)
81
81
relver = Regexp . last_match ( 1 )
82
82
on host , "rpm -ivh #{ build_url ( 'fedora' ) } #{ relver } .noarch.rpm"
83
83
on host , 'yum install -y puppetserver'
84
- elsif host [ 'platform' ] =~ %r{(ubuntu|debian)}
84
+ elsif %r{(ubuntu|debian)} . match? ( host [ 'platform' ] )
85
85
unless host . check_for_package 'curl'
86
86
on host , 'apt-get install -y curl'
87
87
end
@@ -121,15 +121,15 @@ def build_url(platform)
121
121
'puppet7'
122
122
end
123
123
install_puppet_agent_on ( hosts , opts ) unless ENV [ 'BEAKER_provision' ] == 'no'
124
- install_ca_certs unless ENV [ 'PUPPET_INSTALL_TYPE' ] =~ %r{pe}i
124
+ install_ca_certs unless %r{pe}i . match? ( ENV [ 'PUPPET_INSTALL_TYPE' ] )
125
125
install_module_on ( hosts )
126
126
install_module_dependencies_on ( hosts )
127
127
128
128
RSpec . configure do |c |
129
129
# Readable test descriptions
130
130
c . formatter = :documentation
131
131
hosts . each do |host |
132
- if host [ :platform ] =~ %r{ el-7-x86_64} && host [ :hypervisor ] =~ %r{ docker}
132
+ if host [ :platform ] . include ( ' el-7-x86_64' ) && host [ :hypervisor ] . include ( ' docker' )
133
133
on ( host , "sed -i '/nodocs/d' /etc/yum.conf" )
134
134
end
135
135
end
0 commit comments