oso-oso 0.27.2 → 0.27.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +41 -1
- data/.ruby-version +1 -0
- data/Gemfile.lock +82 -60
- data/Makefile +19 -3
- data/ext/oso-oso/lib/libpolar-aarch64.so +0 -0
- data/ext/oso-oso/lib/{libpolar.so → libpolar-x86_64.so} +0 -0
- data/ext/oso-oso/lib/libpolar.dylib +0 -0
- data/ext/oso-oso/lib/polar.dll +0 -0
- data/lib/oso/polar/ffi.rb +11 -6
- data/lib/oso/polar/polar.rb +5 -8
- data/lib/oso/version.rb +1 -1
- data/oso-oso.gemspec +4 -4
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d992230292bf72430961dbad9bae7ad4aeeae196ce1aacd7129258c584d9b2
|
4
|
+
data.tar.gz: 4df54cb43fed5053cd8cab3fa08348edfbd7647677312473490ff77626afb858
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6e3a81baa5069ce4ab9aabbe1bd07c1b18905818af6c197c2733e828d7888dd0fdb48f93f7b3561e7039c987cae813bfc467bbde2a566e0bb392aa381051a1
|
7
|
+
data.tar.gz: ed3a2432dfeb6ac046127e789d7b7c56481e7a6cee58c42816c8a386e83b3f07124286b58f41c0aca8223bb0ada08501d18de108bc3e1c2d82df012601498d9f
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,10 +1,50 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.6
|
3
3
|
Exclude:
|
4
4
|
- "**/*~"
|
5
5
|
- "bin/oso"
|
6
6
|
- "vendor/**/*"
|
7
7
|
NewCops: enable
|
8
|
+
SuggestExtensions: false
|
9
|
+
|
8
10
|
Naming/FileName:
|
9
11
|
Exclude:
|
10
12
|
- "lib/oso-oso.rb"
|
13
|
+
|
14
|
+
Layout/EmptyLineBetweenDefs:
|
15
|
+
Enabled: false
|
16
|
+
Layout/LineContinuationSpacing:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Gemspec/RequireMFA:
|
20
|
+
Enabled: false
|
21
|
+
Gemspec/DevelopmentDependencies:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Lint/ConstantDefinitionInBlock:
|
25
|
+
Enabled: false
|
26
|
+
Lint/SymbolConversion:
|
27
|
+
Enabled: false
|
28
|
+
Lint/NonAtomicFileOperation:
|
29
|
+
Enabled: false
|
30
|
+
Lint/EmptyBlock:
|
31
|
+
Enabled: false
|
32
|
+
Lint/AmbiguousOperatorPrecedence:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Style/FetchEnvVar:
|
36
|
+
Enabled: false
|
37
|
+
Style/RedundantCurrentDirectoryInPath:
|
38
|
+
Enabled: false
|
39
|
+
Style/QuotedSymbols:
|
40
|
+
Enabled: false
|
41
|
+
Style/RedundantConstantBase:
|
42
|
+
Enabled: false
|
43
|
+
Style/RedundantInitialize:
|
44
|
+
Enabled: false
|
45
|
+
Style/CommentAnnotation:
|
46
|
+
Enabled: false
|
47
|
+
Style/FileRead:
|
48
|
+
Enabled: false
|
49
|
+
Style/HashConversion:
|
50
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/Gemfile.lock
CHANGED
@@ -1,43 +1,55 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
oso-oso (0.27.
|
4
|
+
oso-oso (0.27.3)
|
5
5
|
ffi (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (
|
11
|
-
activesupport (=
|
12
|
-
activerecord (
|
13
|
-
activemodel (=
|
14
|
-
activesupport (=
|
15
|
-
|
16
|
-
activesupport (
|
10
|
+
activemodel (7.1.2)
|
11
|
+
activesupport (= 7.1.2)
|
12
|
+
activerecord (7.1.2)
|
13
|
+
activemodel (= 7.1.2)
|
14
|
+
activesupport (= 7.1.2)
|
15
|
+
timeout (>= 0.4.0)
|
16
|
+
activesupport (7.1.2)
|
17
|
+
base64
|
18
|
+
bigdecimal
|
17
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
connection_pool (>= 2.2.5)
|
21
|
+
drb
|
22
|
+
i18n (>= 1.6, < 2)
|
23
|
+
minitest (>= 5.1)
|
24
|
+
mutex_m
|
25
|
+
tzinfo (~> 2.0)
|
22
26
|
ast (2.4.2)
|
23
27
|
backport (1.2.0)
|
28
|
+
base64 (0.2.0)
|
24
29
|
benchmark (0.3.0)
|
30
|
+
bigdecimal (3.1.4)
|
25
31
|
byebug (11.1.3)
|
26
32
|
coderay (1.1.3)
|
27
|
-
concurrent-ruby (1.
|
28
|
-
|
33
|
+
concurrent-ruby (1.2.2)
|
34
|
+
connection_pool (2.4.1)
|
35
|
+
diff-lcs (1.5.0)
|
36
|
+
drb (2.2.0)
|
37
|
+
ruby2_keywords
|
29
38
|
e2mmap (0.1.0)
|
30
|
-
ffi (1.
|
31
|
-
i18n (1.
|
39
|
+
ffi (1.16.3)
|
40
|
+
i18n (1.14.1)
|
32
41
|
concurrent-ruby (~> 1.0)
|
33
42
|
jaro_winkler (1.5.6)
|
43
|
+
json (2.7.1)
|
34
44
|
kramdown (2.4.0)
|
35
45
|
rexml
|
36
46
|
kramdown-parser-gfm (1.1.0)
|
37
47
|
kramdown (~> 2.0)
|
48
|
+
language_server-protocol (3.17.0.3)
|
38
49
|
method_source (1.0.0)
|
39
50
|
mini_portile2 (2.8.5)
|
40
|
-
minitest (5.
|
51
|
+
minitest (5.20.0)
|
52
|
+
mutex_m (0.2.0)
|
41
53
|
nokogiri (1.15.5)
|
42
54
|
mini_portile2 (~> 2.8.2)
|
43
55
|
racc (~> 1.4)
|
@@ -45,68 +57,78 @@ GEM
|
|
45
57
|
racc (~> 1.4)
|
46
58
|
nokogiri (1.15.5-x86_64-linux)
|
47
59
|
racc (~> 1.4)
|
48
|
-
parallel (1.
|
49
|
-
parser (2.
|
60
|
+
parallel (1.23.0)
|
61
|
+
parser (3.2.2.4)
|
50
62
|
ast (~> 2.4.1)
|
51
|
-
|
63
|
+
racc
|
64
|
+
pry (0.14.2)
|
52
65
|
coderay (~> 1.1)
|
53
66
|
method_source (~> 1.0)
|
54
|
-
pry-byebug (3.
|
67
|
+
pry-byebug (3.10.1)
|
55
68
|
byebug (~> 11.0)
|
56
|
-
pry (
|
69
|
+
pry (>= 0.13, < 0.15)
|
57
70
|
racc (1.7.3)
|
58
|
-
rainbow (3.
|
71
|
+
rainbow (3.1.1)
|
59
72
|
rake (12.3.3)
|
60
|
-
|
73
|
+
rbs (2.8.4)
|
74
|
+
regexp_parser (2.8.3)
|
61
75
|
reverse_markdown (2.1.1)
|
62
76
|
nokogiri
|
63
|
-
rexml (3.2.
|
64
|
-
rspec (3.
|
65
|
-
rspec-core (~> 3.
|
66
|
-
rspec-expectations (~> 3.
|
67
|
-
rspec-mocks (~> 3.
|
68
|
-
rspec-core (3.
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-expectations (3.
|
77
|
+
rexml (3.2.6)
|
78
|
+
rspec (3.12.0)
|
79
|
+
rspec-core (~> 3.12.0)
|
80
|
+
rspec-expectations (~> 3.12.0)
|
81
|
+
rspec-mocks (~> 3.12.0)
|
82
|
+
rspec-core (3.12.2)
|
83
|
+
rspec-support (~> 3.12.0)
|
84
|
+
rspec-expectations (3.12.3)
|
71
85
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
-
rspec-support (~> 3.
|
73
|
-
rspec-mocks (3.
|
86
|
+
rspec-support (~> 3.12.0)
|
87
|
+
rspec-mocks (3.12.6)
|
74
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-support (3.
|
77
|
-
rubocop (
|
89
|
+
rspec-support (~> 3.12.0)
|
90
|
+
rspec-support (3.12.1)
|
91
|
+
rubocop (1.58.0)
|
92
|
+
json (~> 2.3)
|
93
|
+
language_server-protocol (>= 3.17.0)
|
78
94
|
parallel (~> 1.10)
|
79
|
-
parser (>= 2.
|
95
|
+
parser (>= 3.2.2.4)
|
80
96
|
rainbow (>= 2.2.2, < 4.0)
|
81
|
-
regexp_parser (>= 1.
|
82
|
-
rexml
|
83
|
-
rubocop-ast (>=
|
97
|
+
regexp_parser (>= 1.8, < 3.0)
|
98
|
+
rexml (>= 3.2.5, < 4.0)
|
99
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
84
100
|
ruby-progressbar (~> 1.7)
|
85
|
-
unicode-display_width (>=
|
86
|
-
rubocop-ast (
|
87
|
-
parser (>= 2.
|
88
|
-
ruby-progressbar (1.
|
89
|
-
|
90
|
-
|
101
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
102
|
+
rubocop-ast (1.30.0)
|
103
|
+
parser (>= 3.2.1.0)
|
104
|
+
ruby-progressbar (1.13.0)
|
105
|
+
ruby2_keywords (0.0.5)
|
106
|
+
solargraph (0.49.0)
|
107
|
+
backport (~> 1.2)
|
91
108
|
benchmark
|
92
|
-
bundler (
|
109
|
+
bundler (~> 2.0)
|
110
|
+
diff-lcs (~> 1.4)
|
93
111
|
e2mmap
|
94
112
|
jaro_winkler (~> 1.5)
|
95
113
|
kramdown (~> 2.3)
|
96
114
|
kramdown-parser-gfm (~> 1.1)
|
97
|
-
parser (~>
|
98
|
-
|
99
|
-
|
115
|
+
parser (~> 3.0)
|
116
|
+
rbs (~> 2.0)
|
117
|
+
reverse_markdown (~> 2.0)
|
118
|
+
rubocop (~> 1.38)
|
100
119
|
thor (~> 1.0)
|
101
120
|
tilt (~> 2.0)
|
102
121
|
yard (~> 0.9, >= 0.9.24)
|
103
|
-
sqlite3 (1.
|
122
|
+
sqlite3 (1.6.9)
|
123
|
+
mini_portile2 (~> 2.8.0)
|
124
|
+
sqlite3 (1.6.9-x86_64-darwin)
|
125
|
+
sqlite3 (1.6.9-x86_64-linux)
|
104
126
|
thor (1.3.0)
|
105
|
-
thread_safe (0.3.6)
|
106
127
|
tilt (2.3.0)
|
107
|
-
|
108
|
-
|
109
|
-
|
128
|
+
timeout (0.4.1)
|
129
|
+
tzinfo (2.0.6)
|
130
|
+
concurrent-ruby (~> 1.0)
|
131
|
+
unicode-display_width (2.5.0)
|
110
132
|
yard (0.9.34)
|
111
133
|
|
112
134
|
PLATFORMS
|
@@ -117,13 +139,13 @@ PLATFORMS
|
|
117
139
|
DEPENDENCIES
|
118
140
|
activerecord
|
119
141
|
oso-oso!
|
120
|
-
pry-byebug (~> 3.
|
142
|
+
pry-byebug (~> 3.10.1)
|
121
143
|
rake (~> 12.0)
|
122
144
|
rspec (~> 3.0)
|
123
|
-
rubocop (~>
|
124
|
-
solargraph (~> 0.
|
145
|
+
rubocop (~> 1.58.0)
|
146
|
+
solargraph (~> 0.49.0)
|
125
147
|
sqlite3
|
126
148
|
yard (~> 0.9.25)
|
127
149
|
|
128
150
|
BUNDLED WITH
|
129
|
-
2.
|
151
|
+
2.4.22
|
data/Makefile
CHANGED
@@ -1,12 +1,28 @@
|
|
1
|
-
.PHONY: rust install test lint typecheck repl
|
1
|
+
.PHONY: rust copy_lib install test lint typecheck repl
|
2
|
+
|
3
|
+
UNAME_S := $(shell uname -s)
|
4
|
+
UNAME_M := $(shell uname -m)
|
2
5
|
|
3
6
|
rust:
|
4
7
|
$(MAKE) -C ../.. rust-build
|
5
8
|
|
9
|
+
copy_lib:
|
10
|
+
mkdir -p ext/oso-oso/lib/
|
11
|
+
ifeq ($(UNAME_S),Linux)
|
12
|
+
ifeq ($(UNAME_M),x86_64)
|
13
|
+
cp ../../target/debug/libpolar.so ext/oso-oso/lib/libpolar-x86_64.so
|
14
|
+
else
|
15
|
+
cp ../../target/debug/libpolar.so ext/oso-oso/lib/libpolar-aarch64.so
|
16
|
+
endif
|
17
|
+
endif
|
18
|
+
ifeq ($(UNAME_S),Darwin)
|
19
|
+
cp ../../target/debug/libpolar.dylib ext/oso-oso/lib/
|
20
|
+
endif
|
21
|
+
|
6
22
|
install:
|
7
23
|
bundle install
|
8
24
|
|
9
|
-
test: install rust
|
25
|
+
test: install rust copy_lib
|
10
26
|
POLAR_IGNORE_NO_ALLOW_WARNING=1 bundle exec rake spec
|
11
27
|
|
12
28
|
lint: install
|
@@ -15,5 +31,5 @@ lint: install
|
|
15
31
|
typecheck: install
|
16
32
|
bundle exec solargraph typecheck
|
17
33
|
|
18
|
-
repl: install rust
|
34
|
+
repl: install rust copy_lib
|
19
35
|
bundle exec oso
|
Binary file
|
Binary file
|
Binary file
|
data/ext/oso-oso/lib/polar.dll
CHANGED
Binary file
|
data/lib/oso/polar/ffi.rb
CHANGED
@@ -6,12 +6,17 @@ module Oso
|
|
6
6
|
module Polar
|
7
7
|
# FFI classes shared between all ffi/*.rb modules
|
8
8
|
module FFI
|
9
|
-
LIB =
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
LIB =
|
10
|
+
case ::FFI::Platform::OS
|
11
|
+
when /darwin/
|
12
|
+
'libpolar.dylib'
|
13
|
+
when /windows|cygwin|msys/
|
14
|
+
'polar.dll'
|
15
|
+
else
|
16
|
+
"libpolar-#{::FFI::Platform::ARCH}.so"
|
17
|
+
end
|
18
|
+
|
19
|
+
LIB_PATH = File.expand_path(File.join(__dir__, "../../../ext/oso-oso/lib/#{LIB}"))
|
15
20
|
|
16
21
|
# Wrapper classes defined upfront to fix Ruby loading issues. Actual
|
17
22
|
# implementations live in the sibling `ffi/` directory and are `require`d
|
data/lib/oso/polar/polar.rb
CHANGED
@@ -153,14 +153,11 @@ module Oso
|
|
153
153
|
|
154
154
|
# Query for a Polar predicate or string.
|
155
155
|
#
|
156
|
-
# @
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
# @
|
161
|
-
# @param query [Predicate]
|
162
|
-
# @return [Enumerator] of resulting bindings
|
163
|
-
# @raise [Error] if the FFI call raises one.
|
156
|
+
# @param query [String, Predicate]
|
157
|
+
# @param host [Host]
|
158
|
+
# @param bindings [Hash]
|
159
|
+
# @return [Enumerator] of resulting bindings
|
160
|
+
# @raise [Error] if the FFI call raises one.
|
164
161
|
def query(query, host: self.host.dup, bindings: {})
|
165
162
|
case query
|
166
163
|
when String
|
data/lib/oso/version.rb
CHANGED
data/oso-oso.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
'fixes. More context: [here](https://www.osohq.com/docs/oss/getting-started/deprecation.html).'
|
17
17
|
spec.homepage = 'https://www.osohq.com/'
|
18
18
|
|
19
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
19
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.10')
|
20
20
|
|
21
21
|
spec.metadata['homepage_uri'] = spec.homepage
|
22
22
|
spec.metadata['source_code_uri'] = 'https://github.com/osohq/oso'
|
@@ -37,11 +37,11 @@ Gem::Specification.new do |spec|
|
|
37
37
|
|
38
38
|
# Development dependencies
|
39
39
|
spec.add_development_dependency 'activerecord'
|
40
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.
|
40
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.10.1'
|
41
41
|
spec.add_development_dependency 'rake', '~> 12.0'
|
42
42
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
43
|
-
spec.add_development_dependency 'rubocop', '~>
|
44
|
-
spec.add_development_dependency 'solargraph', '~> 0.
|
43
|
+
spec.add_development_dependency 'rubocop', '~> 1.58.0'
|
44
|
+
spec.add_development_dependency 'solargraph', '~> 0.49.0'
|
45
45
|
spec.add_development_dependency 'sqlite3'
|
46
46
|
spec.add_development_dependency 'yard', '~> 0.9.25'
|
47
47
|
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.27.
|
4
|
+
version: 0.27.3
|
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:
|
11
|
+
date: 2024-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
47
|
+
version: 3.10.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
54
|
+
version: 3.10.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,28 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.58.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.58.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: solargraph
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.49.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.49.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: sqlite3
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- ".gitignore"
|
148
148
|
- ".rspec"
|
149
149
|
- ".rubocop.yml"
|
150
|
+
- ".ruby-version"
|
150
151
|
- ".solargraph.yml"
|
151
152
|
- Gemfile
|
152
153
|
- Gemfile.lock
|
@@ -154,8 +155,9 @@ files:
|
|
154
155
|
- README.md
|
155
156
|
- Rakefile
|
156
157
|
- bin/oso
|
158
|
+
- ext/oso-oso/lib/libpolar-aarch64.so
|
159
|
+
- ext/oso-oso/lib/libpolar-x86_64.so
|
157
160
|
- ext/oso-oso/lib/libpolar.dylib
|
158
|
-
- ext/oso-oso/lib/libpolar.so
|
159
161
|
- ext/oso-oso/lib/polar.dll
|
160
162
|
- lib/oso-oso.rb
|
161
163
|
- lib/oso.rb
|
@@ -197,14 +199,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
199
|
requirements:
|
198
200
|
- - ">="
|
199
201
|
- !ruby/object:Gem::Version
|
200
|
-
version: 2.
|
202
|
+
version: 2.6.10
|
201
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
204
|
requirements:
|
203
205
|
- - ">="
|
204
206
|
- !ruby/object:Gem::Version
|
205
207
|
version: '0'
|
206
208
|
requirements: []
|
207
|
-
rubygems_version: 3.
|
209
|
+
rubygems_version: 3.4.10
|
208
210
|
signing_key:
|
209
211
|
specification_version: 4
|
210
212
|
summary: 'We have deprecated the legacy Oso open source library. We have plans for
|