File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ PuppetLint.configuration.ignore_paths = %w(acceptance/**/*.pp spec/**/*.pp pkg/*
5656desc 'Validate Ruby source files and ERB templates.'
5757task :validate do
5858 Dir [ 'spec/**/*.rb' , 'lib/**/*.rb' ] . each do |ruby_file |
59- sh "ruby -c #{ ruby_file } " unless ruby_file =~ /spec\/ fixtures/
59+ sh "ruby -c #{ ruby_file } " unless /spec\/ fixtures/ . match? ( ruby_file )
6060 end
6161 Dir [ 'lib/puppet-strings/yard/templates/**/*.erb' ] . each do |template |
6262 sh "erb -P -x -T '-' #{ template } | ruby -c"
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ def render
2121
2222 def type
2323 t = @registry [ :type ]
24- if t =~ /ruby4x/
24+ if /ruby4x/ . match? ( t )
2525 "Ruby 4.x API"
26- elsif t =~ /ruby3/
26+ elsif /ruby3/ . match? ( t )
2727 "Ruby 3.x API"
28- elsif t =~ /ruby/
28+ elsif /ruby/ . match? ( t )
2929 "Ruby"
3030 else
3131 "Puppet Language"
Original file line number Diff line number Diff line change 148148 def check_required_features
149149 raise RuntimeError , "The 'yard' gem must be installed in order to use this face." unless Puppet . features . yard?
150150 raise RuntimeError , "The 'rgen' gem must be installed in order to use this face." unless Puppet . features . rgen?
151- raise RuntimeError , 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION =~ /^1\. 8/
151+ raise RuntimeError , 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION . match? ( /^1\. 8/ )
152152 end
153153
154154 # Builds the options to PuppetStrings.generate.
You can’t perform that action at this time.
0 commit comments