Merge pull request #2413 from yegortimoschenko/jruby-executable

Add JRuby executable example, fixes #2412
This commit is contained in:
Arfon Smith
2015-05-28 10:27:53 -05:00
3 changed files with 17 additions and 0 deletions

View File

@@ -2847,6 +2847,8 @@ Ruby:
- ruby
- macruby
- rake
- jruby
- rbx
filenames:
- .pryrc
- Appraisals

4
samples/Ruby/rexpl Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env rbx
$: << 'lib'
require 'rexpl'
Rexpl::Environment.run

11
samples/Ruby/shoes-swt Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env jruby
lib_directory = File.expand_path('../../lib', __FILE__)
$LOAD_PATH << lib_directory
if File.exist?("Gemfile")
require "bundler/setup"
Bundler.require
end
require 'shoes/ui/cli'
Shoes::CLI.new("swt").run ARGV