Title: [722] trunk/rails-integration: Add context-params to Ruby's environment, so that applications can use them for external configuration.
Revision
722
Author
tantalon
Date
2007-08-27 19:15:52 -0400 (Mon, 27 Aug 2007)

Log Message

Add context-params to Ruby's environment, so that applications can use them for external configuration.
Upgraded surefire to 2.4-snapshot, because version 2.1.3 doesn't work with Maven 2.0.7.

Modified Paths

Property Changed

Diff

Property changes: trunk/rails-integration


Name: svn:ignore
   - rails-integration.*
target
   + *.iml
*.iws
*.ipr
target

Modified: trunk/rails-integration/pom.xml (721 => 722)


--- trunk/rails-integration/pom.xml	2007-08-27 21:41:41 UTC (rev 721)
+++ trunk/rails-integration/pom.xml	2007-08-27 23:15:52 UTC (rev 722)
@@ -197,10 +197,11 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.1.3</version><!-- forcing version to avoid ignoring of -disableassertions -->
+        <version>2.4-SNAPSHOT</version>
         <configuration>
           <forkMode>pertest</forkMode>
-          <argLine>-Xmx256m -disableassertions</argLine>
+          <enableAssertions>false</enableAssertions>
+          <argLine>-Xmx256m</argLine>
         </configuration>
       </plugin>
       <plugin>
@@ -212,4 +213,18 @@
     </plugins>
   </build>
 
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.org</id>
+      <name>Maven Snapshots</name>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
 </project>

Modified: trunk/rails-integration/src/main/java/org/jruby/webapp/RailsContextListener.java (721 => 722)


--- trunk/rails-integration/src/main/java/org/jruby/webapp/RailsContextListener.java	2007-08-27 21:41:41 UTC (rev 721)
+++ trunk/rails-integration/src/main/java/org/jruby/webapp/RailsContextListener.java	2007-08-27 23:15:52 UTC (rev 722)
@@ -2,6 +2,7 @@
 import org.jruby.webapp.util.CustomObjectPool;
 import org.jruby.webapp.util.FileUtil;
 import org.apache.commons.pool.ObjectPool;
+import java.util.Enumeration;
 import javax.servlet.ServletContextListener;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContext;
@@ -49,6 +50,14 @@
 		railsFactory.setRailsEnvironment(getDeploymentEnvironment());
 		railsFactory.setServletContext(context);
 
+		// add any extra initial parameters to the environment
+		for(Enumeration e = context.getInitParameterNames(); e.hasMoreElements(); ) {
+			String name = (String)e.nextElement();
+			String value = context.getInitParameter(name);
+			railsFactory.addEnvironmentOverride(name, value);
+		}
+
+		// add the gem configuration
 		if (isStandalone()) {
 			railsFactory.removeEnvironment("GEM_HOME");
 		}
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to