oso-oso 0.22.1 → 0.23.0

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
  SHA1:
3
- metadata.gz: 654992655445b1208dd37d8346e2bc969c75a883
4
- data.tar.gz: 67f729e79b4ea0912f23141134e0543b7cca023a
3
+ metadata.gz: 1e323fdc380d0763cb3b4d84618fb81c3b6957a8
4
+ data.tar.gz: 8571c1594862ec12dd1ed9bbbc49dec49a71567b
5
5
  SHA512:
6
- metadata.gz: 000e0208a70ac3bcb967a3ee7ad2ecf2d89bcdb03a36abfadf89fbf5ab8da3e5f20b5209d9061d4c0f8a0e8c9cb4eec0723696771824e4866f3e6ac4d07734f8
7
- data.tar.gz: a73f3e21418f3a3445bdcff2e81a50a36cc6d57bec0e5467c9ae7d4e77220924f1a96bd818d52dc3bfebc9ffc780c5ab6463c18df0ff55774fd5325966472a5f
6
+ metadata.gz: 451a25cd51d463002223839c152a96aed018b958b0619103c8a7ad2e7e31fe4bab05ffded087ecde46036849b07d5f7ab34b5e8a5b2f6d761a741fe255c817a6
7
+ data.tar.gz: 2ccbcd09c12aeeedc86ce473b8f76439bc576016fb087dbbf9b8279c7a14128847130492698c37bdc76be2da5792fc674ee2be384e12f6f787c738fa5539cc6e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oso-oso (0.22.1)
4
+ oso-oso (0.23.0)
5
5
  ffi (~> 1.0)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oso
4
- VERSION = '0.22.1'
4
+ VERSION = '0.23.0'
5
5
  end
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.22.1
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-01 00:00:00.000000000 Z
11
+ date: 2021-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi