scimitar 1.3.0 → 1.3.1

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: 742d9f1195cc1ec3c86c17e2ca731119413925f3b5e0a3bd67fc90bf7183c2dd
4
- data.tar.gz: c4e90cbd8d59eb564deebfd0278e96f2f1896b9fa6c0eb8697f1975115e2cf47
3
+ metadata.gz: 9faabfad9cae931ab19f765393d9f307fa5d44773f943d2286fbd92302c2e9e1
4
+ data.tar.gz: 2bc23d4e3b123103efd0fa87375547dcdf9e3684ea272a1e4941c43e7845937b
5
5
  SHA512:
6
- metadata.gz: b1df7b83b8adaf904891983a1059a690ed7435917c8ae409a81254a2b13314e35ce45d630aecc917165c527314cd140913ce4d31494da4a8ca54c65f8b7f6d6f
7
- data.tar.gz: 2855fcbe539ae73ff31fbae32a7e4841a31be1c48c39eae94ae34b9ab96341fdb17e53ee82d42c318a5bf928143d39181461a9bbb86d435ecb37e4fdda6876da
6
+ metadata.gz: bb74810f72d7b806b7e6aef1a02d363be1135dbf190e2ae0e88a727f94ec9b90e643a13883cd64951d4879fe542fb5936621ec96c44d0f192050f9f6453b58ef
7
+ data.tar.gz: b8ea496f490696379236a971070f6e04188fbfcff27f0dd484e18c01416193c625173c72618e123cbc39b1521ef4e6137553396d981db6366861f98f172cee2c
@@ -902,7 +902,11 @@ module Scimitar
902
902
  altering_hash[path_component] = value
903
903
  end
904
904
  when 'replace'
905
- altering_hash[path_component] = value
905
+ if path_component == 'root'
906
+ altering_hash[path_component].merge!(value)
907
+ else
908
+ altering_hash[path_component] = value
909
+ end
906
910
  when 'remove'
907
911
  altering_hash.delete(path_component)
908
912
  end
@@ -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 = '1.3.0'
6
+ VERSION = '1.3.1'
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 = '2022-07-14'
11
+ DATE = '2022-11-04'
12
12
 
13
13
  end
@@ -1747,6 +1747,24 @@ RSpec.describe Scimitar::Resources::Mixin do
1747
1747
  expect(scim_hash['emails'][0]['type' ]).to eql('work')
1748
1748
  expect(scim_hash['emails'][0]['value']).to eql('work@test.com')
1749
1749
  end
1750
+
1751
+ context 'when prior value already exists, and no path' do
1752
+ it 'simple value: overwrites' do
1753
+ path = [ 'root' ]
1754
+ scim_hash = { 'root' => { 'userName' => 'bar', 'active' => true } }.with_indifferent_case_insensitive_access()
1755
+
1756
+ @instance.send(
1757
+ :from_patch_backend!,
1758
+ nature: 'replace',
1759
+ path: path,
1760
+ value: { 'active' => false }.with_indifferent_case_insensitive_access(),
1761
+ altering_hash: scim_hash
1762
+ )
1763
+
1764
+ expect(scim_hash['root']['userName']).to eql('bar')
1765
+ expect(scim_hash['root']['active']).to eql(false)
1766
+ end
1767
+ end
1750
1768
  end # context 'when value is not present' do
1751
1769
  end # "context 'replace' do"
1752
1770
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scimitar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RIPA Global
8
8
  - Andrew David Hodgkinson
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-14 00:00:00.000000000 Z
12
+ date: 2022-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -245,7 +245,7 @@ metadata:
245
245
  source_code_uri: https://github.com/RIPAGlobal/scimitar/
246
246
  bug_tracker_uri: https://github.com/RIPAGlobal/scimitar/issues/
247
247
  changelog_uri: https://github.com/RIPAGlobal/scimitar/blob/master/CHANGELOG.md
248
- post_install_message:
248
+ post_install_message:
249
249
  rdoc_options: []
250
250
  require_paths:
251
251
  - lib
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  requirements: []
263
263
  rubygems_version: 3.1.6
264
- signing_key:
264
+ signing_key:
265
265
  specification_version: 4
266
266
  summary: SCIM v2 for Rails
267
267
  test_files: