mumuki-domain 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/models/book.rb +1 -1
- data/app/models/language.rb +9 -19
- data/app/models/topic.rb +1 -1
- data/db/migrate/20181117190241_add_feedback_to_language.rb +5 -0
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8de38eb3b005bdc6be72a0f6b3cb4060a603e392
|
4
|
+
data.tar.gz: 68f6165be4f58de7385cede169282eddfef7c2a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6bab10083bbeb4c0fea8f7e06363bc72d475cbfab69c2d4356b6fbab1d3af6486144d9cdb5d78eb46d2c2351fd9f81bd5c637cd8d096c93fda63db3b8076d03
|
7
|
+
data.tar.gz: d9eed1ded3391f627f974d2156069617700263d58ed579ad573cded713b92fc44512688338ac4e0fb7ab70f3fab329961e377cbe0ac8ca80bd6b51e440a2778f
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
```
|
8
8
|
name
|
9
9
|
comment_type
|
10
|
-
|
10
|
+
runner_url
|
11
11
|
output_content_type
|
12
12
|
prompt
|
13
13
|
extension
|
@@ -28,7 +28,7 @@
|
|
28
28
|
editor_css_urls
|
29
29
|
```
|
30
30
|
|
31
|
-
_as defined in `
|
31
|
+
_as defined in `Language#to_resource_h`_
|
32
32
|
|
33
33
|
## Platform Hashes
|
34
34
|
|
data/app/models/book.rb
CHANGED
@@ -23,7 +23,7 @@ class Book < Content
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def import_from_resource_h!(resource_h)
|
26
|
-
self.assign_attributes resource_h.except(:chapters, :complements, :id, :description
|
26
|
+
self.assign_attributes resource_h.except(:chapters, :complements, :id, :description)
|
27
27
|
self.description = resource_h[:description]&.squeeze(' ')
|
28
28
|
|
29
29
|
rebuild! resource_h[:chapters].map { |it| Topic.find_by!(slug: it).as_chapter_of(self) }
|
data/app/models/language.rb
CHANGED
@@ -39,25 +39,8 @@ class Language < ApplicationRecord
|
|
39
39
|
Mumukit::Sync.key :language, runner_url
|
40
40
|
end
|
41
41
|
|
42
|
-
def import_from_resource_h!(
|
43
|
-
assign_attributes
|
44
|
-
:comment_type,
|
45
|
-
:output_content_type,
|
46
|
-
:prompt,
|
47
|
-
:extension,
|
48
|
-
:highlight_mode,
|
49
|
-
:visible_success_output,
|
50
|
-
:devicon,
|
51
|
-
:triable,
|
52
|
-
:queriable,
|
53
|
-
:stateful_console,
|
54
|
-
:layout_js_urls,
|
55
|
-
:layout_html_urls,
|
56
|
-
:layout_css_urls,
|
57
|
-
:editor_js_urls,
|
58
|
-
:editor_html_urls,
|
59
|
-
:editor_css_urls,
|
60
|
-
:test_template)
|
42
|
+
def import_from_resource_h!(resource_h)
|
43
|
+
assign_attributes resource_h.except(:runner_url)
|
61
44
|
save!
|
62
45
|
end
|
63
46
|
|
@@ -84,6 +67,13 @@ class Language < ApplicationRecord
|
|
84
67
|
as_json(only: [:name, :extension, :test_extension]).symbolize_keys
|
85
68
|
end
|
86
69
|
|
70
|
+
def to_resource_h
|
71
|
+
as_json(only: %i(comment_type devicon editor_css_urls editor_html_urls editor_js_urls
|
72
|
+
extension feedback highlight_mode layout_css_urls layout_html_urls
|
73
|
+
layout_js_urls name output_content_type prompt queriable runner_url
|
74
|
+
stateful_console test_extension test_template triable visible_success_output)).symbolize_keys
|
75
|
+
end
|
76
|
+
|
87
77
|
private
|
88
78
|
|
89
79
|
# TODO we should use Mumukit::Directives::Pipeline
|
data/app/models/topic.rb
CHANGED
@@ -26,7 +26,7 @@ class Topic < Content
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def import_from_resource_h!(resource_h)
|
29
|
-
self.assign_attributes resource_h.except(:lessons, :
|
29
|
+
self.assign_attributes resource_h.except(:lessons, :description)
|
30
30
|
self.description = resource_h[:description].squeeze(' ')
|
31
31
|
rebuild! resource_h[:lessons].to_a.map { |it| lesson_for(it) }
|
32
32
|
Organization.all.each { |org| org.reindex_usages! }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
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-11-
|
11
|
+
date: 2018-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.5'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.5'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: mumukit-core
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.10'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.10'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: mumukit-directives
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -499,6 +499,7 @@ files:
|
|
499
499
|
- db/migrate/20181105152420_remove_contact_email_from_book.rb
|
500
500
|
- db/migrate/20181113183935_rename_guide_contributors_to_collaborators.rb
|
501
501
|
- db/migrate/20181114201620_add_test_template_to_languages.rb
|
502
|
+
- db/migrate/20181117190241_add_feedback_to_language.rb
|
502
503
|
- lib/mumuki/domain.rb
|
503
504
|
- lib/mumuki/domain/engine.rb
|
504
505
|
- lib/mumuki/domain/evaluation.rb
|