oso-oso 0.22.0 → 0.22.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: 328999aba2d62f777db79b812e762b2546e49a80
4
- data.tar.gz: ad1803fa38712d1272d494300dafbab11d4e322a
3
+ metadata.gz: 654992655445b1208dd37d8346e2bc969c75a883
4
+ data.tar.gz: 67f729e79b4ea0912f23141134e0543b7cca023a
5
5
  SHA512:
6
- metadata.gz: 2706c6fd40a1fe5e33e2b48fddfb4814031b75f5c62e7bb832b2ecc2707e3111d6b6cfa749863743b4c3424d90daca69dc5662d1fd83577b2fb95656eb3c54a4
7
- data.tar.gz: e274ad60e2dcaed817e46f38f55362b87bad70f6d67b3cdaad838762459d0172e9e37cf6aa23e4256536bb6e807c54aefce8b97f817cbbad4b68d1ab097cf5a2
6
+ metadata.gz: 000e0208a70ac3bcb967a3ee7ad2ecf2d89bcdb03a36abfadf89fbf5ab8da3e5f20b5209d9061d4c0f8a0e8c9cb4eec0723696771824e4866f3e6ac4d07734f8
7
+ data.tar.gz: a73f3e21418f3a3445bdcff2e81a50a36cc6d57bec0e5467c9ae7d4e77220924f1a96bd818d52dc3bfebc9ffc780c5ab6463c18df0ff55774fd5325966472a5f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oso-oso (0.22.0)
4
+ oso-oso (0.22.1)
5
5
  ffi (~> 1.0)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
@@ -85,12 +85,17 @@ module Oso
85
85
 
86
86
  yrefs, nrefs = xrefs.partition { |r| %w[In Eq].include? r.kind }
87
87
  [[yrefs, 'In'], [nrefs, 'Nin']].each do |refs, kind|
88
- next unless refs.any?
89
-
90
88
  refs.group_by { |f| f.value.result_id }.each do |rid, fils|
91
- value = results[rid].map { |r| fils.map { |f| GETATTR[r, f.value.field] } }
92
- field = fils.map(&:field)
93
- rest.push(Filter.new(kind: kind, value: value, field: field))
89
+ if fils.length > 1
90
+ value = results[rid].map { |r| fils.map { |f| GETATTR[r, f.value.field] } }
91
+ field = fils.map(&:field)
92
+ rest.push(Filter.new(kind: kind, value: value, field: field))
93
+ else
94
+ fil = fils[0]
95
+ field = fil.value.field
96
+ value = results[rid].map { |r| field.nil? ? r : r.send(field) }
97
+ rest.push(Filter.new(kind: kind, field: fil.field, value: value))
98
+ end
94
99
  end
95
100
  end
96
101
  rest
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.0'
4
+ VERSION = '0.22.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.22.0
4
+ version: 0.22.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: 2021-10-19 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi