turbine_rb 0.2.3 → 0.2.5
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 +2 -2
- data/lib/turbine_rb/client.rb +7 -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: f332f91c7edc265b27163b8f1f9ad8a8dd1bfa928db196da9a80fa4de16dea5f
|
4
|
+
data.tar.gz: cb996cf874226d9f643cead4f949b5e603412d260be2274db983cfed249514f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbc8043c74d9b25e1d5e1e09206309378265b27a20fee8c4de1b7084604dd08f708982ac05c258e0fc7e1c001665518cea0010a54d0461c6c6a999a1ad84b3fc
|
7
|
+
data.tar.gz: def0bbc31585aff968b15e326c2dfba3e519b31f73fff9b3cae9826764a5fbd1bd7a3cd36acf94b939cafe18650b5b860a1656c9e9ef7a56809ec44720370370
|
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.5)
|
5
5
|
grpc (~> 1.48)
|
6
6
|
hash_dot (~> 2.5.0)
|
7
7
|
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
google-protobuf (3.21.12)
|
18
18
|
google-protobuf (3.21.12-x86_64-darwin)
|
19
19
|
google-protobuf (3.21.12-x86_64-linux)
|
20
|
-
googleapis-common-protos-types (1.
|
20
|
+
googleapis-common-protos-types (1.5.0)
|
21
21
|
google-protobuf (~> 3.14)
|
22
22
|
grpc (1.50.0)
|
23
23
|
google-protobuf (~> 3.21)
|
data/lib/turbine_rb/client.rb
CHANGED
@@ -23,20 +23,21 @@ module TurbineRb
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def process(records:, process:)
|
26
|
+
new_records = records.dup
|
26
27
|
pb_collection = core_server.add_process_to_collection(
|
27
28
|
TurbineCore::ProcessCollectionRequest.new(
|
28
|
-
collection: Collection.unwrap(
|
29
|
+
collection: Collection.unwrap(new_records),
|
29
30
|
process: TurbineCore::ProcessCollectionRequest::Process.new(name: process.class.name)
|
30
31
|
)
|
31
32
|
)
|
32
|
-
|
33
|
+
new_records.tap do |r|
|
33
34
|
r.pb_records = process_call(process: process, pb_collection: pb_collection)
|
34
35
|
r.pb_stream = pb_collection.stream
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
38
39
|
def process_call(process:, pb_collection:)
|
39
|
-
return pb_collection if recording?
|
40
|
+
return pb_collection.records if recording?
|
40
41
|
|
41
42
|
process
|
42
43
|
.call(records: TurbineRb::Records.new(pb_collection.records))
|
@@ -74,13 +75,14 @@ module TurbineRb
|
|
74
75
|
end
|
75
76
|
|
76
77
|
def write(records:, collection:, configs: nil)
|
78
|
+
new_records = records.dup
|
77
79
|
if records.instance_of?(Collection) # it has been processed by a function, so unwrap back to gRPC collection
|
78
|
-
|
80
|
+
new_records = records.unwrap
|
79
81
|
end
|
80
82
|
|
81
83
|
req = TurbineCore::WriteCollectionRequest.new(
|
82
84
|
resource: @pb_resource,
|
83
|
-
sourceCollection:
|
85
|
+
sourceCollection: new_records,
|
84
86
|
targetCollection: collection
|
85
87
|
)
|
86
88
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meroxa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|