Package org.torquebox.core.app

Examples of org.torquebox.core.app.RubyAppMetaData


    @Test
    public void testBooleanEnvironmentYml() throws Exception {
        MockDeploymentUnit unit = deployResourceAsTorqueboxYml( "environment.yml" );

        RubyAppMetaData appMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        assertNotNull( appMetaData );

        Map<String, String> environmentVariables = appMetaData.getEnvironmentVariables();
        assertNotNull( environmentVariables );

        String booleanVariable = environmentVariables.get( "A_BOOLEAN_VALUE" );
        assertEquals( "true", booleanVariable );
    }
View Full Code Here


        unit.putAttachment( DeprecationLogger.ATTACHMENT_KEY, logger );

        deploy( context );
        verify( logger, never() ).append( anyString() );

        RubyAppMetaData rubyAppMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        assertEquals( "biscuit", rubyAppMetaData.getEnvironmentName() );
    }
View Full Code Here

        unit.putAttachment( DeprecationLogger.ATTACHMENT_KEY, logger );

        deploy( context );
        verify( logger, never() ).append( anyString() );

        RubyAppMetaData rubyAppMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        assertEquals( "biscuit", rubyAppMetaData.getEnvironmentName() );
    }
View Full Code Here

        poolMetaData.setMinimumSize( 2 );
        poolMetaData.setMaximumSize( 200 );

        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, poolMetaData );
       
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test-app");
        rubyAppMetaData.attachTo( unit );
       
        deploy( phaseContext );
       
        ServiceName poolServiceName = CoreServices.runtimePoolName( unit, "pool_one" );
       
View Full Code Here

        poolMetaData.setInstanceFactoryName( "instance_factory" );
        poolMetaData.setShared();
       
        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, poolMetaData );
       
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test-app");
        rubyAppMetaData.attachTo( unit );
       
        deploy( phaseContext );
       
        ServiceName poolServiceName = CoreServices.runtimePoolName( unit, "pool_one" );
       
View Full Code Here

       
        if (!WeldDeploymentMarker.isPartOfWeldDeployment( topLevelDeployment )) {
            return;
        }
       
        RubyAppMetaData rubyAppMetaData = deploymentUnit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        if (rubyAppMetaData == null) {
            return;
        }

        BeanDeploymentArchiveImpl rootBda = deploymentUnit.getAttachment( WeldAttachments.DEPLOYMENT_ROOT_BEAN_DEPLOYMENT_ARCHIVE );
View Full Code Here

        MockDeploymentUnit unit = deployResourceAsTorqueboxYml( "simple-torquebox.yml" );
       
        TorqueBoxMetaData metaData = unit.getAttachment( TorqueBoxMetaData.ATTACHMENT_KEY );
        assertNotNull( metaData );

        RubyAppMetaData rubyAppMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        assertNotNull( rubyAppMetaData );
       
        assertEquals( RubyAppMetaData.DEFAULT_ENVIRONMENT_NAME, rubyAppMetaData.getEnvironmentName() );
       
        assertEquals( "torquebox", rubyAppMetaData.getApplicationName() );
    }
View Full Code Here

        unit.putAttachment( DeprecationLogger.ATTACHMENT_KEY, logger );

        deploy( context );
        verify( logger ).append( anyString() );

        RubyAppMetaData rubyAppMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        assertEquals( "biscuit", rubyAppMetaData.getEnvironmentName() );
    }
View Full Code Here

public class RackRuntimeInitializerTest extends AbstractRubyTestCase {

    @Test
    public void testInitializer() throws Exception {
        File root = new File( "/myapp" );
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test-app");
        RackMetaData rackAppMetaData = new RackMetaData();
        rubyAppMetaData.setRoot( root );
        rubyAppMetaData.setEnvironmentName( "test" );
        rackAppMetaData.setContextPath( "/mycontext" );

        RackRuntimeInitializer initializer = new RackRuntimeInitializer( rubyAppMetaData, rackAppMetaData );

        Ruby ruby = createRuby();
View Full Code Here

    private File root(String relativePath) {
        return new File( pwd(), relativePath );
    }
   
    private RailsRuntimeInitializer create(File root, String env) {
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test-app");
        rubyAppMetaData.setRoot( root );
        rubyAppMetaData.setEnvironmentName( env );

        RackMetaData rackAppMetaData = new RackMetaData();
        RailsMetaData railsMetaData = new RailsMetaData();

        return new RailsRuntimeInitializer( rubyAppMetaData, rackAppMetaData, railsMetaData );
View Full Code Here

TOP

Related Classes of org.torquebox.core.app.RubyAppMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.