Package com.squareup.rack.jruby

Examples of com.squareup.rack.jruby.JRubyRackApplication


    @Override protected void configureServlets() {
      serve("/*").with(RackServlet.class);
    }

    @Provides @Singleton RackServlet provideRackServlet(IRubyObject application) {
      return new RackServlet(new JRubyRackApplication(application));
    }
View Full Code Here


    System.setProperty(DEFAULT_LOG_LEVEL_KEY, "WARN");

    // Build the Rack servlet.
    ScriptingContainer ruby = new ScriptingContainer();
    IRubyObject application = ruby.parse(CLASSPATH, "application.rb").run();
    RackServlet servlet = new RackServlet(new JRubyRackApplication(application));

    server = new ExampleServer(servlet, "/*");
    server.start();
    client = new DefaultHttpClient();
    localhost = new HttpHost("localhost", server.getPort());
View Full Code Here

    // Mount the Rack application defined in the config.ru file on the classpath at /rack.
    environment.addServlet(createRackServlet(), "/rack/*");
  }

  private RackServlet createRackServlet() {
    return new RackServlet(new JRubyRackApplication(createApplication()));
  }
View Full Code Here

    System.setProperty(DEFAULT_LOG_LEVEL_KEY, "WARN");

    // Build the Rack servlet.
    ScriptingContainer ruby = new ScriptingContainer();
    IRubyObject application = ruby.parse(CLASSPATH, "application.rb").run();
    RackServlet servlet = new RackServlet(new JRubyRackApplication(application));

    server = new ExampleServer(servlet, "/*");
    server.start();
    client = new DefaultHttpClient();
    localhost = new HttpHost("localhost", server.getPort());
View Full Code Here

    System.setProperty(DEFAULT_LOG_LEVEL_KEY, "WARN");

    // Build the Rack servlet.
    ScriptingContainer ruby = new ScriptingContainer();
    IRubyObject application = ruby.parse("lambda { |env| [200, {}, ['Hello, World!']] }").run();
    RackServlet servlet = new RackServlet(new JRubyRackApplication(application));

    server = new ExampleServer(servlet, "/*");
    server.start();
    client = new DefaultHttpClient();
    localhost = new HttpHost("localhost", server.getPort());
View Full Code Here

TOP

Related Classes of com.squareup.rack.jruby.JRubyRackApplication

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.