ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: #ignite-961: bind ignite nodejs to ignite.
Date Thu, 25 Jun 2015 14:45:40 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-961 57f0ac3bc -> 04459d27e


#ignite-961: bind ignite nodejs to ignite.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/04459d27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/04459d27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/04459d27

Branch: refs/heads/ignite-961
Commit: 04459d27e495e2ae3d11962eb47f4ad65d172d03
Parents: 57f0ac3
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Jun 25 17:45:31 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Jun 25 17:45:31 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/scripting/IgniteJS.java | 31 --------------------
 .../scripting/IgniteScriptProcessor.java        |  2 +-
 modules/nodejs/src/test/js/test-compute.js      |  4 +--
 3 files changed, 3 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/04459d27/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteJS.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteJS.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteJS.java
deleted file mode 100644
index dd7624c..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteJS.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.scripting;
-
-/**
- * Ignite JS binding.
- */
-public class IgniteJS {
-    public String hello() {
-        String str = "HELLO HAPPY WORLD!!!";
-
-        System.out.println(str);
-
-        return str;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/04459d27/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
index d9fa8d7..e82da91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
@@ -50,7 +50,7 @@ public class IgniteScriptProcessor extends GridProcessorAdapter {
 
         Bindings bind = jsEngine.createBindings();
 
-        bind.put("ignite", new IgniteJS());
+        bind.put("ignite", ctx.grid());
 
         jsEngine.setBindings(bind, ENGINE_SCOPE);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/04459d27/modules/nodejs/src/test/js/test-compute.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-compute.js b/modules/nodejs/src/test/js/test-compute.js
index c069d97..6ab738c 100644
--- a/modules/nodejs/src/test/js/test-compute.js
+++ b/modules/nodejs/src/test/js/test-compute.js
@@ -47,12 +47,12 @@ function computeRunScript(ignite, error) {
     var comp = ignite.compute();
 
     var f = function (args) {
-        return args + " " + ignite.hello();
+        return args + " " + ignite.name();
     }
 
     function onEnd(err, res) {
         assert(err == null);
-        assert(res.indexOf("HAPPY") !== -1, "Incorrect result message. [mes=" + res + "].");
+        assert(res.indexOf("NodeJsComputeSelfTest") !== -1, "Incorrect result message. [mes="
+ res + "].");
         assert(res.indexOf("GridGain") !== -1, "Incorrect result message. [mes=" + res +
"].");
 
         TestUtils.testDone();


Mime
View raw message