nutella_framework 0.4.5 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +14 -15
  3. data/VERSION +1 -1
  4. data/framework_components/beacon-cloud-bot/README.md +27 -0
  5. data/framework_components/beacon-cloud-bot/beacon_cloud_bot.rb +154 -0
  6. data/framework_components/beacon-cloud-bot/nutella.json +6 -0
  7. data/framework_components/beacon-cloud-bot/startup +4 -0
  8. data/framework_components/beacon-cloud-interface/LICENSE +21 -0
  9. data/framework_components/beacon-cloud-interface/Readme.md +0 -0
  10. data/framework_components/beacon-cloud-interface/bower.json +29 -0
  11. data/framework_components/beacon-cloud-interface/bower_components/bower-mqttws/.bower.json +23 -0
  12. data/framework_components/beacon-cloud-interface/bower_components/bower-mqttws/bower.json +14 -0
  13. data/framework_components/beacon-cloud-interface/bower_components/bower-mqttws/mqttws31.js +2081 -0
  14. data/framework_components/beacon-cloud-interface/bower_components/bower-mqttws/readme.md +4 -0
  15. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/.bower.json +37 -0
  16. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/LICENSE +21 -0
  17. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/README.md +15 -0
  18. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/bower.json +28 -0
  19. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +23 -0
  20. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +52 -0
  21. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +14 -0
  22. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +38 -0
  23. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/nutella_lib.js +789 -0
  24. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/package.json +30 -0
  25. data/framework_components/beacon-cloud-interface/bower_components/nutella_lib/simple-js-mqtt-client.js +428 -0
  26. data/framework_components/beacon-cloud-interface/css/animation.css +17 -0
  27. data/framework_components/beacon-cloud-interface/css/cursor.css +16 -0
  28. data/framework_components/beacon-cloud-interface/css/page_layout.css +73 -0
  29. data/framework_components/beacon-cloud-interface/index.html +157 -0
  30. data/framework_components/beacon-cloud-interface/js/lib/nutella_lib.js +4039 -0
  31. data/framework_components/beacon-cloud-interface/js/react/beacon-add.js +102 -0
  32. data/framework_components/beacon-cloud-interface/js/react/beacon-table.js +73 -0
  33. data/framework_components/beacon-cloud-interface/js/react/beacon.js +97 -0
  34. data/framework_components/beacon-cloud-interface/nutella.json +6 -0
  35. data/framework_components/example_framework_web_interface/index.html +11 -2
  36. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/.npmignore +10 -0
  37. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/.travis.yml +5 -0
  38. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/LICENSE +21 -0
  39. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/README.md +27 -0
  40. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/dist/nutella_lib.js +4039 -0
  41. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/dist/nutella_lib.js.map +1 -0
  42. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/examples/browser_hello_world.html +67 -0
  43. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/examples/node_hello_world.js +51 -0
  44. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/gulpfile.js +31 -0
  45. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/package.json +41 -0
  46. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/app_core.js +19 -0
  47. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/app_core_browser.js +17 -0
  48. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/app_log.js +50 -0
  49. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/app_net.js +279 -0
  50. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/app_persist.js +20 -0
  51. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/fr_core_browser.js +17 -0
  52. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/fr_log.js +50 -0
  53. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/fr_net.js +499 -0
  54. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/nutella_i.js +74 -0
  55. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/nutella_i_browser.js +130 -0
  56. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/nutella_lib.js +91 -0
  57. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/nutella_lib_browser.js +90 -0
  58. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/run_log.js +51 -0
  59. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/run_net.js +84 -0
  60. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/run_persist.js +20 -0
  61. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/src/util/net.js +327 -0
  62. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/test/nutella.test.js +16 -0
  63. data/framework_components/example_framework_web_interface/node_modules/nutella_lib/test/runner.html +22 -0
  64. data/framework_components/example_framework_web_interface/package.json +15 -0
  65. data/framework_components/{order.json.example → order.json} +0 -0
  66. data/framework_components/runs_list_bot/{app_runs_list_bot.rb → runs_list_bot.rb} +9 -3
  67. data/framework_components/runs_list_bot/startup +1 -1
  68. data/lib/commands/meta/run_command.rb +21 -36
  69. data/lib/commands/start.rb +9 -199
  70. data/lib/commands/util/components_list.rb +68 -0
  71. data/lib/commands/util/components_starter.rb +169 -0
  72. data/nutella_framework.gemspec +109 -47
  73. data/nutella_lib/framework_net.rb +17 -13
  74. metadata +84 -106
@@ -0,0 +1,4 @@
1
+ bower-mqttws
2
+ ============
3
+
4
+ Bower package for http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git/tree/src/mqttws31.js
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "nutella_lib",
3
+ "main": "nutella_lib.js",
4
+ "version": "0.3.0",
5
+ "authors": [
6
+ "Alessandro Gnoli <tebemis@gmail.com>"
7
+ ],
8
+ "description": "Nutella library for JavaScript",
9
+ "moduleType": [
10
+ "node"
11
+ ],
12
+ "keywords": [
13
+ "nutella",
14
+ "framework"
15
+ ],
16
+ "license": "MIT",
17
+ "homepage": "https://github.com/nutella-framework/nutella_lib.js",
18
+ "ignore": [
19
+ "**/.*",
20
+ "node_modules",
21
+ "bower_components",
22
+ "test",
23
+ "tests"
24
+ ],
25
+ "dependencies": {
26
+ "bower-mqttws": "=1.0.0"
27
+ },
28
+ "_release": "0.3.0",
29
+ "_resolution": {
30
+ "type": "version",
31
+ "tag": "v0.3.0",
32
+ "commit": "f4e4c045b460b31835f122a8422c78ba4b2a32d8"
33
+ },
34
+ "_source": "git://github.com/nutella-framework/nutella_lib.js.git",
35
+ "_target": "~0.3.0",
36
+ "_originalSource": "nutella_lib"
37
+ }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 by The Board of Trustees of the University of Illinois at Chicago
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,15 @@
1
+ [![Build Status](https://travis-ci.org/nutella-framework/nutella_lib.js.svg?branch=master)](https://travis-ci.org/nutella-framework/nutella_lib.js)
2
+
3
+ # nutella library for node.js and the browser
4
+
5
+ ## Installation
6
+ On node.js do
7
+ ```
8
+ npm install nutella_lib
9
+ ```
10
+
11
+ On the browser using Bower do
12
+ ```
13
+ bower install nutella_lib
14
+ ```
15
+ Make sure to include all the dependencies, see examples folder.
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "nutella_lib",
3
+ "main": "nutella_lib.js",
4
+ "version": "0.3.0",
5
+ "authors": [
6
+ "Alessandro Gnoli <tebemis@gmail.com>"
7
+ ],
8
+ "description": "Nutella library for JavaScript",
9
+ "moduleType": [
10
+ "node"
11
+ ],
12
+ "keywords": [
13
+ "nutella",
14
+ "framework"
15
+ ],
16
+ "license": "MIT",
17
+ "homepage": "https://github.com/nutella-framework/nutella_lib.js",
18
+ "ignore": [
19
+ "**/.*",
20
+ "node_modules",
21
+ "bower_components",
22
+ "test",
23
+ "tests"
24
+ ],
25
+ "dependencies": {
26
+ "bower-mqttws": "=1.0.0"
27
+ }
28
+ }
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head lang="en">
4
+ <meta charset="UTF-8">
5
+ <title>Simple MQTT client hello</title>
6
+ </head>
7
+ <body>
8
+
9
+ <script src="bower_components/bower-mqttws/mqttws31.js"></script>
10
+ <script src="../../simple-js-mqtt-client.js"></script>
11
+ <script>
12
+ var client = MQTT.connect('ltg.evl.uic.edu');
13
+ client.subscribe('demo1', function(message){
14
+ console.log("First subscription: " + message);
15
+ });
16
+ var sscb = function(message){
17
+ console.log("Second subscription: " + message);
18
+ client.unsubscribe('demo1', sscb);
19
+ };
20
+ client.subscribe('demo1', sscb);
21
+ </script>
22
+ </body>
23
+ </html>
@@ -0,0 +1,52 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head lang="en">
4
+ <meta charset="UTF-8">
5
+ <title>Nutella hello world</title>
6
+ </head>
7
+ <body>
8
+
9
+ <script src="bower_components/bower-mqttws/mqttws31.js"></script>
10
+ <script src="../../nutella_lib.js"></script>
11
+ <script>
12
+
13
+ // // Initialize nutella
14
+ // var nutella = NUTELLA.init('my_run_id', 'ltg.evl.uic.edu', 'demo_browser_interface');
15
+
16
+ // // Subscribe to a channel
17
+ // nutella.net.subscribe("demo1", function(message, c_id, r_id) {
18
+ // console.log('Received "' + JSON.stringify(message) + '" from ' + c_id + '/' + r_id);
19
+ // nutella.net.unsubscribe('demo1');
20
+ // });
21
+
22
+ // // Wildcard subscribe
23
+ // nutella.net.subscribe("demo2/#", function(message, channel, c_id, r_id) {
24
+ // console.log('Received "' + JSON.stringify(message) + '" on channel ' + channel + ' from ' + c_id + '/' + r_id);
25
+ // });
26
+
27
+ // // Publish some stuff
28
+ // nutella.net.publish('demo1');
29
+ // nutella.net.publish('demo1', 'just a string');
30
+ // nutella.net.publish('demo1', {a: 'proper', key: 'value'});
31
+ // nutella.setResourceId('a_particular_resource');
32
+ // nutella.net.publish('demo1');
33
+ // nutella.net.publish('demo1', 'just a string');
34
+ // nutella.net.publish('demo1', {a: 'proper', key: 'value'});
35
+
36
+ // // Handle requests
37
+ // nutella.net.handle_requests('demo1', function(message, component_id, resource_id) {
38
+ // return 'this is the returned value';
39
+ // });
40
+ //
41
+ // // Perform a couple requests
42
+ // nutella.net.request('demo1', function(response) {
43
+ // console.log("This is the response to empty request (GET)");
44
+ // });
45
+ //
46
+ // nutella.net.request('demo1', 'my_request', function(response) {
47
+ // console.log("This is the response to non-empty request");
48
+ // });
49
+
50
+ </script>
51
+ </body>
52
+ </html>
@@ -0,0 +1,14 @@
1
+ var mqtt = require('../../simple-js-mqtt-client');
2
+
3
+ var client = mqtt.connect('ltg.evl.uic.edu');
4
+
5
+ client.subscribe('demo1', function(message) {
6
+ console.log("First subscription: " + message);
7
+ });
8
+
9
+ var sscb = function(message){
10
+ console.log("Second subscription: " + message);
11
+ client.publish('demo2', "I'm gonna die")
12
+ client.unsubscribe('demo1', sscb);
13
+ };
14
+ client.subscribe('demo1', sscb);
@@ -0,0 +1,38 @@
1
+ var NUTELLA = require('../../nutella_lib.js')
2
+
3
+ // Initialize nutella
4
+ //var nutella = NUTELLA.init('my_run_id', 'ltg.evl.uic.edu', 'demo_browser_interface');
5
+
6
+ // // Subscribe to a channel
7
+ // nutella.net.subscribe("demo1", function(message, c_id, r_id) {
8
+ // console.log('Received "' + JSON.stringify(message) + '" from ' + c_id + '/' + r_id);
9
+ // nutella.net.unsubscribe('demo1');
10
+ // });
11
+
12
+ // // Wildcard subscribe
13
+ // nutella.net.subscribe("demo2/#", function(message, channel, c_id, r_id) {
14
+ // console.log('Received "' + JSON.stringify(message) + '" on channel ' + channel + ' from ' + c_id + '/' + r_id);
15
+ // });
16
+
17
+ // // Publish some stuff
18
+ // nutella.net.publish('demo1');
19
+ // nutella.net.publish('demo1', 'just a string');
20
+ // nutella.net.publish('demo1', {a: 'proper', key: 'value'});
21
+ // nutella.setResourceId('a_particular_resource');
22
+ // nutella.net.publish('demo1');
23
+ // nutella.net.publish('demo1', 'just a string');
24
+ // nutella.net.publish('demo1', {a: 'proper', key: 'value'});
25
+
26
+ // Handle requests
27
+ //nutella.net.handle_requests('demo1', function(message, component_id, resource_id) {
28
+ // return 'this is the returned value';
29
+ //});
30
+ //
31
+ //// Perform a couple requests
32
+ //nutella.net.request('demo1', function(response) {
33
+ // console.log("This is the response to empty request (GET)");
34
+ //});
35
+ //
36
+ //nutella.net.request('demo1', 'my_request', function(response) {
37
+ // console.log("This is the response to non-empty request");
38
+ //});