diff --git a/CHANGELOG.md b/CHANGELOG.md index 32ec15c..c4b50de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 2.13.0 (2025-09-12) + +Fixes: + +* _Actually_ works around an issue with Google Workspace; the PR intended for v2.12.0 did not get merged (facepalm - sorry!) - fixes [#142](https://github.com/pond/scimitar/issues/142) via [#161](https://github.com/pond/scimitar/pull/161) - thanks to `@kewnt` + +Features: + +* Support for `find_all_with` in the `scim_attributes_map`, to opt-in eliminate N+1 queries in some use cases - fixes [#157](https://github.com/pond/scimitar/issues/157) via [#164](https://github.com/pond/scimitar/pull/164/) - thanks to `@shuyahonda` + # 2.12.0 (2025-08-15) Fixes: diff --git a/README.md b/README.md index 76a28a4..20ece83 100644 --- a/README.md +++ b/README.md @@ -255,8 +255,8 @@ class User < ActiveRecord::Base ], # NB The 'groups' collection in a SCIM User resource is read-only, so - # we provide no ":find_with" key for looking up records for writing - # updates to the associated collection. + # we provide no ":find_with" or ":find_all_with" key for looking up + # records for writing updates to the associated collection. # groups: [ { diff --git a/app/models/scimitar/resources/mixin.rb b/app/models/scimitar/resources/mixin.rb index 16ef902..bfe184c 100644 --- a/app/models/scimitar/resources/mixin.rb +++ b/app/models/scimitar/resources/mixin.rb @@ -145,8 +145,8 @@ module Resources # display: :full_name # <-- i.e. Team.users[n].full_name # }, # class: Team, # Optional; see below - # find_with: -> (scim_list_entry) {...}, # See below - # find_all_with: -> (scim_list_entries) {...} # Optional, See below + # find_with: -> (scim_list_entry) {...}, # See below + # find_all_with: -> (scim_list_entries) {...} # Optional, See below # } # ], # #... diff --git a/lib/scimitar/version.rb b/lib/scimitar/version.rb index 5624e93..7d1c414 100644 --- a/lib/scimitar/version.rb +++ b/lib/scimitar/version.rb @@ -3,11 +3,11 @@ module Scimitar # Gem version. If this changes, be sure to re-run "bundle install" or # "bundle update". # - VERSION = '2.12.0' + VERSION = '2.13.0' # Date for VERSION. If this changes, be sure to re-run "bundle install" # or "bundle update". # - DATE = '2025-08-15' + DATE = '2025-09-12' end diff --git a/spec/apps/dummy/app/models/mock_group_batch.rb b/spec/apps/dummy/app/models/mock_group_batch.rb index dc26bec..e125d6b 100644 --- a/spec/apps/dummy/app/models/mock_group_batch.rb +++ b/spec/apps/dummy/app/models/mock_group_batch.rb @@ -11,7 +11,7 @@ def self.scim_attributes_map # Minimal mock: assume user-only entries (type omitted => User) find_all_with: -> (entries) do ids = entries.map { |e| e['value'] } - users = MockUser.where(primary_key: ids).to_a + MockUser.where(primary_key: ids).to_a end } ] diff --git a/spec/apps/dummy/config/routes.rb b/spec/apps/dummy/config/routes.rb index becec67..a4e9bd0 100644 --- a/spec/apps/dummy/config/routes.rb +++ b/spec/apps/dummy/config/routes.rb @@ -17,7 +17,8 @@ get 'Groups/:id', to: 'mock_groups#show' patch 'Groups/:id', to: 'mock_groups#update' - # Batch lookup variant for testing find_all_with + # Batch lookup variant for testing the mixin 'find_all_with' option. + # get 'BatchGroups', to: 'mock_batch_groups#index' get 'BatchGroups/:id', to: 'mock_batch_groups#show' patch 'BatchGroups/:id', to: 'mock_batch_groups#update'