Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove attempt to get ruby in scripting, problems embedding it...

  • Loading branch information...
commit 503b023eaccb820491b9dc3fc20594562bf57c35 1 parent e0488fa
Shay Banon kimchy authored
1  .idea/modules.xml
@@ -10,7 +10,6 @@
10 10 <module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin-lang-groovy.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin-lang-groovy.iml" />
11 11 <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-lang-javascript.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-lang-javascript.iml" />
12 12 <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-lang-python.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-lang-python.iml" />
13   - <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-lang-ruby.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-lang-ruby.iml" />
14 13 <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-mapper-attachments.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-mapper-attachments.iml" />
15 14 <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-river-couchdb.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-river-couchdb.iml" />
16 15 <module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-river-rabbitmq.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-river-rabbitmq.iml" />
29 .idea/modules/plugin-lang-ruby.iml
... ... @@ -1,29 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<module type="JAVA_MODULE" version="4">
3   - <component name="NewModuleRootManager" inherit-compiler-output="false">
4   - <output url="file://$MODULE_DIR$/../../plugins/lang/ruby/build/classes/main" />
5   - <output-test url="file://$MODULE_DIR$/../../plugins/lang/ruby/build/classes/test" />
6   - <exclude-output />
7   - <content url="file://$MODULE_DIR$/../../plugins/lang/ruby">
8   - <sourceFolder url="file://$MODULE_DIR$/../../plugins/lang/ruby/src/main/java" isTestSource="false" />
9   - <sourceFolder url="file://$MODULE_DIR$/../../plugins/lang/ruby/src/test/java" isTestSource="true" />
10   - <excludeFolder url="file://$MODULE_DIR$/../../plugins/lang/ruby/build" />
11   - </content>
12   - <orderEntry type="inheritedJdk" />
13   - <orderEntry type="sourceFolder" forTests="false" />
14   - <orderEntry type="module" module-name="elasticsearch" />
15   - <orderEntry type="module-library">
16   - <library name="jruby">
17   - <CLASSES>
18   - <root url="jar://$GRADLE_REPOSITORY$/org.jruby/jruby-complete/jars/jruby-complete-1.5.3.jar!/" />
19   - </CLASSES>
20   - <JAVADOC />
21   - <SOURCES />
22   - </library>
23   - </orderEntry>
24   - <orderEntry type="module" module-name="test-testng" scope="TEST" />
25   - <orderEntry type="library" scope="TEST" name="testng" level="project" />
26   - <orderEntry type="library" scope="TEST" name="hamcrest" level="project" />
27   - </component>
28   -</module>
29   -
145 plugins/lang/ruby/build.gradle
... ... @@ -1,145 +0,0 @@
1   -dependsOn(':elasticsearch')
2   -
3   -apply plugin: 'java'
4   -apply plugin: 'maven'
5   -
6   -archivesBaseName = "elasticsearch-lang-ruby"
7   -
8   -explodedDistDir = new File(distsDir, 'exploded')
9   -
10   -configurations.compile.transitive = true
11   -configurations.testCompile.transitive = true
12   -
13   -// no need to use the resource dir
14   -sourceSets.main.resources.srcDirs 'src/main/java'
15   -sourceSets.test.resources.srcDirs 'src/test/java'
16   -
17   -// add the source files to the dist jar
18   -//jar {
19   -// from sourceSets.main.allSource
20   -//}
21   -
22   -configurations {
23   - dists
24   - distLib {
25   - visible = false
26   - transitive = false
27   - }
28   -}
29   -
30   -dependencies {
31   - compile project(':elasticsearch')
32   -
33   - compile('org.jruby:jruby-complete:1.5.3')
34   - distLib('org.jruby:jruby-complete:1.5.3') { transitive = false }
35   -
36   - testCompile project(':test-testng')
37   - testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
38   - testCompile 'org.hamcrest:hamcrest-all:1.1'
39   -}
40   -
41   -test {
42   - useTestNG()
43   - jmvArgs = ["-ea", "-Xmx1024m"]
44   - suiteName = project.name
45   - listeners = ["org.elasticsearch.util.testng.Listeners"]
46   - systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
47   -}
48   -
49   -task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
50   - [explodedDistDir]*.mkdirs()
51   -
52   - copy {
53   - from configurations.distLib
54   - into explodedDistDir
55   - }
56   -
57   - // remove elasticsearch files (compile above adds the elasticsearch one)
58   - ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*.jar") }
59   -
60   - copy {
61   - from libsDir
62   - into explodedDistDir
63   - }
64   -
65   - ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-javadoc.jar") }
66   - ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-sources.jar") }
67   -}
68   -
69   -task zip(type: Zip, dependsOn: ['explodedDist']) {
70   - from(explodedDistDir) {
71   - }
72   -}
73   -
74   -task release(dependsOn: [zip]) << {
75   - ant.delete(dir: explodedDistDir)
76   - copy {
77   - from distsDir
78   - into(new File(rootProject.distsDir, "plugins"))
79   - }
80   -}
81   -
82   -configurations {
83   - deployerJars
84   -}
85   -
86   -dependencies {
87   - deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
88   -}
89   -
90   -task sourcesJar(type: Jar, dependsOn: classes) {
91   - classifier = 'sources'
92   - from sourceSets.main.allSource
93   -}
94   -
95   -task javadocJar(type: Jar, dependsOn: javadoc) {
96   - classifier = 'javadoc'
97   - from javadoc.destinationDir
98   -}
99   -
100   -jar {
101   -// from sourceSets.main.allJava
102   - manifest {
103   - attributes("Implementation-Title": "ElasticSearch", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)
104   - }
105   -}
106   -
107   -
108   -artifacts {
109   - archives sourcesJar
110   - archives javadocJar
111   -}
112   -
113   -uploadArchives {
114   - repositories.mavenDeployer {
115   - configuration = configurations.deployerJars
116   - repository(url: rootProject.mavenRepoUrl) {
117   - authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
118   - }
119   - snapshotRepository(url: rootProject.mavenSnapshotRepoUrl) {
120   - authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
121   - }
122   -
123   - pom.project {
124   - inceptionYear '2009'
125   - name 'elasticsearch-plugins-lang-ruby'
126   - description 'Ruby Plugin for ElasticSearch'
127   - licenses {
128   - license {
129   - name 'The Apache Software License, Version 2.0'
130   - url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
131   - distribution 'repo'
132   - }
133   - }
134   - scm {
135   - connection 'git://github.com/elasticsearch/elasticsearch.git'
136   - developerConnection 'git@github.com:elasticsearch/elasticsearch.git'
137   - url 'http://github.com/elasticsearch/elasticsearch'
138   - }
139   - }
140   -
141   - pom.whenConfigured {pom ->
142   - pom.dependencies = pom.dependencies.findAll {dep -> dep.scope != 'test' } // removes the test scoped ones
143   - }
144   - }
145   -}
1  plugins/lang/ruby/src/main/java/es-plugin.properties
... ... @@ -1 +0,0 @@
1   -plugin=org.elasticsearch.plugin.ruby.RubyPlugin
44 plugins/lang/ruby/src/main/java/org/elasticsearch/plugin/ruby/RubyPlugin.java
... ... @@ -1,44 +0,0 @@
1   -/*
2   - * Licensed to Elastic Search and Shay Banon under one
3   - * or more contributor license agreements. See the NOTICE file
4   - * distributed with this work for additional information
5   - * regarding copyright ownership. Elastic Search licenses this
6   - * file to you under the Apache License, Version 2.0 (the
7   - * "License"); you may not use this file except in compliance
8   - * with the License. You may obtain a copy of the License at
9   - *
10   - * http://www.apache.org/licenses/LICENSE-2.0
11   - *
12   - * Unless required by applicable law or agreed to in writing,
13   - * software distributed under the License is distributed on an
14   - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   - * KIND, either express or implied. See the License for the
16   - * specific language governing permissions and limitations
17   - * under the License.
18   - */
19   -
20   -package org.elasticsearch.plugin.ruby;
21   -
22   -import org.elasticsearch.common.inject.Module;
23   -import org.elasticsearch.plugins.AbstractPlugin;
24   -import org.elasticsearch.script.ScriptModule;
25   -
26   -/**
27   - * @author kimchy (shay.banon)
28   - */
29   -public class RubyPlugin extends AbstractPlugin {
30   -
31   - @Override public String name() {
32   - return "lang-ruby";
33   - }
34   -
35   - @Override public String description() {
36   - return "Ruby plugin allowing to add javascript scripting support";
37   - }
38   -
39   - @Override public void processModule(Module module) {
40   - if (module instanceof ScriptModule) {
41   -// ((ScriptModule) module).addScriptEngine(JavaScriptScriptEngineService.class);
42   - }
43   - }
44   -}
71 plugins/lang/ruby/src/main/java/org/elasticsearch/script/ruby/RubyScriptEngineService.java
... ... @@ -1,71 +0,0 @@
1   -/*
2   - * Licensed to Elastic Search and Shay Banon under one
3   - * or more contributor license agreements. See the NOTICE file
4   - * distributed with this work for additional information
5   - * regarding copyright ownership. Elastic Search licenses this
6   - * file to you under the Apache License, Version 2.0 (the
7   - * "License"); you may not use this file except in compliance
8   - * with the License. You may obtain a copy of the License at
9   - *
10   - * http://www.apache.org/licenses/LICENSE-2.0
11   - *
12   - * Unless required by applicable law or agreed to in writing,
13   - * software distributed under the License is distributed on an
14   - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   - * KIND, either express or implied. See the License for the
16   - * specific language governing permissions and limitations
17   - * under the License.
18   - */
19   -
20   -package org.elasticsearch.script.ruby;
21   -
22   -import org.elasticsearch.common.component.AbstractComponent;
23   -import org.elasticsearch.common.inject.Inject;
24   -import org.elasticsearch.common.settings.Settings;
25   -import org.elasticsearch.script.ExecutableScript;
26   -import org.elasticsearch.script.ScriptEngineService;
27   -import org.jruby.embed.EmbedEvalUnit;
28   -import org.jruby.embed.ScriptingContainer;
29   -
30   -import java.util.Map;
31   -
32   -/**
33   - * @author kimchy (shay.banon)
34   - */
35   -// Need to figure out how to execute compiled scripts in the most optimized manner (passing paramters to them).
36   -public class RubyScriptEngineService extends AbstractComponent implements ScriptEngineService {
37   -
38   - private final ScriptingContainer container;
39   -
40   - @Inject public RubyScriptEngineService(Settings settings) {
41   - super(settings);
42   -
43   - this.container = new ScriptingContainer();
44   - container.setClassLoader(settings.getClassLoader());
45   - }
46   -
47   - @Override public String[] types() {
48   - return new String[]{"ruby"};
49   - }
50   -
51   - @Override public Object compile(String script) {
52   - return container.parse(script);
53   - }
54   -
55   - @Override public ExecutableScript executable(Object compiledScript, Map<String, Object> vars) {
56   - return null; //To change body of implemented methods use File | Settings | File Templates.
57   - }
58   -
59   - @Override public Object execute(Object compiledScript, Map<String, Object> vars) {
60   - EmbedEvalUnit unit = (EmbedEvalUnit) compiledScript;
61   - return null; //To change body of implemented methods use File | Settings | File Templates.
62   - }
63   -
64   - @Override public Object unwrap(Object value) {
65   - return null;
66   - }
67   -
68   - @Override public void close() {
69   - container.clear();
70   - }
71   -}
1  settings.gradle
@@ -16,7 +16,6 @@ include 'plugins-mapper-attachments'
16 16 include 'plugins-lang-groovy'
17 17 include 'plugins-lang-javascript'
18 18 include 'plugins-lang-python'
19   -//include 'plugins-lang-ruby' #disabled for now ...
20 19
21 20 include 'plugins-transport-memcached'
22 21 include 'plugins-transport-thrift'

0 comments on commit 503b023

Please sign in to comment.
Something went wrong with that request. Please try again.