Sha256: 67ccd3c5cee273b1ee8651a4ddcda3e80cf2a129fea9d844580586c737c92127

Contents?: true

Size: 1.27 KB

Versions: 79

Compression:

Stored size: 1.27 KB

Contents

require 'mumuki/domain/seed'

Mumuki::Domain::Seed.import_languages!
Mumuki::Domain::Seed.import_main_contents!

Organization.find_or_create_by!(name: 'base') do |org|
  org.contact_email = 'issues@mumuki.org'
  org.book = Book.find_by!(slug: 'mumuki/mumuki-libro-programacion')
  org.public = true
  org.login_methods = Mumukit::Login::Settings.login_methods
  org.locale = 'es'
end

Organization.find_or_create_by!(name: 'private') do |org|
  org.book = Book.find_by!(slug: 'mumukiproject/mumuki-libro-aprende-a-programar-recorrido-extendido')
  org.public = false
end

  Organization.find_or_create_by!(name: 'primaria') do |org|
    org.book = Book.find_by!(slug: 'mumukiproject/mumuki-libro-primaria')
    org.login_methods = Mumukit::Login::Settings.login_methods
    org.public = true
  end

Organization.find_or_create_by!(name: 'central')

User.find_or_create_by!(uid: 'dev.student@mumuki.org') { |org| org.permissions = {student: 'central/*'} }
User.find_or_create_by!(uid: 'dev.teacher@mumuki.org') { |org| org.permissions = {teacher: 'private/*'} }
User.find_or_create_by!(uid: 'dev.admin@mumuki.org') { |org| org.permissions = {admin: '*/*'} }
User.find_or_create_by!(uid: 'dev.owner@mumuki.org') { |org| org.permissions = {owner: '*/*'} }

Avatar.create!(image_url: 'user_shape.png')

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
mumuki-laboratory-9.18.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.17.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.16.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.15.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.14.1 spec/dummy/db/seeds.rb
mumuki-laboratory-9.14.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.13.2 spec/dummy/db/seeds.rb
mumuki-laboratory-9.13.1 spec/dummy/db/seeds.rb
mumuki-laboratory-9.13.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.12.1 spec/dummy/db/seeds.rb
mumuki-laboratory-9.12.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.11.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.10.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.9.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.8.2 spec/dummy/db/seeds.rb
mumuki-laboratory-9.8.1 spec/dummy/db/seeds.rb
mumuki-laboratory-9.8.0 spec/dummy/db/seeds.rb
mumuki-laboratory-9.7.2 spec/dummy/db/seeds.rb
mumuki-laboratory-9.7.1 spec/dummy/db/seeds.rb
mumuki-laboratory-9.7.0 spec/dummy/db/seeds.rb