Sha256: 4085ab3669bac76d7dc67a54e8161597a82a9ce06dba0cac91c44d1d6ba8c867
Contents?: true
Size: 878 Bytes
Versions: 3
Compression:
Stored size: 878 Bytes
Contents
require 'open3' require 'mn2sts/version' module Mn2sts MN2STS_JAR_PATH = File.join(File.dirname(__FILE__), '../bin/mn2sts.jar') def self.help cmd = ['java', '-jar', MN2STS_JAR_PATH].join(' ') message, error_str, status = Open3.capture3(cmd) message end def self.version cmd = ['java', '-jar', MN2STS_JAR_PATH, '-v'].join(' ') message, error_str, status = Open3.capture3(cmd) message.strip end def self.convert(xml_path_in, xml_path_out) return if xml_path_in.nil? || xml_path_out.nil? puts MN2STS_JAR_PATH cmd = ['java', '-Xss5m', '-Xmx1024m', '-jar', MN2STS_JAR_PATH, '--xml-file-in', xml_path_in, '--xml-file-out', xml_path_out ].join(' ') puts cmd _, error_str, status = Open3.capture3(cmd) unless status.success? warn error_str raise error_str end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
metanorma-cli-1.3.4 | gems/ruby/2.6.0/gems/mn2sts-1.2.0/lib/mn2sts.rb |
metanorma-cli-1.3.3.1 | gems/ruby/2.6.0/gems/mn2sts-1.2.0/lib/mn2sts.rb |
mn2sts-1.2.0 | lib/mn2sts.rb |