lib/barista.rb in barista-0.1.2 vs lib/barista.rb in barista-0.1.3

- old
+ new

@@ -26,11 +26,11 @@ def render_path(path) full_path = root.join("#{path.gsub(/(\A\/|\/\Z)/, '')}.coffee") return unless full_path.exist? && full_path.readable? Compiler.compile(full_path.read) - rescue SysCallError + rescue SystemCallError nil end def compile_file!(file, force = false) file = file.to_s @@ -40,11 +40,11 @@ Rails.logger.debug "[Barista] Compiling #{file} to #{destination_path}" File.open(destination_path, "w+") do |f| f.write Compiler.compile(File.read(file)) end true - rescue SysCallError + rescue SystemCallError false end def should_compile_file?(from, to) File.exist?(from) && (!File.exist?(to) || File.mtime(to) < File.mtime(from)) @@ -56,9 +56,17 @@ end # By default, only add it in dev / test def add_filter? Rails.env.test? || Rails.env.development? + end + + def no_wrap? + defined?(@no_wrap) && @no_wrap + end + + def no_wrap=(value) + @no_wrap = !!value end end if defined?(Rails::Engine) \ No newline at end of file