scimitar 1.7.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/scimitar/active_record_backed_resources_controller.rb +10 -49
- data/app/controllers/scimitar/application_controller.rb +11 -35
- data/app/controllers/scimitar/schemas_controller.rb +0 -5
- data/app/models/scimitar/engine_configuration.rb +5 -13
- data/app/models/scimitar/error_response.rb +0 -12
- data/app/models/scimitar/lists/query_parser.rb +10 -25
- data/app/models/scimitar/resources/base.rb +4 -14
- data/app/models/scimitar/resources/mixin.rb +13 -137
- data/app/models/scimitar/schema/address.rb +0 -1
- data/app/models/scimitar/schema/attribute.rb +5 -14
- data/app/models/scimitar/schema/base.rb +1 -1
- data/app/models/scimitar/schema/vdtp.rb +1 -1
- data/app/models/scimitar/service_provider_configuration.rb +3 -14
- data/config/initializers/scimitar.rb +3 -28
- data/lib/scimitar/version.rb +2 -2
- data/lib/scimitar.rb +2 -6
- data/spec/apps/dummy/app/controllers/mock_groups_controller.rb +1 -1
- data/spec/apps/dummy/app/models/mock_group.rb +1 -1
- data/spec/apps/dummy/app/models/mock_user.rb +8 -36
- data/spec/apps/dummy/config/application.rb +1 -0
- data/spec/apps/dummy/config/environments/test.rb +28 -5
- data/spec/apps/dummy/config/initializers/scimitar.rb +10 -61
- data/spec/apps/dummy/config/routes.rb +6 -15
- data/spec/apps/dummy/db/migrate/20210304014602_create_mock_users.rb +1 -10
- data/spec/apps/dummy/db/migrate/20210308044214_create_join_table_mock_groups_mock_users.rb +3 -8
- data/spec/apps/dummy/db/schema.rb +4 -11
- data/spec/controllers/scimitar/application_controller_spec.rb +3 -72
- data/spec/controllers/scimitar/resource_types_controller_spec.rb +2 -2
- data/spec/controllers/scimitar/schemas_controller_spec.rb +2 -10
- data/spec/models/scimitar/complex_types/email_spec.rb +2 -0
- data/spec/models/scimitar/lists/query_parser_spec.rb +9 -76
- data/spec/models/scimitar/resources/base_spec.rb +70 -208
- data/spec/models/scimitar/resources/base_validation_spec.rb +2 -27
- data/spec/models/scimitar/resources/mixin_spec.rb +43 -768
- data/spec/models/scimitar/schema/attribute_spec.rb +3 -22
- data/spec/models/scimitar/schema/base_spec.rb +1 -1
- data/spec/models/scimitar/schema/user_spec.rb +0 -10
- data/spec/requests/active_record_backed_resources_controller_spec.rb +64 -423
- data/spec/requests/application_controller_spec.rb +3 -16
- metadata +7 -11
- data/LICENSE.txt +0 -21
- data/README.md +0 -671
- data/spec/apps/dummy/app/controllers/custom_save_mock_users_controller.rb +0 -24
@@ -1,24 +0,0 @@
|
|
1
|
-
# For tests only - uses custom 'save!' implementation which passes a block to
|
2
|
-
# Scimitar::ActiveRecordBackedResourcesController#save!.
|
3
|
-
#
|
4
|
-
class CustomSaveMockUsersController < Scimitar::ActiveRecordBackedResourcesController
|
5
|
-
|
6
|
-
CUSTOM_SAVE_BLOCK_USERNAME_INDICATOR = 'Custom save-block invoked'
|
7
|
-
|
8
|
-
protected
|
9
|
-
|
10
|
-
def save!(_record)
|
11
|
-
super do | record |
|
12
|
-
record.update!(username: CUSTOM_SAVE_BLOCK_USERNAME_INDICATOR)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def storage_class
|
17
|
-
MockUser
|
18
|
-
end
|
19
|
-
|
20
|
-
def storage_scope
|
21
|
-
MockUser.all
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|