Module: Mumuki::Domain::Seed

Defined in:
lib/mumuki/domain/seed.rb

Constant Summary collapse

MAIN_CONTENT_ORGANIZATIONS =

Those are organizations that provide content that was actually curated by the Mumuki Project and as such must be supported by each platform release

%w(
  mumuki
  mumukiproject
  sagrado-corazon-alcal
  pdep-utn
  smartedu-mumuki
  10pines-mumuki
  arquitecturas-concurrentes
  flbulgarelli
)

Class Method Summary collapse

Class Method Details

.contents_syncerObject



18
19
20
# File 'lib/mumuki/domain/seed.rb', line 18

def self.contents_syncer
  Mumukit::Sync::Syncer.new(Mumuki::Domain::Store::Bibliotheca.new(Mumukit::Platform.bibliotheca_bridge))
end

.import_languages!Object



30
31
32
# File 'lib/mumuki/domain/seed.rb', line 30

def self.import_languages!
  self.languages_syncer.import_all!
end

.import_main_contents!Object



26
27
28
# File 'lib/mumuki/domain/seed.rb', line 26

def self.import_main_contents!
  self.contents_syncer.import_all! /^#{MAIN_CONTENT_ORGANIZATIONS.join('|')}\/.*$/i
end

.languages_syncerObject



22
23
24
# File 'lib/mumuki/domain/seed.rb', line 22

def self.languages_syncer
  Mumukit::Sync::Syncer.new(Mumuki::Domain::Store::Thesaurus.new(Mumukit::Platform.thesaurus_bridge))
end