File tree 3 files changed +5
-5
lines changed
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/*
56
56
desc 'Validate Ruby source files and ERB templates.'
57
57
task :validate do
58
58
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 )
60
60
end
61
61
Dir [ 'lib/puppet-strings/yard/templates/**/*.erb' ] . each do |template |
62
62
sh "erb -P -x -T '-' #{ template } | ruby -c"
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ def render
21
21
22
22
def type
23
23
t = @registry [ :type ]
24
- if t =~ /ruby4x/
24
+ if /ruby4x/ . match? ( t )
25
25
"Ruby 4.x API"
26
- elsif t =~ /ruby3/
26
+ elsif /ruby3/ . match? ( t )
27
27
"Ruby 3.x API"
28
- elsif t =~ /ruby/
28
+ elsif /ruby/ . match? ( t )
29
29
"Ruby"
30
30
else
31
31
"Puppet Language"
Original file line number Diff line number Diff line change 148
148
def check_required_features
149
149
raise RuntimeError , "The 'yard' gem must be installed in order to use this face." unless Puppet . features . yard?
150
150
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/ )
152
152
end
153
153
154
154
# Builds the options to PuppetStrings.generate.
You can’t perform that action at this time.
0 commit comments