nutella_framework 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/framework_components/roomcast-bot/roomcast_bot.rb +32 -1
- data/framework_components/roomcast-channel-creator/dist/app.js +10 -4
- data/framework_components/roomcast-channel-creator/dist/roomcast-default.png +0 -0
- data/framework_components/roomcast-channel-creator/src/app/components/Channel.js +9 -3
- data/framework_components/roomcast-package-creator/dist/main.css +4 -1
- data/framework_components/roomcast-package-creator/src/less/main.less +3 -0
- data/framework_components/roomcast-teacher-controls/dist/app.js +2 -3
- data/framework_components/roomcast-teacher-controls/dist/nutella_lib.js +0 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +1 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336e963e13e64d739fa308d9360702ee7a99ec00
|
4
|
+
data.tar.gz: cfb3eec4d18fad99d29775dbdc7fbf91125de781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eada9bf3f7037349157cb9457e1040d807107f8a9de3bae65b573ec9487f243554067add643bc550914b761ac8c281411a256dcd08469d7951b05456bca4ef4a
|
7
|
+
data.tar.gz: 417f90ea2382fb8318d6a58799c78ec54365b68a8ca114b9cd494962ef9728970be7768493699376de877a6311b17b304bd8a55db30e105ed4b6b08eeeb9b877
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
@@ -129,7 +129,10 @@ nutella.f.net.subscribe_to_all_runs('channels/update', lambda do |message, app_i
|
|
129
129
|
channels_db['channels'] = new_channels
|
130
130
|
end
|
131
131
|
|
132
|
-
# Notify
|
132
|
+
# Clean configs to remove deleted channels + Notify configs update
|
133
|
+
clean_configs(app_id, run_id)
|
134
|
+
|
135
|
+
# Notify channels Update
|
133
136
|
publish_channels_update(app_id, run_id, new_channels)
|
134
137
|
end)
|
135
138
|
|
@@ -170,6 +173,34 @@ def publish_channels_update(app_id, run_id, channels)
|
|
170
173
|
nutella.f.net.publish_to_run(app_id, run_id, 'channels/updated', channels)
|
171
174
|
end
|
172
175
|
|
176
|
+
# Removes deleted channels ids from configs and notifies
|
177
|
+
def clean_configs(app_id, run_id)
|
178
|
+
configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
|
179
|
+
new_configs = configs_db.dup
|
180
|
+
|
181
|
+
channels_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'channels')
|
182
|
+
ids = []
|
183
|
+
channels_db['channels'].each do |k, channel|
|
184
|
+
ids << k
|
185
|
+
end
|
186
|
+
|
187
|
+
o = {}
|
188
|
+
new_configs['configs'].each do |key, config|
|
189
|
+
config = new_configs['configs'][key]
|
190
|
+
config['mapping'].each do |mapping|
|
191
|
+
mapping['items'].each do |item|
|
192
|
+
item['channels'] = item['channels'] & ids # intersection of channels
|
193
|
+
#p item['channels']
|
194
|
+
end
|
195
|
+
end
|
196
|
+
o[key] = config
|
197
|
+
end
|
198
|
+
#new_configs['configs'] = c
|
199
|
+
configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
|
200
|
+
configs_db['configs'] = o.dup
|
201
|
+
publish_configs_update(app_id, run_id, o.dup)
|
202
|
+
end
|
203
|
+
|
173
204
|
################ RoomCast API ################
|
174
205
|
|
175
206
|
# Returns the name of the current running activity
|