meibo 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11537d1363e9c059a0a6166beb9cf60e2b27821a1e1a2f99feec39aae883318a
4
- data.tar.gz: 214ac900f47b7fdec86dc0072670b08e2029911eb9935fdb998de3fa297a95f2
3
+ metadata.gz: f252ebdf57a419551a3b65f21656ea93a2d949c72dd4e957a69aa30a9ab978af
4
+ data.tar.gz: 2b3d36b6b7eb8268046e06308d73531b9cec3f849cecc0e3750069435f40c04c
5
5
  SHA512:
6
- metadata.gz: '0054203874839c0e8d36a334eef284aac82fa277aace6f5c94230579c4e9770e8e9ef1df7b9dc24beb7eedbc8930cfc9cfa66f597feab33cc4f5712706b0084e'
7
- data.tar.gz: 4b477cd635c5195efe6c913695dc0115c9b1cb41320542a9e0024f75923ecd7be888dae43f098383e34cd0ed07359541f95d9812fbaa8fede4166760c9caad1c
6
+ metadata.gz: b18d0f8dddadb024f22df2832ad0133fbe1af864143eed2de56108a06e68e97eea28a60909f3eda192fa45c45b5165ef4c1b80805c969d99704bbecd66001618
7
+ data.tar.gz: 0a1cf57f5dd8e08b362cc3cd107ae527c45683b7796ef02db788416a65958a99b3ff5605af8ea64b32b5b3ece0ca2236d60d0da12aad941fded971388e731dc5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meibo (0.11.0)
4
+ meibo (0.12.0)
5
5
  rubyzip
6
6
  zeitwerk
7
7
 
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: Profile.new)
13
+ def initialize(roster:, profile: Meibo.default_profile)
14
14
  @roster = roster
15
15
  @profile = profile
16
16
  end
data/lib/meibo/reader.rb CHANGED
@@ -5,7 +5,7 @@ require 'zip'
5
5
 
6
6
  module Meibo
7
7
  class Reader
8
- def self.open(file_path, profile: Profile.new)
8
+ def self.open(file_path, profile: Meibo.default_profile)
9
9
  Zip::File.open(file_path) do |zipfile|
10
10
  yield new(zipfile: zipfile, profile: profile)
11
11
  end
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: Profile.new)
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: Profile.new, manifest_properties: {}, academic_sessions: [], classes: [], courses: [], demographics: [], enrollments: [], organizations: [], roles: [], user_profiles: [], users: [])
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meibo
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.0"
5
5
  end
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.11.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-08 00:00:00.000000000 Z
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.11.0/CHANGELOG.md
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: