Skip to content

All-in-one Java wrapper for asker Ruby gem (using JRuby)

License

Notifications You must be signed in to change notification settings

teuton-software/jasker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jasker

Maven Central GPL-3.0

All-in-one Java wrapper for asker Ruby gem (using JRuby).

Using the library with Maven

<dependency>
    <groupId>io.github.teuton-software</groupId>
    <artifactId>jasker</artifactId>
    <version>{jasker.version}</version>
</dependency>

Using the with Gradle

implementation 'io.github.teuton-software:jasker:{jasker.version}'

Upgrade Ruby gems

jasker depends on some Ruby gems: asker-tool.

Install Ruby gems

mvn exec:exec@install-rubygems

Uninstall Ruby gems

mvn clean:clean@uninstall-rubygems

Also deletes target directory.

Reload all Ruby gems

mvn clean:clean@uninstall-rubygems exec:exec@install-rubygems

Usage examples

Import Asker class:

import io.github.teuton.jasker.Asker;

Get Asker version

Code:

System.out.println(Asker.execute("version"));

or

System.out.println(Asker.version());

Output:

X.Y.Z

How to build and install to your local Maven repo

Clone the repo and change to its directory:

git clone https://github.com/teuton-software/jasker.git
cd jasker

Download and install Ruby gem (asker-tool) into src/main/resources:

mvn exec:exec@install-rubygems

Build, package and install the JAR library into your local Maven repo:

mvn install

How to release to Maven Central

mvn deploy