当前位置: 首页>>代码示例>>Java>>正文


Java PathType类代码示例

本文整理汇总了Java中org.jruby.embed.PathType的典型用法代码示例。如果您正苦于以下问题:Java PathType类的具体用法?Java PathType怎么用?Java PathType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PathType类属于org.jruby.embed包,在下文中一共展示了PathType类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import org.jruby.embed.PathType; //导入依赖的package包/类
public void setup() throws CalabashException {
    try {
        addSystemCommandHack();
        createDebugCertificateIfMissing();
        String jrubyClasspath = getClasspathFor("jruby");
        addContainerEnv("CLASSPATH", jrubyClasspath);
        container.runScriptlet(format("Dir.chdir '%s'", apk.getParent()));

        container.put(ARGV, new String[]{"resign", apk.getAbsolutePath()});
        String calabashAndroid = new File(getCalabashGemDirectory(), "calabash-android").getAbsolutePath();
        container.runScriptlet(PathType.ABSOLUTE, calabashAndroid);
        info("Done signing the app");

        container.put(ARGV, new String[]{"build", apk.getAbsolutePath()});
        container.runScriptlet(PathType.ABSOLUTE, calabashAndroid);
        info("App build complete");
    } catch (Exception e) {
        error("Failed to setup calabash for project: %s", e, apk.getAbsolutePath());
        throw new CalabashException(format("Failed to setup calabash. %s", e.getMessage()));
    }
}
 
开发者ID:vishnukarthikl,项目名称:calabash-android-java,代码行数:22,代码来源:CalabashWrapper.java

示例2: testRunShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunShellTests() throws IOException {
  try {
    // Start only GroupShellTest
    System.setProperty("shell.test", "Hbase::RSGroupShellTest");
    jruby.runScriptlet(PathType.ABSOLUTE,
        basePath + "/src/test/ruby/tests_runner.rb");
  } finally {
    System.clearProperty("shell.test");
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:12,代码来源:TestShellRSGroups.java

示例3: createCache

import org.jruby.embed.PathType; //导入依赖的package包/类
private Properties createCache(File configFile, File cacheFile) {
    ScriptingContainer container = new ScriptingContainer(LocalVariableBehavior.PERSISTENT);
    container.runScriptlet(PathType.ABSOLUTE, configFile.getAbsolutePath());

    @SuppressWarnings("unchecked")
    BiVariableMap<String, Object> varMap = container.getVarMap();
    @SuppressWarnings("unchecked")
    Set<Map.Entry<String, Object>> entrySet = varMap.entrySet();

    Properties props = new Properties();
    for (Map.Entry<String, Object> en : entrySet) {
        if (en.getValue() instanceof String) {
            props.setProperty(en.getKey(), (String) en.getValue());
        }
    }

    //save
    FileOutputStream outputStream = null;
    try {
        outputStream = new FileOutputStream(cacheFile);
        props.store(outputStream, "Compass config cache");
    } catch (IOException e) {
        throw new RuntimeException(e);
    } finally {
        IOUtils.closeQuietly(outputStream);
    }

    return props;
}
 
开发者ID:opoo,项目名称:opoopress,代码行数:30,代码来源:CompassBuilder.java

示例4: testRunShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunShellTests() throws IOException {
  System.setProperty("shell.test.exclude", "replication_admin_test.rb");
  // Start all ruby tests
  jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:TestShell.java

示例5: testRunShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunShellTests() throws IOException {
  // Start all ruby tests
  jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:6,代码来源:TestShell.java

示例6: compileToObject

import org.jruby.embed.PathType; //导入依赖的package包/类
Object compileToObject(File file, Class<?> clazz) {
    String className = file.getName().replaceAll("\\.rb", "");
    ruby.runScriptlet(PathType.RELATIVE, file.toString());
    Object receiver = ruby.runScriptlet(className + ".new()");
    return receiver;
}
 
开发者ID:necr0potenc3,项目名称:uosl,代码行数:7,代码来源:ScriptManager.java

示例7: compileToClass

import org.jruby.embed.PathType; //导入依赖的package包/类
RubyClass compileToClass(File file, Class<?> clazz) {
    String className = file.getName().replaceAll("\\.rb", "");
    ruby.runScriptlet(PathType.RELATIVE, file.toString());
    Object receiver = ruby.runScriptlet(className);
    return (RubyClass) receiver;
}
 
开发者ID:necr0potenc3,项目名称:uosl,代码行数:7,代码来源:ScriptManager.java

示例8: testRunShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunShellTests() throws IOException {
  System.setProperty("shell.test.exclude", "replication_admin_test.rb,rsgroup_shell_test.rb");
  // Start all ruby tests
  jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
}
 
开发者ID:apache,项目名称:hbase,代码行数:7,代码来源:TestShell.java

示例9: testRunNoClusterShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunNoClusterShellTests() throws IOException {
  // Start ruby tests without cluster
  jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/no_cluster_tests_runner.rb");
}
 
开发者ID:apache,项目名称:hbase,代码行数:6,代码来源:TestShellNoCluster.java

示例10: testRunShellTests

import org.jruby.embed.PathType; //导入依赖的package包/类
@Test
public void testRunShellTests() throws IOException {
  System.setProperty("shell.test.include", "replication_admin_test.rb");
  // Start all ruby tests
  jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
}
 
开发者ID:apache,项目名称:hbase,代码行数:7,代码来源:TestReplicationShell.java

示例11: setUp

import org.jruby.embed.PathType; //导入依赖的package包/类
@Before public void setUp() {
  scriptingContainer = new ScriptingContainer();
  scriptingContainer.runScriptlet(PathType.CLASSPATH, "enumerable_with_close.rb");
}
 
开发者ID:square,项目名称:rack-servlet,代码行数:5,代码来源:JRubyRackBodyIteratorTest.java


注:本文中的org.jruby.embed.PathType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。