Skip to content

Commit

Permalink
Add defaults to RackAppMetaData. Default includes config.ru and a con…
Browse files Browse the repository at this point in the history
…text.

Rails2 deployments simply erase the rackup for synthetic rackups.
Rename deployer to lose gratuitous "Default".  Considered adding "Abstract", "Factory" and "Impl", but decided against.
Removed un-used dead deployer.
  • Loading branch information
bobmcwhirter committed Mar 4, 2011
1 parent 5841287 commit c97788c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

<!-- Rack -->

<bean name="DefaultRackApplicationRecognizer" class="org.torquebox.rack.deployers.DefaultRackApplicationRecognizer"/>

<bean name="RackApplicationRecognizer" class="org.torquebox.rack.deployers.RackApplicationRecognizer"/>
<bean name="RackApplicationDefaultsDeployer" class="org.torquebox.rack.deployers.RackApplicationDefaultsDeployer"/>

<bean name="RackApplicationFactoryDeployer" class="org.torquebox.rack.deployers.RackApplicationFactoryDeployer"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import org.torquebox.base.deployers.AbstractRecognizer;
import org.torquebox.rack.metadata.RackApplicationMetaData;

public class DefaultRackApplicationRecognizer extends AbstractRecognizer {
public class RackApplicationRecognizer extends AbstractRecognizer {

public static final String DEFAULT_RACKUP_PATH = "config.ru";

public DefaultRackApplicationRecognizer() {
public RackApplicationRecognizer() {
addInput( RackApplicationMetaData.class );
addOutput( RackApplicationMetaData.class );
setRelativeOrder( 5000 );
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void deploy(DeploymentUnit unit) throws DeploymentException {
} else {
log.debug( "Configuring up a rails 2 application: " + unit );
rackMetaData.setRackUpScript( getRackUpScript( rackMetaData.getContextPath() ) );
rackMetaData.setRackUpScriptLocation( null );
}

rackMetaData.setStaticPathPrefix( STATIC_PATH_PREFIX );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void testRackUpScriptLocationImplicit() throws Exception {
RackApplicationFactoryImpl factory = (RackApplicationFactoryImpl) getBean( beanName );
assertNotNull( factory );
assertNotNull( factory.getRackUpFile() );
assertEquals( VFS.getChild( "/sample/app/" + RackApplicationFactoryDeployer.SYNTHETIC_CONFIG_RU_NAME ), factory.getRackUpFile() );
assertEquals( VFS.getChild( "/sample/app/config.ru" ), factory.getRackUpFile() );

undeploy( deploymentName );
undeploy( this.runtimeInstanceFactoryDeploymentName );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ public String toString() {
}

private String rackUpScript;
private String rackUpScriptLocation;
private String rackUpScriptLocation = "config.ru";

private List<String> hosts = new ArrayList<String>();
private String contextPath;
private String staticPathPrefix;
private String contextPath = "/";
private String staticPathPrefix = "public/";

private String rubyRuntimePoolName;
private String rackApplicationFactoryName;
Expand Down

0 comments on commit c97788c

Please sign in to comment.