Skip to content

Commit d0d1151

Browse files
authored
Merge pull request #841 from code0-tech/fix-flow-setting-to-grpc
Change flow setting .to_grpc
2 parents 1eb23f1 + 07ec37c commit d0d1151

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ gem 'good_job', '~> 4.0'
7979
gem 'rotp'
8080

8181
gem 'grpc', '~> 1.67'
82-
gem 'tucana', '0.0.50'
82+
gem 'tucana', '0.0.52'
8383

8484
gem 'code0-identities', '~> 0.0.3'
8585

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ GEM
377377
thor (1.4.0)
378378
timeout (0.6.0)
379379
tsort (0.2.0)
380-
tucana (0.0.50)
380+
tucana (0.0.52)
381381
grpc (~> 1.64)
382382
tzinfo (2.0.6)
383383
concurrent-ruby (~> 1.0)
@@ -431,7 +431,7 @@ DEPENDENCIES
431431
simplecov (~> 0.22.0)
432432
simplecov-cobertura (~> 3.0)
433433
test-prof (~> 1.0)
434-
tucana (= 0.0.50)
434+
tucana (= 0.0.52)
435435
tzinfo-data
436436

437437
RUBY VERSION

app/models/flow_setting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def to_grpc
77
Tucana::Shared::FlowSetting.new(
88
database_id: id,
99
flow_setting_id: flow_setting_id,
10-
object: Tucana::Shared::Struct.from_hash(object)
10+
value: Tucana::Shared::Value.from_ruby(object)
1111
)
1212
end
1313
end

spec/models/flow_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@
9090
settings: [
9191
database_id: flow.flow_settings.first.id,
9292
flow_setting_id: flow.flow_settings.first.flow_setting_id,
93-
object: {
94-
fields: {
95-
'url' => {
96-
string_value: flow.flow_settings.first.object['url'],
93+
value: {
94+
struct_value: {
95+
fields: {
96+
'url' => {
97+
string_value: flow.flow_settings.first.object['url'],
98+
},
9799
},
98100
},
99101
}

0 commit comments

Comments
 (0)