mumukit-bridge 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/bridge/runner.rb +26 -20
- data/lib/mumukit/bridge/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f05e53379537fddc6c7a1f8466c93d0cc620eb3f480f1f3611dc99588d65b96
|
4
|
+
data.tar.gz: f999445f1581e5d8767897c1692bc2e3c601c214e262a72f37fc1ac7d858a358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d05d145fbf1e48ad34f816f150e9e5f00250e67750e5b470a41f96eca6453c3f397df53a53728071557dc16b5bf4ad7e1b32c7bfe46e54cd5e5a9e232b458022
|
7
|
+
data.tar.gz: 204bb4441d6fe5935e6aec79153aa5b89b9385974970352b2b840b42869d2de975996b3620925e90fd1cf2e32ba7e29b0f114ade6deb6199e350a595fdf925e5
|
@@ -50,34 +50,36 @@ module Mumukit
|
|
50
50
|
def importable_info
|
51
51
|
@language_json ||= info.merge('url' => test_runner_url)
|
52
52
|
{
|
53
|
-
name:
|
54
|
-
comment_type:
|
55
|
-
test_runner_url:
|
56
|
-
output_content_type:
|
53
|
+
name: @language_json['name'],
|
54
|
+
comment_type: @language_json['comment_type'],
|
55
|
+
test_runner_url: @language_json['url'],
|
56
|
+
output_content_type: @language_json['output_content_type'],
|
57
57
|
prompt: (@language_json.dig('language', 'prompt') || 'ム') + ' ',
|
58
58
|
extension: @language_json.dig('language', 'extension'),
|
59
59
|
highlight_mode: @language_json.dig('language', 'ace_mode'),
|
60
60
|
visible_success_output: @language_json.dig('language', 'graphic').present?,
|
61
61
|
devicon: @language_json.dig('language', 'icon', 'name'),
|
62
|
-
triable:
|
63
|
-
feedback:
|
64
|
-
queriable:
|
65
|
-
stateful_console:
|
66
|
-
test_extension:
|
67
|
-
test_template:
|
68
|
-
layout_js_urls:
|
69
|
-
layout_html_urls:
|
70
|
-
layout_css_urls:
|
71
|
-
editor_js_urls:
|
72
|
-
editor_html_urls:
|
73
|
-
editor_css_urls:
|
62
|
+
triable: @language_json.dig('features', 'try').present?,
|
63
|
+
feedback: @language_json.dig('features', 'feedback').present?,
|
64
|
+
queriable: @language_json.dig('features', 'query').present?,
|
65
|
+
stateful_console: @language_json.dig('features', 'stateful').present?,
|
66
|
+
test_extension: @language_json.dig('test_framework', 'test_extension'),
|
67
|
+
test_template: @language_json.dig('test_framework', 'template'),
|
68
|
+
layout_js_urls: get_assets_for(:layout, 'js'),
|
69
|
+
layout_html_urls: get_assets_for(:layout, 'html'),
|
70
|
+
layout_css_urls: get_assets_for(:layout, 'css'),
|
71
|
+
editor_js_urls: get_assets_for(:editor, 'js'),
|
72
|
+
editor_html_urls: get_assets_for(:editor, 'html'),
|
73
|
+
editor_css_urls: get_assets_for(:editor, 'css')
|
74
74
|
}
|
75
75
|
end
|
76
76
|
|
77
|
-
def
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
def assets(path, options={})
|
78
|
+
raw_get_to_server "assets/#{path}", options
|
79
|
+
end
|
80
|
+
|
81
|
+
def info(options={})
|
82
|
+
JSON.parse raw_get_to_server(:info, options.merge(content_type: :json))
|
81
83
|
end
|
82
84
|
|
83
85
|
def with_sever_response(request, route, &action)
|
@@ -87,6 +89,10 @@ module Mumukit
|
|
87
89
|
{result: e.message, status: :errored}
|
88
90
|
end
|
89
91
|
|
92
|
+
def raw_get_to_server(route, options)
|
93
|
+
RestClient.get("#{test_runner_url}/#{route}", options)
|
94
|
+
end
|
95
|
+
|
90
96
|
def post_to_server(request, route)
|
91
97
|
JSON.parse RestClient::Request.new(
|
92
98
|
method: :post,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|