You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/cuber/cuberfile_validator.rb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ def validate_procs
81
81
@options[:procs].eachdo |procname,proc|
82
82
@errors << "proc \"#{procname}\" name can only include lowercase letters"ifprocname !~ /\A[a-z]+\z/
83
83
@errors << "proc \"#{procname}\" command must be present"ifproc[:cmd].to_s.strip.empty?
84
-
@errors << "proc \"#{procname}\" scale must be a positive number"unlessproc[:scale].is_a?(Integer) && proc[:scale] > 0
84
+
@errors << "proc \"#{procname}\" scale must be a positive number or a range"unless(proc[:scale].is_a?(Integer) && proc[:scale] > 0) || (proc[:scale].is_a?(Range) && proc[:scale].minmax.all?{ |m| m.is_a?(Integer) && m > 0})
85
85
@errors << "proc \"#{procname}\" cpu must be a positive number"unlessproc[:cpu].nil? || proc[:cpu].is_a?(Numeric) && proc[:cpu] > 0
86
86
@errors << "proc \"#{procname}\" ram must be a positive number"unlessproc[:ram].nil? || proc[:ram].is_a?(Numeric) && proc[:ram] > 0
87
87
@errors << "proc \"#{procname}\" term must be a positive number"unlessproc[:term].is_a?(Integer) && proc[:term] > 0
0 commit comments