[sikuli] 195/385: added a module for JRuby support (first step script runner)

Gilles Filippini pini at moszumanska.debian.org
Sun Jun 29 19:26:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to tag upstream/1.1.0_beta1
in repository sikuli.

commit cd0c8a8b12fe2edb6ae906a122240740fc54f890
Author: Raimund Hocke <info at its-me-raiman.de>
Date:   Fri Feb 7 13:52:04 2014 +0100

    added a module for JRuby support (first step script runner)
---
 .../services/org.sikuli.basics.IScriptRunner       |  1 +
 JRuby/README.md                                    |  5 ++
 JRuby/pom.xml                                      | 42 ++++++++++
 .../src/main/java/org/sikuli/JRuby/IDESupport.java | 14 ++++
 .../org/sikuli/scriptrunner/JRubyScriptRunner.java | 89 ++++++++++++++++++++++
 pom.xml                                            |  1 +
 6 files changed, 152 insertions(+)

diff --git a/Basics/src/main/resources/META-INF/services/org.sikuli.basics.IScriptRunner b/Basics/src/main/resources/META-INF/services/org.sikuli.basics.IScriptRunner
index a41d81b..f391804 100644
--- a/Basics/src/main/resources/META-INF/services/org.sikuli.basics.IScriptRunner
+++ b/Basics/src/main/resources/META-INF/services/org.sikuli.basics.IScriptRunner
@@ -1 +1,2 @@
 org.sikuli.scriptrunner.JythonScriptRunner
+org.sikuli.scriptrunner.JRubyScriptRunner
diff --git a/JRuby/README.md b/JRuby/README.md
new file mode 100644
index 0000000..341697b
--- /dev/null
+++ b/JRuby/README.md
@@ -0,0 +1,5 @@
+Sikuli JRuby 2014 (version 1.1.x)
+===
+
+Implements the JRuby support for the IDE and for running scripts using JRuby as scripting language.<br />
+(contained in package sikulix.jar)
diff --git a/JRuby/pom.xml b/JRuby/pom.xml
new file mode 100755
index 0000000..1ea31dc
--- /dev/null
+++ b/JRuby/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  
+  <!--
+  * Copyright 2010-2014, Sikuli.org
+  * Released under the MIT License.
+  *
+  * xxx, RaiMan 2014
+  -->
+
+	<parent>
+		<groupId>org.sikuli</groupId>
+		<artifactId>SikuliX-Project</artifactId>
+		<version>1.1.0</version>
+		<relativePath>../</relativePath>
+	</parent>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.sikuli</groupId>
+  <artifactId>SikuliX-JRuby</artifactId>
+  <name>SikuliX-JRuby</name>
+  <version>1.1.0</version>
+
+  <developers>
+    <developer>
+      <id>xxx</id>
+      <name>yyy</name>
+      <email>zzz at web.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.sikuli</groupId>
+      <artifactId>SikuliX-Basics</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/JRuby/src/main/java/org/sikuli/JRuby/IDESupport.java b/JRuby/src/main/java/org/sikuli/JRuby/IDESupport.java
new file mode 100644
index 0000000..931dc79
--- /dev/null
+++ b/JRuby/src/main/java/org/sikuli/JRuby/IDESupport.java
@@ -0,0 +1,14 @@
+/*
+ * Copyright 2010-2013, Sikuli.org
+ * Released under the MIT License.
+ *
+ * added RaiMan 2013
+ */
+package org.sikuli.jython;
+
+/**
+ * all methods from/for IDE, that are Python specific
+ */
+public class IDESupport {
+  
+}
diff --git a/JRuby/src/main/java/org/sikuli/scriptrunner/JRubyScriptRunner.java b/JRuby/src/main/java/org/sikuli/scriptrunner/JRubyScriptRunner.java
new file mode 100644
index 0000000..a76b8bf
--- /dev/null
+++ b/JRuby/src/main/java/org/sikuli/scriptrunner/JRubyScriptRunner.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010-2014, Sikuli.org
+ * Released under the MIT License.
+ *
+ * WhoIsWho 2014
+ */
+package org.sikuli.scriptrunner;
+
+import java.io.File;
+import org.sikuli.basics.Debug;
+import org.sikuli.basics.IScriptRunner;
+
+public class JRubyScriptRunner implements IScriptRunner {
+
+  //<editor-fold defaultstate="collapsed" desc="new logging concept">
+  private static final String me = "JRubyScriptRunner: ";
+  private int lvl = 3;
+
+  private void log(int level, String message, Object... args) {
+    Debug.logx(level, level < 0 ? "error" : "debug",
+            me + message, args);
+  }
+  //</editor-fold>
+
+	@Override
+	public void init(String[] args) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public int runScript(File scriptfile, File imagedirectory, String[] scriptArgs, String[] forIDE) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public int runTest(File scriptfile, File imagedirectory, String[] scriptArgs, String[] forIDE) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public int runInteractive(String[] scriptArgs) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public String getCommandLineHelp() {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public String getInteractiveHelp() {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public String getName() {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public String[] getFileEndings() {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public String hasFileEnding(String ending) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public void close() {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public boolean doSomethingSpecial(String action, Object[] args) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public void execBefore(String[] stmts) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+
+	@Override
+	public void execAfter(String[] stmts) {
+		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+	}
+}
diff --git a/pom.xml b/pom.xml
index 2d49173..6fa6bc7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -224,6 +224,7 @@
 		<module>Natives</module>
 		<module>Basics</module>
 		<module>Jython</module>
+		<module>JRuby</module>
 		<module>API</module>
 		<module>IDE</module>
 		<module>MacApp</module>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git



More information about the pkg-java-commits mailing list