Package org.torquebox.core.app

Examples of org.torquebox.core.app.RubyAppMetaData


        RubyRuntimeMetaData metaData = new RubyRuntimeMetaData();
        metaData.setCompileMode( RubyRuntimeMetaData.CompileMode.FORCE );
        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, metaData );


        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "foo");
        rubyAppMetaData.attachTo( unit );
               
        deploy( phaseContext );

        ServiceName factoryServiceName = CoreServices.runtimeFactoryName( unit );
        MockServiceBuilder<?> factoryBuilder = phaseContext.getMockServiceTarget().getMockServiceBuilder( factoryServiceName );
View Full Code Here


        RubyRuntimeMetaData metaData = new RubyRuntimeMetaData();
        metaData.setProfileApi( true );
        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, metaData );


        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "foo");
        rubyAppMetaData.attachTo( unit );
               
        deploy( phaseContext );

        ServiceName factoryServiceName = CoreServices.runtimeFactoryName( unit );
        MockServiceBuilder<?> factoryBuilder = phaseContext.getMockServiceTarget().getMockServiceBuilder( factoryServiceName );
View Full Code Here

        RubyRuntimeMetaData metaData = new RubyRuntimeMetaData();
        metaData.setProfileApi( false );
        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, metaData );


        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "foo");
        rubyAppMetaData.attachTo( unit );
               
        deploy( phaseContext );

        ServiceName factoryServiceName = CoreServices.runtimeFactoryName( unit );
        MockServiceBuilder<?> factoryBuilder = phaseContext.getMockServiceTarget().getMockServiceBuilder( factoryServiceName );
View Full Code Here

        String root = "/path/to/root";
        if (windowsPattern.matcher( System.getProperty( "os.name" ) ).matches()) {
            String windowsPrefix = System.getProperty( "windows.absolute.prefix", "C:" );
            root = windowsPrefix + "\\path\\to\\root";
        }
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test_app" );
        rubyAppMetaData.setRoot( new File( root ) );
        BaseRuntimePreparer preparer = new BaseRuntimePreparer( rubyAppMetaData );
        MockRuntimeInitializer initializer = new MockRuntimeInitializer();

        factory = new RubyRuntimeFactory( initializer, preparer );
        factory.setUseJRubyHomeEnvVar( false );
View Full Code Here

    }

    @Test
    public void testHappy() throws Exception {
        environment.put( "SOME_VAR", "gassy" );
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");
        RackMetaData rackAppMetaData = new RackMetaData();

        rubyAppMetaData.setRoot( this.root );
        rubyAppMetaData.setEnvironmentVariables( environment );

        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();

        rubyAppMetaData.attachTo( unit );
        rackAppMetaData.attachTo( unit );

        deploy( phaseContext );
       
        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
View Full Code Here

        assertEquals( RubyRuntimeMetaData.RuntimeType.RACK, runtimeMetaData.getRuntimeType() );
    }

    @Test
    public void testWithExistingRubyRuntimeMD() throws Exception {
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");
        RackMetaData rackAppMetaData = new RackMetaData();

        rubyAppMetaData.setRoot( this.root );

        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();

        RubyRuntimeMetaData originalRuntimeMD = new RubyRuntimeMetaData();
        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, originalRuntimeMD );
        rubyAppMetaData.attachTo( unit );
        rackAppMetaData.attachTo( unit );

        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
View Full Code Here

        assertEquals( RubyRuntimeMetaData.RuntimeType.RACK, runtimeMetaData.getRuntimeType() );
    }

    @Test
    public void testWithExistingTypedRubyRuntimeMD() throws Exception {
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name" );
        RackMetaData rackAppMetaData = new RackMetaData();

        rubyAppMetaData.setRoot( this.root );
       
        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();

        RubyRuntimeMetaData originalRuntimeMD = new RubyRuntimeMetaData();
        originalRuntimeMD.setRuntimeType( RubyRuntimeMetaData.RuntimeType.BARE );

        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, originalRuntimeMD );
        rubyAppMetaData.attachTo( unit );
        rackAppMetaData.attachTo( unit );

        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
View Full Code Here

    }

    @Test
    public void testHappy() throws Exception {
        environment.put( "SOME_VAR", "gassy" );
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");

        rubyAppMetaData.setRoot( this.root );
        rubyAppMetaData.setEnvironmentVariables( environment );

        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        DeploymentUnit unit = phaseContext.getMockDeploymentUnit();

        rubyAppMetaData.attachTo( unit );
               
        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
        assertNotNull( runtimeMetaData );
View Full Code Here

    }


    @Test
    public void testWithExistingRubyRuntimeMD() throws Exception {
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");

        rubyAppMetaData.setRoot( this.root );

        RubyRuntimeMetaData existingRuntimeMD = new RubyRuntimeMetaData();
       
        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();

        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, existingRuntimeMD );
        rubyAppMetaData.attachTo( unit );

        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
        assertNotNull( runtimeMetaData );
View Full Code Here

    }


    @Test
    public void testWithExistingTypedRubyRuntimeMD() throws Exception {
        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");

        rubyAppMetaData.setRoot( this.root );

        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();
       
        RubyRuntimeMetaData existingRuntimeMD = new RubyRuntimeMetaData();
        existingRuntimeMD.setRuntimeType( RubyRuntimeMetaData.RuntimeType.RACK );

        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, existingRuntimeMD );
        rubyAppMetaData.attachTo( unit );
       
        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
        assertNotNull( runtimeMetaData );
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.