meibo 0.10.0 → 0.12.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/builder.rb +1 -1
- data/lib/meibo/factory_bot/academic_session.rb +2 -2
- data/lib/meibo/reader.rb +1 -1
- data/lib/meibo/roster.rb +2 -2
- data/lib/meibo/version.rb +1 -1
- data/lib/meibo.rb +6 -0
- 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: f252ebdf57a419551a3b65f21656ea93a2d949c72dd4e957a69aa30a9ab978af
|
4
|
+
data.tar.gz: 2b3d36b6b7eb8268046e06308d73531b9cec3f849cecc0e3750069435f40c04c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b18d0f8dddadb024f22df2832ad0133fbe1af864143eed2de56108a06e68e97eea28a60909f3eda192fa45c45b5165ef4c1b80805c969d99704bbecd66001618
|
7
|
+
data.tar.gz: 0a1cf57f5dd8e08b362cc3cd107ae527c45683b7796ef02db788416a65958a99b3ff5605af8ea64b32b5b3ece0ca2236d60d0da12aad941fded971388e731dc5
|
data/Gemfile.lock
CHANGED
data/lib/meibo/builder.rb
CHANGED
@@ -10,7 +10,7 @@ module Meibo
|
|
10
10
|
|
11
11
|
def_delegators :@roster, :academic_sessions, :classes, :courses, :demographics, :enrollments, :organizations, :roles, :users, :user_profiles
|
12
12
|
|
13
|
-
def initialize(roster:, profile:
|
13
|
+
def initialize(roster:, profile: Meibo.default_profile)
|
14
14
|
@roster = roster
|
15
15
|
@profile = profile
|
16
16
|
end
|
@@ -15,8 +15,8 @@ FactoryBot.define do
|
|
15
15
|
sourced_id { SecureRandom.uuid }
|
16
16
|
title { "#{school_year}年度" }
|
17
17
|
type { Meibo::AcademicSession::TYPES[:school_year] }
|
18
|
-
start_date { Date.new(school_year, 4, 1)
|
19
|
-
end_date { Date.new(school_year + 1, 3, 31)
|
18
|
+
start_date { Date.new(school_year, 4, 1) }
|
19
|
+
end_date { Date.new(school_year + 1, 3, 31) }
|
20
20
|
parent_sourced_id { parent&.sourced_id }
|
21
21
|
school_year { today.year }
|
22
22
|
|
data/lib/meibo/reader.rb
CHANGED
data/lib/meibo/roster.rb
CHANGED
@@ -6,7 +6,7 @@ require 'csv'
|
|
6
6
|
module Meibo
|
7
7
|
class Roster
|
8
8
|
class << self
|
9
|
-
def from_file(file_path, profile:
|
9
|
+
def from_file(file_path, profile: Meibo.default_profile)
|
10
10
|
Reader.open(file_path, profile: profile) do |reader|
|
11
11
|
begin
|
12
12
|
manifest = reader.manifest
|
@@ -66,7 +66,7 @@ module Meibo
|
|
66
66
|
|
67
67
|
attr_reader :profile, :manifest_properties, :academic_sessions, :classes, :courses, :demographics, :enrollments, :organizations, :roles, :user_profiles, :users
|
68
68
|
|
69
|
-
def initialize(profile:
|
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
72
|
@academic_sessions = AcademicSessionSet.new(academic_sessions, roster: self)
|
data/lib/meibo/version.rb
CHANGED
data/lib/meibo.rb
CHANGED
@@ -12,6 +12,12 @@ require_relative "meibo/errors"
|
|
12
12
|
module Meibo
|
13
13
|
CSV_ENCODING = 'UTF-8'
|
14
14
|
ENUM_EXT_PATTERN = /\Aext:[a-zA-Z0-9\.\-_]+\z/
|
15
|
+
|
16
|
+
class << self
|
17
|
+
attr_accessor :default_profile
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
loader.eager_load
|
22
|
+
|
23
|
+
Meibo.default_profile = Meibo::Profile.new
|
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.12.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-14 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.12.0/CHANGELOG.md
|
129
129
|
post_install_message:
|
130
130
|
rdoc_options: []
|
131
131
|
require_paths:
|