meibo 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -2
- data/README.md +30 -0
- data/gemset.nix +1 -1
- data/lib/meibo/profile.rb +3 -2
- data/lib/meibo/roster.rb +1 -1
- data/lib/meibo/user_set.rb +2 -0
- data/lib/meibo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5462b2226e79e55f34647a9f9980b4c45b9dce0d7244a11cde043e26f8a4da88
|
|
4
|
+
data.tar.gz: ac00724a8c07fb727d47885ec99771f8ad19048e1660424d2822ef54cf01fdb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9f6ff82cbf1ff9728f263fa8bc8e47bd2b5335767e0c4a799483057e02cc519b906347d4a914948f1c3a37f66d13da98c8183ede20359e5e2cfe0a93ee60f1a
|
|
7
|
+
data.tar.gz: 32faff800893e34e1f946003ea7b6a7096d2e3a218eb6d27ce06a24853834a7c672b2226f989ad34f6f1e218921e27b5ffb76d3205f39d97ca56b01a00f3b8db
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.30.1] - 2026-10-20
|
|
4
|
+
|
|
5
|
+
- Add `allow_duplicate_user_master_identifiers` to profiles (default: `true`).
|
|
6
|
+
Set it to `false` to restore the duplicate validation used before version 0.29.
|
|
7
|
+
|
|
8
|
+
## [0.30.0] - 2026-10-20
|
|
9
|
+
|
|
10
|
+
- Fix `Meibo::Roster#write_to_file` compatibility with RubyZip 3.x, including 3.4.
|
|
11
|
+
|
|
3
12
|
## [0.1.0] - 2022-10-13
|
|
4
13
|
|
|
5
14
|
- Initial release
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
meibo (0.
|
|
4
|
+
meibo (0.30.1)
|
|
5
5
|
csv (>= 3.1.4)
|
|
6
6
|
rubyzip
|
|
7
7
|
zeitwerk
|
|
@@ -155,7 +155,7 @@ CHECKSUMS
|
|
|
155
155
|
language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
|
|
156
156
|
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
157
157
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
158
|
-
meibo (0.
|
|
158
|
+
meibo (0.30.1)
|
|
159
159
|
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
|
160
160
|
parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
|
|
161
161
|
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
|
data/README.md
CHANGED
|
@@ -33,6 +33,36 @@ Meibo::Roster.from_file(file) do |roster|
|
|
|
33
33
|
end
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Reject duplicate userMasterIdentifier values
|
|
37
|
+
|
|
38
|
+
Duplicate `userMasterIdentifier` values are allowed by default. To restore the
|
|
39
|
+
validation used before version 0.29, create a profile with
|
|
40
|
+
`allow_duplicate_user_master_identifiers: false`:
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
base_profile = Meibo::Profiles["学習eポータル標準モデル Ver. 3.00"]
|
|
44
|
+
profile = Meibo::Profile.new(
|
|
45
|
+
builders: base_profile.builders,
|
|
46
|
+
data_models: base_profile.data_models,
|
|
47
|
+
data_set: base_profile.data_set,
|
|
48
|
+
manifest_properties: base_profile.manifest_properties,
|
|
49
|
+
allow_duplicate_user_master_identifiers: false
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
roster = Meibo::Roster.from_file("oneroster.zip", profile: profile)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This setting rejects duplicates across all users in a roster, regardless of
|
|
56
|
+
organization or role, with `Meibo::Error, "userMasterIdentifierが重複しています"`.
|
|
57
|
+
As before version 0.29, `nil` values are ignored by this duplicate check.
|
|
58
|
+
Other validation rules are unchanged.
|
|
59
|
+
|
|
60
|
+
The same setting applies to `Meibo::Roster.from_buffer` and
|
|
61
|
+
`roster.check_semantically_consistent`. To use the configured profile by default
|
|
62
|
+
in an application, set `Meibo.default_profile = profile` during initialization.
|
|
63
|
+
Profiles with `allow_duplicate_user_master_identifiers: true`, including the
|
|
64
|
+
built-in profiles, continue to allow duplicates.
|
|
65
|
+
|
|
36
66
|
## Development
|
|
37
67
|
|
|
38
68
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/gemset.nix
CHANGED
data/lib/meibo/profile.rb
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Meibo
|
|
4
4
|
class Profile
|
|
5
|
-
attr_reader :builders, :data_models, :data_set, :manifest_properties
|
|
5
|
+
attr_reader :builders, :data_models, :data_set, :manifest_properties, :allow_duplicate_user_master_identifiers
|
|
6
6
|
|
|
7
|
-
def initialize(builders:, data_models:, data_set:, manifest_properties: {})
|
|
7
|
+
def initialize(builders:, data_models:, data_set:, manifest_properties: {}, allow_duplicate_user_master_identifiers: true)
|
|
8
8
|
@builders = builders
|
|
9
9
|
@data_models = data_models
|
|
10
10
|
@data_set = data_set
|
|
11
11
|
@manifest_properties = manifest_properties
|
|
12
|
+
@allow_duplicate_user_master_identifiers = allow_duplicate_user_master_identifiers
|
|
12
13
|
end
|
|
13
14
|
|
|
14
15
|
def builder_for(key)
|
data/lib/meibo/roster.rb
CHANGED
data/lib/meibo/user_set.rb
CHANGED
|
@@ -5,6 +5,8 @@ module Meibo
|
|
|
5
5
|
def check_semantically_consistent
|
|
6
6
|
super
|
|
7
7
|
|
|
8
|
+
raise Error, "userMasterIdentifierが重複しています" if !roster.profile.allow_duplicate_user_master_identifiers && @data.filter_map(&:user_master_identifier).tally.values.any? { |count| count > 1 }
|
|
9
|
+
|
|
8
10
|
each do |user|
|
|
9
11
|
roster.organizations.find(user.primary_org_sourced_id) if user.primary_org_sourced_id
|
|
10
12
|
|
data/lib/meibo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: meibo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.30.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Seiei Miyagi
|
|
@@ -168,7 +168,7 @@ metadata:
|
|
|
168
168
|
allowed_push_host: https://rubygems.org/
|
|
169
169
|
homepage_uri: https://github.com/hanachin/meibo
|
|
170
170
|
source_code_uri: https://github.com/hanachin/meibo
|
|
171
|
-
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.
|
|
171
|
+
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.30.1/CHANGELOG.md
|
|
172
172
|
rubygems_mfa_required: 'true'
|
|
173
173
|
rdoc_options: []
|
|
174
174
|
require_paths:
|