4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/mumuki/domain/store/github/exercise_schema.rb', line 4
def self.fields_schema
[
{name: :id, kind: :special},
{name: :name, kind: :special},
{name: :locale, kind: :metadata},
{name: :tags, kind: :metadata, reverse: :tag_list, transform: with { |it| it.to_a }},
{name: :layout, kind: :metadata},
{name: :editor, kind: :metadata},
{name: :type, kind: :metadata},
{name: :extra_visible, kind: :metadata},
{name: :language, kind: :metadata, transform: name },
{name: :teacher_info, kind: :metadata},
{name: :manual_evaluation, kind: :metadata},
{name: :choices, kind: :metadata},
{name: :expectations, kind: :file, extension: 'yml', transform: yaml_list('expectations')},
{name: :custom_expectations, kind: :file, extension: 'edl'},
{name: :assistance_rules, kind: :file, extension: 'yml', transform: yaml_list('rules')},
{name: :randomizations, kind: :file, extension: 'yml', transform: yaml_hash},
{name: :settings, kind: :file, extension: 'yml', transform: yaml_hash},
{name: :goal, kind: :metadata},
{name: :test, kind: :file, extension: :test},
{name: :extra, kind: :file, extension: :code},
{name: :default, kind: :file, extension: :code, reverse: :default_content},
{name: :description, kind: :file, extension: 'md', required: true},
{name: :hint, kind: :file, extension: 'md'},
{name: :corollary, kind: :file, extension: 'md'},
{name: :initial_state, kind: :file, extension: 'md'},
{name: :final_state, kind: :file, extension: 'md'},
{name: :free_form_editor_source, kind: :file, extension: 'html'}
]
end
|