module Bives
Constants
- JAR_FILENAME
- JAR_FILEPATH
- VERSION
Public Class Methods
included(mod)
click to toggle source
# File lib/bives.rb, line 16 def self.included(mod) unless File.exist?(JAR_FILEPATH) raise InitialisationException.new("Jar file #{JAR_FILEPATH} not found") end end
Public Instance Methods
check_jar()
click to toggle source
# File lib/bives.rb, line 22 def check_jar unless File.exist?(JAR_FILEPATH) raise InitialisationException.new("Jar file #{JAR_FILEPATH} not found") end end
compare(file1,file2,opts=["reportHtml"])
click to toggle source
# File lib/bives.rb, line 28 def compare file1,file2,opts=["reportHtml"] check_jar cmd_opts = opts.collect{|o| "--#{o}"}.join(" ") command = "java -jar #{JAR_FILEPATH} #{cmd_opts} #{file1} #{file2}" output = Terrapin::CommandLine.new(command).run output.strip rescue Terrapin::ExitStatusError => exception raise ConversionException.new(exception.message) end