Skip to content

Commit

Permalink
updated Jruby to 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
slagyr committed Aug 27, 2012
1 parent 0875251 commit 52b86f1
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
9 changes: 0 additions & 9 deletions Limelight.iml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/ruby/lib/jruby-complete-1.6.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

2 changes: 1 addition & 1 deletion ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def classpath
end

def prod_deps
%W(http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-complete-1.6.4.jar file:/#{LIMELIGHT_ROOT}/limelight.jar)
%W(http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview2/jruby-complete-1.7.0.preview2.jar file:/#{LIMELIGHT_ROOT}/limelight.jar)
end

desc "Creates required files"
Expand Down
4 changes: 4 additions & 0 deletions ruby/lib/limelight/dsl/stage_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
require 'limelight/stage'
require 'limelight/limelight_exception'

class Foo

end

module Limelight

# A trigger to build/configure Stage objects using the StageBuilder DSL.
Expand Down
1 change: 1 addition & 0 deletions ruby/lib/limelight/limelight_init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
$LIMELIGHT_HOME = File.expand_path(File.join($LIMELIGHT_LIB, "..", ".."))

require 'java'
require 'jruby'
require 'limelight.jar'
require 'limelight-rb.jar'

Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/limelight/specs/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class << self
# clicky :id => "clicky", :text => "click me", :on_mouse_clicked => "self.text = 'Hey! You clicked me!'"
# end
#
# it "should change text on clicky when clicked" do
# it "changes text on clicky when clicked" do
# scene.find("clicky").mouse_clicked(nil)
# clicky.text.should == "Hey! You clicked me!"
# end
Expand Down
6 changes: 3 additions & 3 deletions ruby/lib/limelight/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def self.directory_contains_file(file, file_name)
# This is used by the DSL Builder classes to minimize reserved keywords.
#
def self.lobotomize(klass)
klass.methods.each do |method_name|
unless method_name[0..1] == "__" || method_name == "instance_eval" || method_name == "methods"
klass.methods.each do |method|
unless method.to_s()[0..1] == "__" || method == :instance_eval || method == :methods
begin
klass.instance_eval "undef_method :#{method_name}"
klass.instance_eval "undef_method :#{method}"
rescue Exception => e
end
end
Expand Down
16 changes: 11 additions & 5 deletions ruby/ruby.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<component name="FacetManager">
<facet type="JRUBY" name="JRuby">
<configuration>
<JRUBY_FACET_CONFIG_ID NAME="JRUBY_SDK_NAME" VALUE="" />
<JRUBY_FACET_CONFIG_ID NAME="JRUBY_SDK_NAME" VALUE="RVM: jruby-1.6.7.2 [limelight]" />
<LOAD_PATH number="1" string0="$MODULE_DIR$/lib" />
<I18N_FOLDERS number="0" />
</configuration>
Expand All @@ -17,19 +17,25 @@
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="RVM: jruby-1.6.7.2 [limelight]" jdkType="JRUBY_SDK" />
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="limelight" />
<orderEntry type="library" scope="PROVIDED" name="RVM: jruby-1.6.7.2 [limelight] facet library" level="application" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jruby-complete-1.6.4.jar!/" />
<root url="jar://$MODULE_DIR$/lib/jruby-complete-1.7.0.preview2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module" module-name="limelight" />
<orderEntry type="library" scope="PROVIDED" name="RVM: jruby-1.6.5 facet library" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.1.5, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.7.0, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.7.1, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.7.0, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.7.0, RVM: jruby-1.6.7.2 [limelight]) [gem]" level="application" />
</component>
</module>

2 changes: 2 additions & 0 deletions ruby/src/limelight/ruby/RubyProduction.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import limelight.model.api.SceneProxy;
import limelight.styles.RichStyle;
import limelight.ui.model.Scene;
import org.jruby.CompatVersion;
import org.jruby.Ruby;
import org.jruby.RubyInstanceConfig;
import org.jruby.javasupport.JavaEmbedUtils;
Expand Down Expand Up @@ -176,6 +177,7 @@ public void run()
final String rubyLibDir = new File(Context.instance().limelightHome + "/ruby/lib").getCanonicalPath();
loadPaths.add(rubyLibDir);
RubyInstanceConfig config = new RubyInstanceConfig();
config.setCompatVersion(CompatVersion.RUBY1_9);
config.setObjectSpaceEnabled(true);
ruby = JavaEmbedUtils.initialize(loadPaths, config);
InputStream input = new ByteArrayInputStream(src.getBytes());
Expand Down

0 comments on commit 52b86f1

Please sign in to comment.