metanorma / mnconvert-ruby

Ruby gem wrapper for mnconvert
2 stars 0 forks source link

= mnconvert Ruby gem

image:https://img.shields.io/gem/v/mnconvert.svg["Gem Version", link="https://rubygems.org/gems/mnconvert"] image:https://github.com/metanorma/mnconvert-ruby/workflows/rake/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/mnconvert-ruby/actions/workflows/rake.yml"] image:https://codeclimate.com/github/metanorma/mnconvert-ruby/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/mnconvert-ruby"] image:https://img.shields.io/github/issues-pr-raw/metanorma/mnconvert-ruby.svg["Pull Requests", link="https://github.com/metanorma/mnconvert-ruby/pulls"] image:https://img.shields.io/github/commits-since/metanorma/mnconvert-ruby/latest.svg["Commits since latest",link="https://github.com/metanorma/mnconvert-ruby/releases"]

== Purpose

The mnconvert Ruby gem is a wrapper around the Java https://github.com/metanorma/mnconvert[mnconvert] which:

This gem is used to provide mnconvert.jar with mirrored version numbers, to allow Ruby code to easily refer to the desired mnconvert version as dependencies.

== Installation

[source,ruby]

gem install mnconvert

Or include it in your gemspec.

== Usage

[source,ruby]

require 'mnconvert' MnConvert.convert(sample_xml_path, output_pdf_path)

== Updating the gem

Update lib/mnconvert/version.rb to the desired version of https://github.com/metanorma/mnconvert[mnconvert].

Run rake to download the bin/mnconvert.jar file:

[source,ruby]

rm -f bin/mnconvert.jar rake bin/mnconvert.jar

Then release the gem with rake release.