oso-oso 0.3.0 → 0.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
  SHA1:
3
- metadata.gz: 946cb3358c69be79685eefbc291b3d0dea8cd04d
4
- data.tar.gz: c9877050c9d34d31875bf1d3e55c7218b336833a
3
+ metadata.gz: 2f319a22c3568b2a11da1be2ff92d458acac50a1
4
+ data.tar.gz: b42631f294bbf9f5f45c70c8c8beef6bf13756ce
5
5
  SHA512:
6
- metadata.gz: 3cdf0a2de23b6fbcf36655e4c432ae3146c2f05e016d2560285efbb85eee840aa155c53a95fe16997e074232cea7b0e04fd7152b71319c55182084940620b95f
7
- data.tar.gz: 506ca24f5b9ff1c62f69defafb963ac16f9871715f302512dd4791d388495a36cf1dbc8b15a8b8a0e530fad836dc7a5cbba817e0c9b467faa47b7a230f4861b3
6
+ metadata.gz: 60774d89d1abec361c3d4ad96c2c5e1dd56fde369f4c49cb36fbdd6c9cb3f78d3ea51ee394febbf5472d1500dace92a8f346281fd3c04c8a88e9e040d467e5fd
7
+ data.tar.gz: 2e08087f17170f44fcd528c5f8f756d5979a1b30765b4417506195f10b6b8587f70500582efea0d1780a8124091b7ccc71a7c0d66d00ef601dbd48077d5a3707
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oso-oso (0.3.0)
4
+ oso-oso (0.3.1)
5
5
  ffi (~> 1.0)
6
6
 
7
7
  GEM
Binary file
Binary file
@@ -11,10 +11,10 @@ module Oso
11
11
 
12
12
  attach_function :new, :polar_new, [], FFI::Polar
13
13
  attach_function :load_str, :polar_load, [FFI::Polar, :string, :string], :int32
14
- attach_function :next_inline_query, :polar_next_inline_query, [FFI::Polar], FFI::Query
14
+ attach_function :next_inline_query, :polar_next_inline_query, [FFI::Polar, :uint32], FFI::Query
15
15
  attach_function :new_id, :polar_get_external_id, [FFI::Polar], :uint64
16
- attach_function :new_query_from_str, :polar_new_query, [FFI::Polar, :string], FFI::Query
17
- attach_function :new_query_from_term, :polar_new_query_from_term, [FFI::Polar, :string], FFI::Query
16
+ attach_function :new_query_from_str, :polar_new_query, [FFI::Polar, :string, :uint32], FFI::Query
17
+ attach_function :new_query_from_term, :polar_new_query_from_term, [FFI::Polar, :string, :uint32], FFI::Query
18
18
  attach_function :register_constant, :polar_register_constant, [FFI::Polar, :string, :string], :int32
19
19
  attach_function :free, :polar_free, [FFI::Polar], :int32
20
20
  end
@@ -40,7 +40,7 @@ module Oso
40
40
  # @return [nil] if there are no remaining inline queries.
41
41
  # @raise [FFI::Error] if the FFI call returns an error.
42
42
  def next_inline_query
43
- query = Rust.next_inline_query(self)
43
+ query = Rust.next_inline_query(self, 0)
44
44
  query.null? ? nil : query
45
45
  end
46
46
 
@@ -59,7 +59,7 @@ module Oso
59
59
  # @return [FFI::Query]
60
60
  # @raise [FFI::Error] if the FFI call returns an error.
61
61
  def new_query_from_str(str)
62
- query = Rust.new_query_from_str(self, str)
62
+ query = Rust.new_query_from_str(self, str, 0)
63
63
  raise FFI::Error.get if query.null?
64
64
 
65
65
  query
@@ -69,7 +69,7 @@ module Oso
69
69
  # @return [FFI::Query]
70
70
  # @raise [FFI::Error] if the FFI call returns an error.
71
71
  def new_query_from_term(term)
72
- query = Rust.new_query_from_term(self, JSON.dump(term))
72
+ query = Rust.new_query_from_term(self, JSON.dump(term), 0)
73
73
  raise FFI::Error.get if query.null?
74
74
 
75
75
  query
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oso
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
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.3.0
4
+ version: 0.3.1
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: 2020-07-28 00:00:00.000000000 Z
11
+ date: 2020-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -111,7 +111,6 @@ files:
111
111
  - README.md
112
112
  - Rakefile
113
113
  - bin/oso
114
- - expense.rb
115
114
  - ext/oso-oso/lib/libpolar.dylib
116
115
  - ext/oso-oso/lib/libpolar.so
117
116
  - ext/oso-oso/lib/polar.dll
data/expense.rb DELETED
@@ -1,15 +0,0 @@
1
- class Expense
2
- attr_reader :amount, :description, :submitted_by
3
-
4
- def initialize(amount, description, submitted_by)
5
- @amount = amount
6
- @description = description
7
- @submitted_by = submitted_by
8
- end
9
- end
10
-
11
- EXPENSES = {
12
- 1 => Expense.new(500, 'coffee', 'alice@example.com'),
13
- 2 => Expense.new(5000, 'software', 'alice@example.com'),
14
- 3 => Expense.new(50_000, 'flight', 'bhavik@example.com')
15
- }.freeze