nutella_framework 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/framework_components/order.json +2 -1
- data/framework_components/server_bot/server_bot.rb +28 -0
- data/framework_components/server_bot/startup +5 -0
- data/nutella_framework.gemspec +5 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35cd11b880eb0d47cd33a9f53c72281c798e7c16c0ec5a80e41aa96fa95ba3e7
|
4
|
+
data.tar.gz: 67e69a1573130c3fb88e6d46ec6af422bde826b35a8c6551f7c4244c5c036db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd2bd8e585fe9f8521a2d82c14e1d09b067bdfd38d0c4e03e417b1d4c5052b16f9fc63753e4b96e4af01b7250fbeaa3e1d35877f7fb16016e3e9decab3d6ed7
|
7
|
+
data.tar.gz: 3a92719c8535c6cf6ce477e142a40c341ababd5b5f9aa5eb956933af7f60b8d7c3a5f9524439538228488b3e9a25f07656ebb68a94c8b79c25e54a64defbe0e7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../../lib/nutella_framework'
|
2
|
+
require_relative '../../nutella_lib/framework_core'
|
3
|
+
|
4
|
+
# This bot allows you to execute nutella commands remotely
|
5
|
+
# You can submit payloads like this one:
|
6
|
+
# - { "command": "start", "params": ["run-1"]}
|
7
|
+
# or this one:
|
8
|
+
# - { "command": "stop", "params": ["run-1"]}
|
9
|
+
|
10
|
+
# Initialize this bot as framework component
|
11
|
+
nutella.f.init(Nutella.config['broker'], 'nutella_server_bot')
|
12
|
+
|
13
|
+
# Responds to nutella commands
|
14
|
+
nutella.f.net.handle_requests_on_all_runs('execute_command', lambda do |req, app_id, run_id, from|
|
15
|
+
# Process request
|
16
|
+
req_hash = JSON.parse req
|
17
|
+
params = req_hash['params'].dup
|
18
|
+
# Change Directory
|
19
|
+
Dir.chdir(Nutella.runlist.app_path(app_id)) do
|
20
|
+
# Execute command
|
21
|
+
Nutella.execute_command req_hash['command'], req_hash['params']
|
22
|
+
end
|
23
|
+
#TODO collect command output, for now return confirmation message
|
24
|
+
"Executed command #{req_hash['command']} with parameters #{params} on #{'app_id'}"
|
25
|
+
end)
|
26
|
+
|
27
|
+
# Listen and process messages as they come
|
28
|
+
nutella.f.net.listen
|
data/nutella_framework.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: nutella_framework 0.
|
5
|
+
# stub: nutella_framework 0.9.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "nutella_framework".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.9.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Alessandro Gnoli".freeze]
|
14
|
-
s.date = "2019-03-
|
14
|
+
s.date = "2019-03-06"
|
15
15
|
s.description = "utella is a framework to create and run RoomApps".freeze
|
16
16
|
s.email = "tebemis@gmail.com".freeze
|
17
17
|
s.executables = ["nutella".freeze]
|
@@ -95,6 +95,8 @@ Gem::Specification.new do |s|
|
|
95
95
|
"framework_components/room-debugger/room_places_simulator.js",
|
96
96
|
"framework_components/runs_list_bot/runs_list_bot.rb",
|
97
97
|
"framework_components/runs_list_bot/startup",
|
98
|
+
"framework_components/server_bot/server_bot.rb",
|
99
|
+
"framework_components/server_bot/startup",
|
98
100
|
"lib/commands/broker.rb",
|
99
101
|
"lib/commands/checkup.rb",
|
100
102
|
"lib/commands/compile.rb",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutella_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Gnoli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|
@@ -338,6 +338,8 @@ files:
|
|
338
338
|
- framework_components/room-debugger/room_places_simulator.js
|
339
339
|
- framework_components/runs_list_bot/runs_list_bot.rb
|
340
340
|
- framework_components/runs_list_bot/startup
|
341
|
+
- framework_components/server_bot/server_bot.rb
|
342
|
+
- framework_components/server_bot/startup
|
341
343
|
- lib/commands/broker.rb
|
342
344
|
- lib/commands/checkup.rb
|
343
345
|
- lib/commands/compile.rb
|