Module: Mn2sts
- Defined in:
- lib/mn2sts.rb,
lib/mn2sts/version.rb
Constant Summary collapse
- MN2STS_JAR_PATH =
File.join(File.dirname(__FILE__), '../bin/mn2sts.jar')
- MN2STS_JAR_VERSION =
'1.2'- VERSION =
"#{MN2STS_JAR_VERSION}.0"
Class Method Summary collapse
Class Method Details
.convert(xml_path_in, xml_path_out) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/mn2sts.rb', line 19 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 |
.help ⇒ Object
7 8 9 10 11 |
# File 'lib/mn2sts.rb', line 7 def self.help cmd = ['java', '-jar', MN2STS_JAR_PATH].join(' ') , error_str, status = Open3.capture3(cmd) end |
.version ⇒ Object
13 14 15 16 17 |
# File 'lib/mn2sts.rb', line 13 def self.version cmd = ['java', '-jar', MN2STS_JAR_PATH, '-v'].join(' ') , error_str, status = Open3.capture3(cmd) .strip end |