meibo 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/meibo/factory_bot/academic_session.rb +20 -0
- data/lib/meibo/factory_bot/classroom.rb +16 -1
- data/lib/meibo/factory_bot/course.rb +4 -0
- data/lib/meibo/factory_bot/demographic.rb +20 -0
- data/lib/meibo/factory_bot/enrollment.rb +18 -2
- data/lib/meibo/factory_bot/organization.rb +22 -2
- data/lib/meibo/factory_bot/role.rb +44 -4
- data/lib/meibo/factory_bot/user.rb +8 -6
- data/lib/meibo/factory_bot/user_profile.rb +4 -0
- data/lib/meibo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81c241cd2d1a3603d9c298a9a7184c59bce8d3202c47abe00e032b2977996bea
|
4
|
+
data.tar.gz: 71fd725549de0aeae48e99f5168b8ccd89c2c6e123aa594db89056c751cb06d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e033966fe38e2571b8ac48e8be83f1b16bf38079c1f31dbd282bbdb67e29b424bfd5ff7d1fffe7d02c6069da09fd0500ea13070b2e7d1457914ae8d51656462f
|
7
|
+
data.tar.gz: 1caa9f1c35a55e4cc1e640480e92f31c7a2993272ee52f3ef7a31cb5eb50430466f8fdbc9f4aafd26cc7b34f7201eaee00736f0dcff2bfa8c0a46368a15810ee
|
data/Gemfile.lock
CHANGED
@@ -19,5 +19,25 @@ FactoryBot.define do
|
|
19
19
|
end_date { Date.new(school_year + 1, 3, 31).iso8601 }
|
20
20
|
parent_sourced_id { parent&.sourced_id }
|
21
21
|
school_year { today.year }
|
22
|
+
|
23
|
+
trait :grading_period do
|
24
|
+
type { Meibo::AcademicSession::TYPES[:grading_period] }
|
25
|
+
end
|
26
|
+
|
27
|
+
trait :semester do
|
28
|
+
type { Meibo::AcademicSession::TYPES[:semester] }
|
29
|
+
end
|
30
|
+
|
31
|
+
trait :school_year do
|
32
|
+
type { Meibo::AcademicSession::TYPES[:school_year] }
|
33
|
+
end
|
34
|
+
|
35
|
+
trait :term do
|
36
|
+
type { Meibo::AcademicSession::TYPES[:term] }
|
37
|
+
end
|
38
|
+
|
39
|
+
trait :jp do
|
40
|
+
initialize_with { Meibo::JapanProfile::AcademicSession.new(**attributes) }
|
41
|
+
end
|
22
42
|
end
|
23
43
|
end
|
@@ -19,10 +19,25 @@ FactoryBot.define do
|
|
19
19
|
class_type { Meibo::Classroom::TYPES[:homeroom] }
|
20
20
|
school_sourced_id { school&.sourced_id }
|
21
21
|
term_sourced_ids { terms.map(&:sourced_id) }
|
22
|
-
|
22
|
+
|
23
|
+
trait :homeroom do
|
24
|
+
class_type { Meibo::Classroom::TYPES[:homeroom] }
|
25
|
+
end
|
26
|
+
|
27
|
+
trait :scheduled do
|
28
|
+
class_type { Meibo::Classroom::TYPES[:scheduled] }
|
29
|
+
end
|
30
|
+
|
31
|
+
trait :jp do
|
32
|
+
initialize_with { Meibo::JapanProfile::Classroom.new(**attributes) }
|
33
|
+
end
|
23
34
|
|
24
35
|
trait :special_needs do
|
25
36
|
special_needs { true }
|
26
37
|
end
|
38
|
+
|
39
|
+
trait :no_special_needs do
|
40
|
+
special_needs { false }
|
41
|
+
end
|
27
42
|
end
|
28
43
|
end
|
@@ -12,5 +12,25 @@ FactoryBot.define do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
sourced_id { user&.sourced_id || SecureRandom.uuid }
|
15
|
+
|
16
|
+
trait :jp do
|
17
|
+
initialize_with { Meibo::JapanProfile::Demographic.new(**attributes) }
|
18
|
+
end
|
19
|
+
|
20
|
+
trait :male do
|
21
|
+
sex { Meibo::Demographic::SEX[:male] }
|
22
|
+
end
|
23
|
+
|
24
|
+
trait :female do
|
25
|
+
sex { Meibo::Demographic::SEX[:female] }
|
26
|
+
end
|
27
|
+
|
28
|
+
trait :unspecified do
|
29
|
+
sex { Meibo::Demographic::SEX[:unspecified] }
|
30
|
+
end
|
31
|
+
|
32
|
+
trait :other do
|
33
|
+
sex { Meibo::Demographic::SEX[:other] }
|
34
|
+
end
|
15
35
|
end
|
16
36
|
end
|
@@ -18,6 +18,14 @@ FactoryBot.define do
|
|
18
18
|
school_sourced_id { school&.sourced_id }
|
19
19
|
user_sourced_id { user&.sourced_id }
|
20
20
|
|
21
|
+
trait :administrator do
|
22
|
+
role { Meibo::Enrollment::ROLES[:administrator] }
|
23
|
+
end
|
24
|
+
|
25
|
+
trait :proctor do
|
26
|
+
role { Meibo::Enrollment::ROLES[:proctor] }
|
27
|
+
end
|
28
|
+
|
21
29
|
trait :student do
|
22
30
|
role { Meibo::Enrollment::ROLES[:student] }
|
23
31
|
end
|
@@ -26,12 +34,20 @@ FactoryBot.define do
|
|
26
34
|
role { Meibo::Enrollment::ROLES[:teacher] }
|
27
35
|
end
|
28
36
|
|
29
|
-
trait :
|
30
|
-
|
37
|
+
trait :jp do
|
38
|
+
initialize_with { Meibo::JapanProfile::Enrollment.new(**attributes) }
|
31
39
|
end
|
32
40
|
|
33
41
|
trait :guardian do
|
34
42
|
role { Meibo::Enrollment::ROLES[:guardian] }
|
35
43
|
end
|
44
|
+
|
45
|
+
trait :public do
|
46
|
+
public_flg { true }
|
47
|
+
end
|
48
|
+
|
49
|
+
trait :private do
|
50
|
+
public_flg { false }
|
51
|
+
end
|
36
52
|
end
|
37
53
|
end
|
@@ -30,18 +30,38 @@ FactoryBot.define do
|
|
30
30
|
"#{school_type}#{prefecture_no}#{kubun}#{school_no}#{check_digit}"
|
31
31
|
end
|
32
32
|
|
33
|
-
trait :
|
34
|
-
type { Meibo::Organization::TYPES[:
|
33
|
+
trait :department do
|
34
|
+
type { Meibo::Organization::TYPES[:department] }
|
35
35
|
end
|
36
36
|
|
37
37
|
trait :school do
|
38
38
|
type { Meibo::Organization::TYPES[:school] }
|
39
39
|
end
|
40
40
|
|
41
|
+
trait :district do
|
42
|
+
type { Meibo::Organization::TYPES[:district] }
|
43
|
+
end
|
44
|
+
|
45
|
+
trait :local do
|
46
|
+
type { Meibo::Organization::TYPES[:local] }
|
47
|
+
end
|
48
|
+
|
49
|
+
trait :state do
|
50
|
+
type { Meibo::Organization::TYPES[:state] }
|
51
|
+
end
|
52
|
+
|
53
|
+
trait :national do
|
54
|
+
type { Meibo::Organization::TYPES[:national] }
|
55
|
+
end
|
56
|
+
|
41
57
|
trait :elementary_school do |factory|
|
42
58
|
type { Meibo::Organization::TYPES[:school] }
|
43
59
|
sequence(:name) {|n| "第#{n}小学校" }
|
44
60
|
school_type { 'B1' }
|
45
61
|
end
|
62
|
+
|
63
|
+
trait :jp do
|
64
|
+
initialize_with { Meibo::JapanProfile::Organization.new(**attributes) }
|
65
|
+
end
|
46
66
|
end
|
47
67
|
end
|
@@ -26,16 +26,56 @@ FactoryBot.define do
|
|
26
26
|
role_type { Meibo::Role::TYPES[:secondary] }
|
27
27
|
end
|
28
28
|
|
29
|
-
trait :
|
30
|
-
role { Meibo::Role::ROLES[:
|
29
|
+
trait :aide do
|
30
|
+
role { Meibo::Role::ROLES[:aide] }
|
31
31
|
end
|
32
32
|
|
33
|
-
trait :
|
34
|
-
role { Meibo::Role::ROLES[:
|
33
|
+
trait :counselor do
|
34
|
+
role { Meibo::Role::ROLES[:counselor] }
|
35
|
+
end
|
36
|
+
|
37
|
+
trait :district_administrator do
|
38
|
+
role { Meibo::Role::ROLES[:district_administrator] }
|
35
39
|
end
|
36
40
|
|
37
41
|
trait :guardian do
|
38
42
|
role { Meibo::Role::ROLES[:guardian] }
|
39
43
|
end
|
44
|
+
|
45
|
+
trait :parent do
|
46
|
+
role { Meibo::Role::ROLES[:parent] }
|
47
|
+
end
|
48
|
+
|
49
|
+
trait :principal do
|
50
|
+
role { Meibo::Role::ROLES[:principal] }
|
51
|
+
end
|
52
|
+
|
53
|
+
trait :proctor do
|
54
|
+
role { Meibo::Role::ROLES[:proctor] }
|
55
|
+
end
|
56
|
+
|
57
|
+
trait :relative do
|
58
|
+
role { Meibo::Role::ROLES[:relative] }
|
59
|
+
end
|
60
|
+
|
61
|
+
trait :site_administrator do
|
62
|
+
role { Meibo::Role::ROLES[:site_administrator] }
|
63
|
+
end
|
64
|
+
|
65
|
+
trait :student do
|
66
|
+
role { Meibo::Role::ROLES[:student] }
|
67
|
+
end
|
68
|
+
|
69
|
+
trait :system_administrator do
|
70
|
+
role { Meibo::Role::ROLES[:system_administrator] }
|
71
|
+
end
|
72
|
+
|
73
|
+
trait :teacher do
|
74
|
+
role { Meibo::Role::ROLES[:teacher] }
|
75
|
+
end
|
76
|
+
|
77
|
+
trait :jp do
|
78
|
+
initialize_with { Meibo::JapanProfile::Role.new(**attributes) }
|
79
|
+
end
|
40
80
|
end
|
41
81
|
end
|
@@ -18,13 +18,15 @@ FactoryBot.define do
|
|
18
18
|
sequence(:family_name) {|n| "Doe#{n}" }
|
19
19
|
agent_sourced_ids { agents&.map(&:sourced_id) }
|
20
20
|
primary_org_sourced_id { primary_organization&.sourced_id }
|
21
|
-
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
homeroom { nil }
|
26
|
-
end
|
22
|
+
trait :jp do
|
23
|
+
initialize_with { Meibo::JapanProfile::User.new(**attributes) }
|
27
24
|
|
28
|
-
|
25
|
+
transient do
|
26
|
+
homeroom { nil }
|
27
|
+
end
|
28
|
+
|
29
|
+
home_class { homeroom&.sourced_id }
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
data/lib/meibo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meibo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seiei Miyagi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -125,7 +125,7 @@ metadata:
|
|
125
125
|
allowed_push_host: https://rubygems.org/
|
126
126
|
homepage_uri: https://github.com/hanachin/meibo
|
127
127
|
source_code_uri: https://github.com/hanachin/meibo
|
128
|
-
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.
|
128
|
+
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.10.0/CHANGELOG.md
|
129
129
|
post_install_message:
|
130
130
|
rdoc_options: []
|
131
131
|
require_paths:
|