cerbos 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +10 -0
- data/lib/cerbos/input/attributes.rb +14 -1
- data/lib/cerbos/version.rb +1 -1
- 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: e1c86d3d658d13d5226bad856d440ce3a511e260fb7c7a1d0df57ab6c1368584
|
4
|
+
data.tar.gz: b776cb441ca8011e80c43fa2647aa36e7640873290086c3b04cd6233b0192f4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b13e093563c7ad60ac1b524dffee33b22fb1d553b433d0927063ff61b4ba10b2aa3516ac309f03384848b40913776605ea7b922fce906d2c6dbe43f8c175dd19
|
7
|
+
data.tar.gz: '039c5611d71e663451ecb192efaa91fe63a09f81de902b21ec67dee270374170e0fd08db61eee9b3b43283bca8299cd362bccb16a010670e77f9017ecf0a5932'
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
No notable changes.
|
3
3
|
|
4
|
+
## [0.5.0] - 2022-06-09
|
5
|
+
### Added
|
6
|
+
- Allow symbol keys in nested attributes hashes ([#28](https://github.com/cerbos/cerbos-sdk-ruby/pull/28))
|
7
|
+
|
4
8
|
## [0.4.0] - 2022-06-03
|
5
9
|
### Added
|
6
10
|
- `on_validation_error` option to `Cerbos::Client#initialize` ([#22](https://github.com/cerbos/cerbos-sdk-ruby/pull/22))
|
@@ -22,7 +26,8 @@ No notable changes.
|
|
22
26
|
### Added
|
23
27
|
- Initial implementation of `Cerbos::Client` ([#2](https://github.com/cerbos/cerbos-sdk-ruby/pull/2))
|
24
28
|
|
25
|
-
[Unreleased]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.
|
29
|
+
[Unreleased]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.5.0...HEAD
|
30
|
+
[0.5.0]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.4.0...v0.5.0
|
26
31
|
[0.4.0]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.3.0...v0.4.0
|
27
32
|
[0.3.0]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.2.0...v0.3.0
|
28
33
|
[0.2.0]: https://github.com/cerbos/cerbos-sdk-ruby/compare/v0.1.0...v0.2.0
|
data/README.md
CHANGED
@@ -53,3 +53,13 @@ decision.allow?("edit") # => false
|
|
53
53
|
```
|
54
54
|
|
55
55
|
For more details, [see the `Client` documentation](https://www.rubydoc.info/gems/cerbos/Cerbos/Client).
|
56
|
+
|
57
|
+
## Further reading
|
58
|
+
|
59
|
+
- [API reference](https://www.rubydoc.info/gems/cerbos/Cerbos)
|
60
|
+
- [Cerbos documentation](https://docs.cerbos.dev)
|
61
|
+
|
62
|
+
## Get help
|
63
|
+
|
64
|
+
- [Join the Cerbos community on Slack](http://go.cerbos.io/slack)
|
65
|
+
- [Email us at help@cerbos.dev](mailto:help@cerbos.dev)
|
@@ -22,7 +22,20 @@ module Cerbos
|
|
22
22
|
|
23
23
|
# @private
|
24
24
|
def to_protobuf
|
25
|
-
@attributes.transform_values { |value| Google::Protobuf::Value.from_ruby(value) }
|
25
|
+
@attributes.transform_values { |value| Google::Protobuf::Value.from_ruby(deep_stringify_keys(value)) }
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def deep_stringify_keys(object)
|
31
|
+
case object
|
32
|
+
when Hash
|
33
|
+
object.each_with_object({}) { |(key, value), result| result[key.to_s] = deep_stringify_keys(value) }
|
34
|
+
when Array
|
35
|
+
object.map { |value| deep_stringify_keys(value) }
|
36
|
+
else
|
37
|
+
object
|
38
|
+
end
|
26
39
|
end
|
27
40
|
end
|
28
41
|
end
|
data/lib/cerbos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cerbos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cerbos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -81,7 +81,7 @@ licenses:
|
|
81
81
|
metadata:
|
82
82
|
bug_tracker_uri: https://github.com/cerbos/cerbos-sdk-ruby/issues
|
83
83
|
changelog_uri: https://github.com/cerbos/cerbos-sdk-ruby/blob/main/CHANGELOG.md
|
84
|
-
documentation_uri: https://www.rubydoc.info/gems/cerbos/0.
|
84
|
+
documentation_uri: https://www.rubydoc.info/gems/cerbos/0.5.0
|
85
85
|
homepage_uri: https://github.com/cerbos/cerbos-sdk-ruby
|
86
86
|
source_code_uri: https://github.com/cerbos/cerbos-sdk-ruby
|
87
87
|
rubygems_mfa_required: 'true'
|