lib/rbbt/rest/common/resources.rb in rbbt-rest-1.8.157 vs lib/rbbt/rest/common/resources.rb in rbbt-rest-1.9.0

- old
+ new

@@ -38,11 +38,11 @@ def serve_js(compress = true) if production? and compress and not @debug_js md5 = Misc.digest(recorded_js_files * ",") filename = settings.file_dir["all_js-#{md5}.js"].find - if not File.exists?(filename) + if not File.exist?(filename) Log.debug{ "Regenerating JS Compressed file: #{ filename }" } text = recorded_js_files.collect{|file| begin path = locate_javascript(file) @@ -51,10 +51,10 @@ end "//FILE: #{ File.basename(path) }\n" + Open.read(path) } * "\n" - FileUtils.mkdir_p File.dirname(filename) unless File.exists? File.dirname(filename) + FileUtils.mkdir_p File.dirname(filename) unless File.exist? File.dirname(filename) Open.write(filename, Uglifier.compile(text)) end res = "<script src='/files/#{File.basename(filename)}' type='text/javascript'></script>" else