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-7.10.1 spec/dummy/db/seeds.rb
mumuki-laboratory-7.10.0 spec/dummy/db/seeds.rb
mumuki-laboratory-7.9.2 spec/dummy/db/seeds.rb
mumuki-laboratory-7.9.1 spec/dummy/db/seeds.rb
mumuki-laboratory-7.9.0 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.6 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.5 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.4 spec/dummy/db/seeds.rb
mumuki-laboratory-7.8.0 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.3 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.2 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.1 spec/dummy/db/seeds.rb
mumuki-laboratory-7.7.0 spec/dummy/db/seeds.rb
mumuki-laboratory-7.6.2 spec/dummy/db/seeds.rb
mumuki-laboratory-7.6.1 spec/dummy/db/seeds.rb
mumuki-laboratory-7.6.0 spec/dummy/db/seeds.rb
mumuki-laboratory-7.5.2 spec/dummy/db/seeds.rb
mumuki-laboratory-7.5.1 spec/dummy/db/seeds.rb
mumuki-laboratory-7.5.0 spec/dummy/db/seeds.rb