jruby-container

Provides an isolated Jruby Execution Container that can fetch gems to run from rubygems in an isolated folder.

License

License

The Apache Software License, Version 2.0
Categories

Categories

Ruby Languages Container
GroupId

GroupId

com.bertramlabs.plugins
ArtifactId

ArtifactId

jruby-container
Last Version

Last Version

0.6.3
Release Date

Release Date

Type

Type

jar
Description

Description

jruby-container
Provides an isolated Jruby Execution Container that can fetch gems to run from rubygems in an isolated folder.
Project URL

Project URL

https://github.com/bertramdev/jruby-container
Source Code Management

Source Code Management

https://github.com/bertramdev/jruby-container

Download jruby-container

How to add to project

<!-- https://jarcasting.com/artifacts/com.bertramlabs.plugins/jruby-container/ -->
<dependency>
    <groupId>com.bertramlabs.plugins</groupId>
    <artifactId>jruby-container</artifactId>
    <version>0.6.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.bertramlabs.plugins/jruby-container/
implementation 'com.bertramlabs.plugins:jruby-container:0.6.3'
// https://jarcasting.com/artifacts/com.bertramlabs.plugins/jruby-container/
implementation ("com.bertramlabs.plugins:jruby-container:0.6.3")
'com.bertramlabs.plugins:jruby-container:jar:0.6.3'
<dependency org="com.bertramlabs.plugins" name="jruby-container" rev="0.6.3">
  <artifact name="jruby-container" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.bertramlabs.plugins', module='jruby-container', version='0.6.3')
)
libraryDependencies += "com.bertramlabs.plugins" % "jruby-container" % "0.6.3"
[com.bertramlabs.plugins/jruby-container "0.6.3"]

Dependencies

runtime (1)

Group / Artifact Type Version
org.jruby : jruby-complete jar 9.2.11.1

Project Modules

There are no modules declared in this project.

Jruby Container

The Jruby Container is an extension on top of the jruby-complete library. It enables Different scripting containers to run in isolated home/gemset directories given a container name. (i.e. a container initialized with name test would store its files in .jruby-container/test).

The Jruby Container also provides additional convenience methods for loading dependencies. It is able to fetch gems from rubygems.org via the embedded rubygems library.

##Usage

	IsolatedScriptingContainer scriptingContainer = new IsolatedScriptingContainer('test');
	scriptingContainer.installGemDependencies([compass:'1.0.1', sass:''])

	//Then we can execute stuff with these gems
	scriptingContainer.runBinScript('compass',['compile','/path/to/project'] as String[])

Gem dependencies are persisted in a container directory (defaulting to ./.jruby-container). However this can be changed globally via the JrubyContainerConfig or on a container level...

import com.bertramlabs.plugins.jruby.*;
//globally
JrubyContainerConfig.config.containerPath = "/.my-container-path"

//or at container level
IsolatedScriptingContainer scriptingContainer = new IsolatedScriptingContainer('test');
scriptingContainer.initializeEnvironment("/.my-container-path")

Work To Be Done

  • Add Convenience methods to clean the container directory for a clean slate scenario
com.bertramlabs.plugins

Bertram Labs

Versions

Version
0.6.3
0.6.1
0.6.0
0.4.0
0.3.0
0.2.0