# frozen_string_literal: true module Meibo module Profiles profile121 = Profile.new( builders: { academic_session: Builder::AcademicSessionBuilder.create(AcademicSession), class: Builder::ClassroomBuilder.create(Classroom), course: Builder::CourseBuilder.create(Course), demographic: Builder::DemographicBuilder.create(Demographic), enrollment: Builder::EnrollmentBuilder.create(Enrollment), org: Builder::OrganizationBuilder.create(Organization), role: Builder::RoleBuilder.create(Role), user: Builder::UserBuilder.create(User), user_profile: Builder::UserProfileBuilder.create(UserProfile) }, data_models: { file_academic_sessions: Meibo::AcademicSession, file_classes: Meibo::Classroom, file_courses: Meibo::Course, file_demographics: Meibo::Demographic, file_enrollments: Meibo::Enrollment, file_orgs: Meibo::Organization, file_roles: Meibo::Role, file_user_profiles: Meibo::UserProfile, file_users: Meibo::User }, data_set: { academic_sessions: Meibo::AcademicSessionSet, classes: Meibo::ClassroomSet, courses: Meibo::CourseSet, demographics: Meibo::DemographicSet, enrollments: Meibo::EnrollmentSet, orgs: Meibo::OrganizationSet, roles: Meibo::RoleSet, user_profiles: Meibo::UserProfileSet, users: Meibo::UserSet } ) profile120 = Profile.new( builders: profile121.builders.merge( user: Builder::UserBuilder.create(UserM0) ), data_models: profile121.data_models.merge( file_users: UserM0 ), data_set: profile121.data_set ) japan_profile121_v11 = Profile.new( builders: profile121.builders.merge( academic_session: Builder::AcademicSessionBuilder.create(JapanProfile::AcademicSession), class: Builder::ClassroomBuilder.create(JapanProfile::Classroom), course: Builder::CourseBuilder.create(JapanProfile::Course), demographic: Builder::DemographicBuilder.create(JapanProfile::Demographic), enrollment: Builder::EnrollmentBuilder.create(JapanProfile::Enrollment), org: Builder::OrganizationBuilder.create(JapanProfile::Organization), user: Builder::UserBuilder.create(JapanProfile::User) ), data_models: profile121.data_models.merge( file_academic_sessions: JapanProfile::AcademicSession, file_classes: JapanProfile::Classroom, file_courses: JapanProfile::Course, file_demographics: JapanProfile::Demographic, file_enrollments: JapanProfile::Enrollment, file_orgs: JapanProfile::Organization, file_users: JapanProfile::User ), data_set: profile121.data_set.merge( orgs: JapanProfile::OrganizationSet, users: JapanProfile::UserSet ) ) japan_profile120_v11 = Profile.new( builders: japan_profile121_v11.builders.merge( user: Builder::UserBuilder.create(JapanProfile::UserM0) ), data_models: japan_profile121_v11.data_models.merge( file_users: JapanProfile::UserM0 ), data_set: japan_profile121_v11.data_set ) japan_profile120_v10 = Profile.new( builders: japan_profile120_v11.builders.merge( role: Builder::UserBuilder.create(JapanProfile::RoleJpM0) ), data_models: japan_profile120_v11.data_models.merge( file_roles: JapanProfile::RoleJpM0 ), data_set: japan_profile120_v11.data_set ) eportal_v3 = Profile.new( builders: japan_profile120_v11.builders.merge( class: Builder::ClassroomBuilder.create(EportalV3::Classroom), course: Builder::CourseBuilder.create(EportalV3::Course), enrollment: Builder::EnrollmentBuilder.create(EportalV3::Enrollment), organization: Builder::OrganizationBuilder.create(EportalV3::Organization), user_profile: Builder::UserProfileBuilder.create(EportalV3::UserProfile), user: Builder::UserBuilder.create(EportalV3::User) ), data_models: japan_profile120_v11.data_models.merge( file_classes: EportalV3::Classroom, file_courses: EportalV3::Course, file_enrollments: EportalV3::Enrollment, file_orgs: EportalV3::Organization, file_user_profiles: EportalV3::UserProfile, file_users: EportalV3::User ), data_set: japan_profile120_v11.data_set ) PROFILES = { "v1.2" => profile121, "v1.2.1" => profile121, "v1.2.0" => profile120, "v1.2.0 ep v3.00" => eportal_v3, "v1.2.0 jp v1.0" => japan_profile120_v10, "v1.2.0 jp v1.1" => japan_profile120_v11, "v1.2.1 jp v1.1" => japan_profile121_v11 }.freeze def self.use(profile_name, &block) Meibo.with_profile(self[profile_name], &block) end def self.[](profile_name) PROFILES.fetch(profile_name) end end end