本文整理汇总了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()));
}
}
示例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");
}
}
示例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;
}
示例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");
}
示例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");
}
示例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;
}
示例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;
}
示例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");
}
示例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");
}
示例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");
}
示例11: setUp
import org.jruby.embed.PathType; //导入依赖的package包/类
@Before public void setUp() {
scriptingContainer = new ScriptingContainer();
scriptingContainer.runScriptlet(PathType.CLASSPATH, "enumerable_with_close.rb");
}