Module: Mumukit::Sync::Store::Github::Schema::Guide

Extended by:
Mumukit::Sync::Store::Github::Schema
Defined in:
lib/mumukit/sync/store/github/schema/guide.rb

Class Method Summary collapse

Methods included from Mumukit::Sync::Store::Github::Schema

defaults, fields, file_fields, metadata_fields, name, simple_fields, slice, with, yaml_hash, yaml_list

Class Method Details

.fields_schemaObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mumukit/sync/store/github/schema/guide.rb', line 4

def self.fields_schema
  [
    {name: :exercises, kind: :special},
    {name: :id, kind: :special},
    {name: :slug, kind: :special},

    {name: :name, kind: :metadata},
    {name: :locale, kind: :metadata},
    {name: :type, kind: :metadata},
    {name: :beta, kind: :metadata},
    {name: :teacher_info, kind: :metadata},
    {name: :language, kind: :metadata, transform: name },
    {name: :id_format, kind: :metadata},
    {name: :order, kind: :metadata, transform: with { |it| it.map { |e| e[:id] } }, reverse: :exercises},
    {name: :private, kind: :metadata},
    {name: :expectations},

    {name: :description, kind: :file, extension: 'md', required: true},
    {name: :corollary, kind: :file, extension: 'md'},
    {name: :extra, kind: :file, extension: :code},
    {name: :AUTHORS, kind: :file, extension: 'txt', reverse: :authors},
    {name: :COLLABORATORS, kind: :file, extension: 'txt', reverse: :collaborators}
  ]
end