scim-kit 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scim/kit/v2/attributable.rb +3 -2
- data/lib/scim/kit/v2/attribute.rb +15 -3
- data/lib/scim/kit/version.rb +1 -1
- data/scim-kit.gemspec +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c837475f698f79135b950846ef1a3a066a30d99ef2c7b68b2e0f200583ae7448
|
4
|
+
data.tar.gz: 715929f4b9e8124c4cdb4f5d4bc5ac2518e2c7f577dc0bf28ea68f7c2ca63b0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9c38074c82da3dc850d5dd4d80205a0d82b47341777ac9038137462a40ce835c87f9a07137c0b2d2f9cd9b0dbeee02ffdbe2105e190751702f4ad9d8eef275b
|
7
|
+
data.tar.gz: f99a726c0ab5f697f00892292900b6589c2356cec36d924e8220c479bf683c4ffbf4f0495f29c29199cab0f770a9e8a7e359f3475ee7b76a6f66fa04104ce130
|
@@ -8,7 +8,7 @@ module Scim
|
|
8
8
|
attr_reader :dynamic_attributes
|
9
9
|
|
10
10
|
def define_attributes_for(resource, types)
|
11
|
-
@dynamic_attributes
|
11
|
+
@dynamic_attributes ||= {}.with_indifferent_access
|
12
12
|
types.each { |x| attribute(x, resource) }
|
13
13
|
end
|
14
14
|
|
@@ -26,7 +26,8 @@ module Scim
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def write_attribute(name, value)
|
29
|
-
attribute_for(name)
|
29
|
+
attribute = attribute_for(name)
|
30
|
+
attribute._value = value
|
30
31
|
end
|
31
32
|
|
32
33
|
def create_module_for(type)
|
@@ -32,15 +32,27 @@ module Scim
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def renderable?
|
35
|
-
return false if
|
36
|
-
return false if
|
37
|
-
|
35
|
+
return false if server_only?
|
36
|
+
return false if client_only?
|
37
|
+
return false if restricted?
|
38
38
|
|
39
39
|
true
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
43
43
|
|
44
|
+
def server_only?
|
45
|
+
read_only? && _resource.mode?(:client)
|
46
|
+
end
|
47
|
+
|
48
|
+
def client_only?
|
49
|
+
write_only? && (_resource.mode?(:server) || _value.blank?)
|
50
|
+
end
|
51
|
+
|
52
|
+
def restricted?
|
53
|
+
_resource.mode?(:server) && type.returned == Returned::NEVER
|
54
|
+
end
|
55
|
+
|
44
56
|
def presence_of_value
|
45
57
|
return unless type.required && _value.blank?
|
46
58
|
|
data/lib/scim/kit/version.rb
CHANGED
data/scim-kit.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scim-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -233,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
233
|
requirements:
|
234
234
|
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
236
|
+
version: 2.5.0
|
237
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
239
|
- - ">="
|