turbine_rb 0.2.1 → 0.2.3
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 +4 -4
- data/lib/turbine_rb/client.rb +11 -5
- data/lib/turbine_rb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a11f956824241734f8451193c425926e41b445beaaafa666646f232fd29b161
|
4
|
+
data.tar.gz: '03494bc92e293ea4e6d5661e91697805617a627d23cae8147b0a455b22d4b50f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a10a974df6771cd2803a5fca00647f212bc2278b08ce52ad6e2181fdd32ae1ed66af6987143252f1ee27422911ec77af6d2e2f9fe52c3a852037c740e05baf9a
|
7
|
+
data.tar.gz: 5dc38c122a76db77821b85436bdce71d6c775d6c2be0a8694bcae1d2ea8d7db5c8baa5a60e9cf8e1ebaa6a0fbde120fbce78ad374650510923d5f2d0950bbfb0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
turbine_rb (0.2.
|
4
|
+
turbine_rb (0.2.3)
|
5
5
|
grpc (~> 1.48)
|
6
6
|
hash_dot (~> 2.5.0)
|
7
7
|
|
@@ -14,9 +14,9 @@ GEM
|
|
14
14
|
diff-lcs (1.5.0)
|
15
15
|
ffi (1.15.5)
|
16
16
|
formatador (1.1.0)
|
17
|
-
google-protobuf (3.21.
|
18
|
-
google-protobuf (3.21.
|
19
|
-
google-protobuf (3.21.
|
17
|
+
google-protobuf (3.21.12)
|
18
|
+
google-protobuf (3.21.12-x86_64-darwin)
|
19
|
+
google-protobuf (3.21.12-x86_64-linux)
|
20
20
|
googleapis-common-protos-types (1.4.0)
|
21
21
|
google-protobuf (~> 3.14)
|
22
22
|
grpc (1.50.0)
|
data/lib/turbine_rb/client.rb
CHANGED
@@ -30,7 +30,7 @@ module TurbineRb
|
|
30
30
|
)
|
31
31
|
)
|
32
32
|
records.tap do |r|
|
33
|
-
r.
|
33
|
+
r.pb_records = process_call(process: process, pb_collection: pb_collection)
|
34
34
|
r.pb_stream = pb_collection.stream
|
35
35
|
end
|
36
36
|
end
|
@@ -94,7 +94,7 @@ module TurbineRb
|
|
94
94
|
end
|
95
95
|
|
96
96
|
class Collection
|
97
|
-
attr_accessor :
|
97
|
+
attr_accessor :pb_records, :pb_stream, :name, :app
|
98
98
|
|
99
99
|
def self.unwrap(collection)
|
100
100
|
return collection.unwrap if collection.instance_of?(Collection)
|
@@ -102,9 +102,9 @@ module TurbineRb
|
|
102
102
|
collection
|
103
103
|
end
|
104
104
|
|
105
|
-
def initialize(name,
|
105
|
+
def initialize(name, records, stream, app)
|
106
106
|
@name = name
|
107
|
-
@
|
107
|
+
@pb_records = records
|
108
108
|
@pb_stream = stream
|
109
109
|
@app = app
|
110
110
|
end
|
@@ -117,10 +117,16 @@ module TurbineRb
|
|
117
117
|
app.process(records: self, process: process)
|
118
118
|
end
|
119
119
|
|
120
|
+
def records
|
121
|
+
return pb_records.to_a if pb_records.respond_to?(:to_a)
|
122
|
+
|
123
|
+
[pb_records].compact.flatten
|
124
|
+
end
|
125
|
+
|
120
126
|
def unwrap
|
121
127
|
TurbineCore::Collection.new( # convert back to TurbineCore::Collection
|
122
128
|
name: name,
|
123
|
-
records:
|
129
|
+
records: records,
|
124
130
|
stream: pb_stream
|
125
131
|
)
|
126
132
|
end
|
data/lib/turbine_rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbine_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meroxa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|