meibo 0.14.0 → 0.16.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/academic_session.rb +6 -2
- data/lib/meibo/classroom.rb +4 -0
- data/lib/meibo/course.rb +4 -0
- data/lib/meibo/data_model.rb +4 -0
- data/lib/meibo/data_set.rb +5 -0
- data/lib/meibo/demographic.rb +4 -0
- data/lib/meibo/enrollment.rb +4 -0
- data/lib/meibo/organization.rb +9 -1
- data/lib/meibo/role.rb +4 -0
- data/lib/meibo/roster.rb +9 -9
- data/lib/meibo/user.rb +4 -0
- data/lib/meibo/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: e25f22026f4551e67b4016aad6a5e526e8ccfefe07e860b0f1ec092b6e21dd37
|
4
|
+
data.tar.gz: 608bd3b794791f86d01a3931ddb17433d26ce7631ac125881b3bb01f14e7958d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc22ea80b35a152b99de89bd6452cad6699d950653a8461976f73e0d93f64e4a3974641cf1f12802372e0a8d9f8f31e2b7c7d1c49deddbd03d66eb2006970f4
|
7
|
+
data.tar.gz: 3f60761df5b94e9dd8f60661b730598b34788c6ff980eb83924bc8c472a9facf890e12d0b08a6d777fdd4184954d023f37fb613b494eee889544664807ada22d
|
data/Gemfile.lock
CHANGED
@@ -45,6 +45,10 @@ module Meibo
|
|
45
45
|
@extension_fields = extension_fields
|
46
46
|
end
|
47
47
|
|
48
|
+
def collection
|
49
|
+
Meibo.current_roster.academic_sessions
|
50
|
+
end
|
51
|
+
|
48
52
|
def grading_period?
|
49
53
|
type == TYPES[:grading_period]
|
50
54
|
end
|
@@ -62,11 +66,11 @@ module Meibo
|
|
62
66
|
end
|
63
67
|
|
64
68
|
def parent
|
65
|
-
parent_sourced_id &&
|
69
|
+
parent_sourced_id && collection.find(parent_sourced_id)
|
66
70
|
end
|
67
71
|
|
68
72
|
def children
|
69
|
-
|
73
|
+
collection.where(parent_sourced_id: sourced_id)
|
70
74
|
end
|
71
75
|
end
|
72
76
|
end
|
data/lib/meibo/classroom.rb
CHANGED
data/lib/meibo/course.rb
CHANGED
data/lib/meibo/data_model.rb
CHANGED
data/lib/meibo/data_set.rb
CHANGED
@@ -42,6 +42,11 @@ module Meibo
|
|
42
42
|
raise DataNotFoundError, "sourcedId: #{sourced_id} が見つかりません"
|
43
43
|
end
|
44
44
|
|
45
|
+
def lineno(datum)
|
46
|
+
# NOTE: add one for one-based, and add one for header line
|
47
|
+
find_index(datum)&.+(2)
|
48
|
+
end
|
49
|
+
|
45
50
|
def where(**conditions)
|
46
51
|
group_cache[conditions.keys.sort][conditions.values]
|
47
52
|
end
|
data/lib/meibo/demographic.rb
CHANGED
data/lib/meibo/enrollment.rb
CHANGED
data/lib/meibo/organization.rb
CHANGED
@@ -41,6 +41,10 @@ module Meibo
|
|
41
41
|
@extension_fields = extension_fields
|
42
42
|
end
|
43
43
|
|
44
|
+
def collection
|
45
|
+
Meibo.current_roster.organizations
|
46
|
+
end
|
47
|
+
|
44
48
|
def department?
|
45
49
|
type == TYPES[:department]
|
46
50
|
end
|
@@ -66,7 +70,11 @@ module Meibo
|
|
66
70
|
end
|
67
71
|
|
68
72
|
def parent
|
69
|
-
parent_sourced_id &&
|
73
|
+
parent_sourced_id && collection.find(parent_sourced_id)
|
74
|
+
end
|
75
|
+
|
76
|
+
def children
|
77
|
+
collection.where(parent_sourced_id: sourced_id)
|
70
78
|
end
|
71
79
|
|
72
80
|
def enrollments
|
data/lib/meibo/role.rb
CHANGED
data/lib/meibo/roster.rb
CHANGED
@@ -69,15 +69,15 @@ module Meibo
|
|
69
69
|
def initialize(profile: Meibo.default_profile, manifest_properties: {}, academic_sessions: [], classes: [], courses: [], demographics: [], enrollments: [], organizations: [], roles: [], user_profiles: [], users: [])
|
70
70
|
@profile = profile
|
71
71
|
@manifest_properties = manifest_properties
|
72
|
-
@academic_sessions =
|
73
|
-
@
|
74
|
-
@courses =
|
75
|
-
@
|
76
|
-
@
|
77
|
-
@
|
78
|
-
@
|
79
|
-
@
|
80
|
-
@
|
72
|
+
@academic_sessions = profile.data_set_for(:academic_sessions).new(academic_sessions, roster: self)
|
73
|
+
@classes = profile.data_set_for(:classes).new(classes, roster: self)
|
74
|
+
@courses = profile.data_set_for(:courses).new(courses, roster: self)
|
75
|
+
@demographics = profile.data_set_for(:demographics).new(demographics, roster: self)
|
76
|
+
@enrollments = profile.data_set_for(:enrollments).new(enrollments, roster: self)
|
77
|
+
@organizations = profile.data_set_for(:orgs).new(organizations, roster: self)
|
78
|
+
@roles = profile.data_set_for(:roles).new(roles, roster: self)
|
79
|
+
@user_profiles = profile.data_set_for(:user_profiles).new(user_profiles, roster: self)
|
80
|
+
@users = profile.data_set_for(:users).new(users, roster: self)
|
81
81
|
end
|
82
82
|
|
83
83
|
def builder
|
data/lib/meibo/user.rb
CHANGED
data/lib/meibo/user_profile.rb
CHANGED
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.16.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-24 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.16.0/CHANGELOG.md
|
129
129
|
post_install_message:
|
130
130
|
rdoc_options: []
|
131
131
|
require_paths:
|