The jnlp Ruby gem is now at version 0.2.

Installing in MRI, (C Ruby):

   sudo gem install jnlp --source=http://rails.dev.concord.org/gems/

Installing in JRuby

   jruby -S gem install jnlp --source=http://rails.dev.concord.org/gems/

Once you have installed it start up a local gem server to view the rdoc:

MRI: gem server

JRuby: jruby -S gem server

Then open http://localhost:8808 in a browser.

The rdoc is pretty extensive.

Example of using the Jnlp::Otrunk class in jruby:

# start jruby version of ruby irb
jirb
require 'rubygems'
require 'jnlp'

j = 
Jnlp::Otrunk.new('http://rails.dev.concord.org/sds/2/offering/144/jnlp/540/view?sailotrunk.otmlurl=http://continuum.concord.org/otrunk/examples/BasicExamples/document-edit.otml&sailotrunk.hidetree=false',
 
'cache'); nil
j.write_local_classpath_shell_script('document-edit_classpath.sh', 
:remove_jruby => true)
exit

# back in shell
# This is a temporary hack which adds the jnlp jars to the system classpath
# see jruby bug: http://jira.codehaus.org/browse/JRUBY-2495
#
source document-edit_classpath.sh
jirb

# back in jirb
require 'rubygems'
require 'jnlp'

j = 
Jnlp::Otrunk.new('http://rails.dev.concord.org/sds/2/offering/144/jnlp/540/view?sailotrunk.otmlurl=http://continuum.concord.org/otrunk/examples/BasicExamples/document-edit.otml&sailotrunk.hidetree=false',
 
'cache'); nil
j.run_local

# the OTrunk example document-edit from this page:

   http://continuum.concord.org/otrunk/examples/BasicExamples/ot-index.html

Should be running.

Code resources:

   svn: https://svn.concord.org/svn/projects/trunk/common/ruby/gems/jnlp/
   trac: 
http://trac.cosmos.concord.org/projects/browser/trunk/common/ruby/gems/jnlp/

To build the gem locally (if you want to add functionality):

svn co https://svn.concord.org/svn/projects/trunk/common/ruby/gems/jnlp/
cd jnlp

# install the gem hoe -- It's used for buildingthe gem.

sudo gem install hoe

# clean any build products -- this is only needed if you've already
# built the gem and need to clean up before rebuilding.
rake clean

# package the gem
rake package

# You should see a bunch of console output ending with something like this:
#  Successfully built RubyGem
#  Name: jnlp
#  Version: 0.0.2.13465
#  File: jnlp-0.0.2.13465.gem

# install into your local repository
gem install pkg/jnlp-0.0.2.13465.gem

# If you are doing this in jruby replace 'gem' above with 'jruby -S gem'
# Also if you install jruby into a non-system dir (recommended) then
# the sudo is not needed.




-- 
- Stephen Bannasch
   Concord Consortium, http://www.concord.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to