Skip to content

Commit

Permalink
beta 8: report file parameter must have an ':' bewtween html and the …
Browse files Browse the repository at this point in the history
…path so the plugin can work in Windows
  • Loading branch information
Diego Carrion committed Jan 8, 2009
2 parents f7d287d + 5183ca4 commit a5ab287
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
27 changes: 27 additions & 0 deletions README.textile
@@ -1,2 +1,29 @@
h2. INSTALLATION

<pre>
<code>git clone git://github.com/dcrec1/rspec-maven-plugin.git
cd rspec-maven-plugin
mvn install</code>
</pre>

h2. CONFIGURATION

Just put this in your pom.xml:

<pre>
<code>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rspec-maven-plugin</artifactId>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>spec</goal>
</goals>
</execution>
</executions>
</plugin>
</code>
</pre>
11 changes: 10 additions & 1 deletion pom.xml
Expand Up @@ -10,7 +10,7 @@
<name>RSpec Maven Plugin</name>
<description>Maven plugin to execute Ruby Spec tests</description>
<packaging>maven-plugin</packaging>
<version>1.0-beta-6</version>
<version>1.0-beta-8</version>
<inceptionYear>2007</inceptionYear>
<organization>
<name>Codehaus</name>
Expand Down Expand Up @@ -71,4 +71,13 @@
</plugin>
</plugins>
</build>

<distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<id>arti-releases</id>
<name>Artifactory Gonow</name>
<url>http://artifactory.gonow.intranet:8080/artifactory/gonow-repository</url>
</repository>
</distributionManagement>
</project>
6 changes: 4 additions & 2 deletions src/main/java/org/codehaus/mojo/rspec/RspecRunnerMojo.java
Expand Up @@ -85,6 +85,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
throw new MojoExecutionException(
"$JRUBY_HOME or jrubyHome directory not specified");
}

Ruby runtime = Ruby.newInstance();
getLog().info("JRuby Home: " + jrubyHome);
runtime.setJRubyHome(jrubyHome);
Expand All @@ -110,8 +111,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
.append(reportPath)
.append("'\n")
.append(
"options = ::Spec::Runner::OptionParser.parse([spec_dir, '-f', \"html#{@report_file}\"], STDERR, STDOUT)\n")
.append("::Spec::Runner::CommandLine.run(options)\n");
"options = ::Spec::Runner::OptionParser.parse([spec_dir, '-f', \"html:#{@report_file}\"], STDERR, STDOUT)\n")
.append("::Spec::Runner::CommandLine.run(options)\n");

runtime.evalScriptlet(script.toString());

Expand All @@ -137,6 +138,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
"RSpec tests successful. See '" + reportPath
+ "' for details.");
}

}

private String handleClasspathElements(Ruby runtime)
Expand Down

0 comments on commit a5ab287

Please sign in to comment.