Module: Mumuki::Laboratory::Seed
- Defined in:
- lib/mumuki/laboratory/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
- .import_contents!(slug_regex = /.*/) ⇒ Object
- .import_languages! ⇒ Object
- .import_main_contents! ⇒ Object
Class Method Details
.import_contents!(slug_regex = /.*/) ⇒ Object
22 23 24 25 26 |
# File 'lib/mumuki/laboratory/seed.rb', line 22 def self.import_contents!(slug_regex = /.*/) Mumukit::Platform.bibliotheca_bridge.import_contents!(slug_regex) do |resource_type, slug| resource_type.classify.constantize.import!(slug) end end |
.import_languages! ⇒ Object
28 29 30 31 32 |
# File 'lib/mumuki/laboratory/seed.rb', line 28 def self.import_languages! Mumukit::Platform.thesaurus_bridge.import_languages! do |runner_url| Language.find_or_initialize_by(runner_url: runner_url).import! end end |
.import_main_contents! ⇒ Object
18 19 20 |
# File 'lib/mumuki/laboratory/seed.rb', line 18 def self.import_main_contents! import_contents! /^#{MAIN_CONTENT_ORGANIZATIONS.join('|')}\/.*$/i end |