scimitar 2.4.2 → 2.4.3

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: 610a1d6294e74d1a4540bd30e7cc01d85b25f184891ec8acad01368feb67fb6e
4
- data.tar.gz: 382185bb81b19a3c2cc31aafbaa144d18877f3fc1f93676456c656499fea79ee
3
+ metadata.gz: 243c45d533641c64634fc4c1aac05455c27e92aff2169ed313ba07aacc803bb2
4
+ data.tar.gz: b9930256cc4681b7025e2c1a6791588ae4a5cef7f574e6ed311f1cf0cdae6791
5
5
  SHA512:
6
- metadata.gz: 50bdeb5492bcc461f2fb550b3ce7d8f3e03c8e3d9b0ca66691702f47e91f3e3868745351a37b953d1416d1225be635f8bc01a61de3e8e017c86c9e471b219dee
7
- data.tar.gz: 2afddc9337f6810f8eaf6e932c14098ed56c473895716e7a21d5ae4eafc04831ecb8c6997cd128ab99a633a5f39debaa34fd3e3d59f629d4dc972737a7c3e95d
6
+ metadata.gz: bffee2a6076dac93761cbd10e6f72d2fddd6f1504c6d305869d260df964175ae960a900bbb19d081f88962235885cd47953f04348f749860d028ccdcfe67e74c
7
+ data.tar.gz: 3f85427568803c6e5f4ebf00bf5759acf85be72b8e38eb26010e93a54afd48879f7dd106e11683c05ddcdb9d89411d674a55ca581be8a91dca6a7c882629a937
@@ -98,7 +98,7 @@ module Scimitar
98
98
  def require_scim
99
99
  scim_mime_type = Mime::Type.lookup_by_extension(:scim).to_s
100
100
 
101
- if request.media_type.nil?
101
+ if request.media_type.nil? || request.media_type.empty?
102
102
  request.format = :scim
103
103
  request.headers['CONTENT_TYPE'] = scim_mime_type
104
104
  elsif request.media_type.downcase == scim_mime_type
@@ -7,13 +7,17 @@ module Scimitar
7
7
  class EngineConfiguration
8
8
  include ActiveModel::Model
9
9
 
10
- attr_accessor :basic_authenticator,
11
- :token_authenticator,
12
- :application_controller_mixin,
13
- :exception_reporter,
14
- :optional_value_fields_required
10
+ attr_accessor(
11
+ :uses_defaults,
12
+ :basic_authenticator,
13
+ :token_authenticator,
14
+ :application_controller_mixin,
15
+ :exception_reporter,
16
+ :optional_value_fields_required,
17
+ )
15
18
 
16
19
  def initialize(attributes = {})
20
+ @uses_defaults = attributes.empty?
17
21
 
18
22
  # Set defaults that may be overridden by the initializer.
19
23
  #
@@ -9,11 +9,22 @@ module Scimitar
9
9
  class ServiceProviderConfiguration
10
10
  include ActiveModel::Model
11
11
 
12
- attr_accessor :patch, :bulk, :filter, :changePassword,
13
- :sort, :etag, :authenticationSchemes,
14
- :schemas, :meta
12
+ attr_accessor(
13
+ :uses_defaults,
14
+ :patch,
15
+ :bulk,
16
+ :filter,
17
+ :changePassword,
18
+ :sort,
19
+ :etag,
20
+ :authenticationSchemes,
21
+ :schemas,
22
+ :meta,
23
+ )
15
24
 
16
25
  def initialize(attributes = {})
26
+ @uses_defaults = attributes.empty?
27
+
17
28
  defaults = {
18
29
  bulk: Supportable.unsupported,
19
30
  changePassword: Supportable.unsupported,
@@ -3,11 +3,11 @@ module Scimitar
3
3
  # Gem version. If this changes, be sure to re-run "bundle install" or
4
4
  # "bundle update".
5
5
  #
6
- VERSION = '2.4.2'
6
+ VERSION = '2.4.3'
7
7
 
8
8
  # Date for VERSION. If this changes, be sure to re-run "bundle install"
9
9
  # or "bundle update".
10
10
  #
11
- DATE = '2023-03-21'
11
+ DATE = '2023-09-16'
12
12
 
13
13
  end
data/lib/scimitar.rb CHANGED
@@ -4,7 +4,9 @@ require 'scimitar/engine'
4
4
 
5
5
  module Scimitar
6
6
  def self.service_provider_configuration=(custom_configuration)
7
- @service_provider_configuration = custom_configuration
7
+ if @service_provider_configuration.nil? || ! custom_configuration.uses_defaults
8
+ @service_provider_configuration = custom_configuration
9
+ end
8
10
  end
9
11
 
10
12
  def self.service_provider_configuration(location:)
@@ -14,7 +16,9 @@ module Scimitar
14
16
  end
15
17
 
16
18
  def self.engine_configuration=(custom_configuration)
17
- @engine_configuration = custom_configuration
19
+ if @engine_configuration.nil? || ! custom_configuration.uses_defaults
20
+ @engine_configuration = custom_configuration
21
+ end
18
22
  end
19
23
 
20
24
  def self.engine_configuration
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scimitar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - RIPA Global
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-21 00:00:00.000000000 Z
12
+ date: 2023-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails