oso-oso 0.22.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/ext/oso-oso/lib/libpolar.dylib +0 -0
- data/ext/oso-oso/lib/libpolar.so +0 -0
- data/ext/oso-oso/lib/polar.dll +0 -0
- data/lib/oso/polar/errors.rb +0 -5
- data/lib/oso/polar/ffi/error.rb +0 -19
- data/lib/oso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e323fdc380d0763cb3b4d84618fb81c3b6957a8
|
4
|
+
data.tar.gz: 8571c1594862ec12dd1ed9bbbc49dec49a71567b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 451a25cd51d463002223839c152a96aed018b958b0619103c8a7ad2e7e31fe4bab05ffded087ecde46036849b07d5f7ab34b5e8a5b2f6d761a741fe255c817a6
|
7
|
+
data.tar.gz: 2ccbcd09c12aeeedc86ce473b8f76439bc576016fb087dbbf9b8279c7a14128847130492698c37bdc76be2da5792fc674ee2be384e12f6f787c738fa5539cc6e
|
data/Gemfile.lock
CHANGED
Binary file
|
data/ext/oso-oso/lib/libpolar.so
CHANGED
Binary file
|
data/ext/oso-oso/lib/polar.dll
CHANGED
Binary file
|
data/lib/oso/polar/errors.rb
CHANGED
@@ -23,7 +23,6 @@ module Oso
|
|
23
23
|
|
24
24
|
# Errors from across the FFI boundary.
|
25
25
|
|
26
|
-
class SerializationError < PolarRuntimeError; end
|
27
26
|
class UnsupportedError < PolarRuntimeError; end
|
28
27
|
class PolarTypeError < PolarRuntimeError; end
|
29
28
|
class StackOverflowError < PolarRuntimeError; end
|
@@ -96,10 +95,6 @@ module Oso
|
|
96
95
|
class UnrecognizedToken < ParseError; end
|
97
96
|
end
|
98
97
|
|
99
|
-
# Generic Polar API exception.
|
100
|
-
class ApiError < Error; end
|
101
|
-
class ParameterError < ApiError; end
|
102
|
-
|
103
98
|
class ValidationError < Error; end
|
104
99
|
|
105
100
|
UNEXPECTED_EXPRESSION_MESSAGE = <<~MSG
|
data/lib/oso/polar/ffi/error.rb
CHANGED
@@ -54,8 +54,6 @@ module Oso
|
|
54
54
|
runtime_error(subkind, msg: msg, details: details)
|
55
55
|
when 'Operational'
|
56
56
|
operational_error(subkind, msg: msg, details: details)
|
57
|
-
when 'Parameter'
|
58
|
-
api_error(subkind, msg: msg, details: details)
|
59
57
|
when 'Validation'
|
60
58
|
validation_error(msg, details: details)
|
61
59
|
end
|
@@ -94,8 +92,6 @@ module Oso
|
|
94
92
|
# @return [::Oso::Polar::PolarRuntimeError] the object converted into the expected format.
|
95
93
|
private_class_method def self.runtime_error(kind, msg:, details:) # rubocop:disable Metrics/MethodLength
|
96
94
|
case kind
|
97
|
-
when 'Serialization'
|
98
|
-
::Oso::Polar::SerializationError.new(msg, details: details)
|
99
95
|
when 'Unsupported'
|
100
96
|
::Oso::Polar::UnsupportedError.new(msg, details: details)
|
101
97
|
when 'TypeError'
|
@@ -124,21 +120,6 @@ module Oso
|
|
124
120
|
end
|
125
121
|
end
|
126
122
|
|
127
|
-
# Map FFI API errors into Ruby exceptions.
|
128
|
-
#
|
129
|
-
# @param kind [String]
|
130
|
-
# @param msg [String]
|
131
|
-
# @param details [Hash<String, Object>]
|
132
|
-
# @return [::Oso::Polar::ApiError] the object converted into the expected format.
|
133
|
-
private_class_method def self.api_error(kind, msg:, details:)
|
134
|
-
case kind
|
135
|
-
when 'Parameter'
|
136
|
-
::Oso::Polar::ParameterError.new(msg, details: details)
|
137
|
-
else
|
138
|
-
::Oso::Polar::ApiError.new(msg, details: details)
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
123
|
# Map FFI Validation errors into Ruby exceptions.
|
143
124
|
#
|
144
125
|
# @param msg [String]
|
data/lib/oso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oso-oso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oso Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|