Title: [waffle-scm] [186] trunk/rspec-maven-plugin: RSpec maven plugin allows for jrubyHome to be configuarble
Revision
186
Author
mward
Date
2007-06-22 00:16:34 -0500 (Fri, 22 Jun 2007)

Log Message

RSpec maven plugin allows for jrubyHome to be configuarble

Modified Paths


Property Changed

  • trunk/rspec-maven-plugin/

Diff

Modified: trunk/examples/jruby-example/pom.xml (185 => 186)

--- trunk/examples/jruby-example/pom.xml	2007-06-22 04:05:00 UTC (rev 185)
+++ trunk/examples/jruby-example/pom.xml	2007-06-22 05:16:34 UTC (rev 186)
@@ -49,6 +49,7 @@
         <groupId>org.codehaus.waffle</groupId>
         <artifactId>rspec-maven-plugin</artifactId>
         <configuration>
+          <jrubyHome>${env.JRUBY_HOME}</jrubyHome>
           <sourceDirectory>${basedir}/src/test/ruby</sourceDirectory>
           <outputDirectory>${basedir}/target</outputDirectory>
         </configuration>

Modified: trunk/examples/jruby-example/src/test/ruby/foobar_spec.rb (185 => 186)

--- trunk/examples/jruby-example/src/test/ruby/foobar_spec.rb	2007-06-22 04:05:00 UTC (rev 185)
+++ trunk/examples/jruby-example/src/test/ruby/foobar_spec.rb	2007-06-22 05:16:34 UTC (rev 186)
@@ -5,7 +5,7 @@
 
   it "should be able to get classes from jars, compiled directories and *.rb files" do
     servlet = WaffleServlet.new
-    p "Servlet #{list}"
+    p "Servlet #{servlet}"
 
     p Person.new
   end

Modified: trunk/examples/jruby-example/src/test/ruby/junk_spec.rb (185 => 186)

--- trunk/examples/jruby-example/src/test/ruby/junk_spec.rb	2007-06-22 04:05:00 UTC (rev 185)
+++ trunk/examples/jruby-example/src/test/ruby/junk_spec.rb	2007-06-22 05:16:34 UTC (rev 186)
@@ -5,8 +5,6 @@
   it "should know its own port" do
     server_socket = ServerSocket.new(5678)
     server_socket.localPort.should == 5678
-
-
   end
 
   it "should be able to mock methods on base java classes" do

Property changes: trunk/rspec-maven-plugin

Name: svn:ignore
   + target

Modified: trunk/rspec-maven-plugin/src/main/java/org/codehaus/waffle/mojo/RspecRunnerMojo.java (185 => 186)

--- trunk/rspec-maven-plugin/src/main/java/org/codehaus/waffle/mojo/RspecRunnerMojo.java	2007-06-22 04:05:00 UTC (rev 185)
+++ trunk/rspec-maven-plugin/src/main/java/org/codehaus/waffle/mojo/RspecRunnerMojo.java	2007-06-22 05:16:34 UTC (rev 186)
@@ -41,10 +41,21 @@
      */
     protected String outputDirectory;
 
+    /**
+     * The directory where JRuby is installed (defaults to ~/.jruby)
+     *
+     * @parameter
+     */
+    protected String jrubyHome;
+
     public void execute() throws MojoExecutionException, MojoFailureException {
         getLog().info("Running RSpec tests from " + sourceDirectory);
 
         Ruby runtime = Ruby.getDefaultInstance();
+
+        if(jrubyHome != null) {
+            runtime.setJRubyHome(jrubyHome);
+        }
         JavaSupport javaSupport = new JavaSupport(runtime);
         runtime.getLoadService().init(classpathElements);
         runtime.defineGlobalConstant("ARGV", runtime.newArray());


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to