diff --git a/Gemfile b/Gemfile index 94e78f6c..65de2fad 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ gem 'good_job', '~> 4.0' gem 'rotp' gem 'grpc', '~> 1.67' -gem 'tucana', '0.0.8' +gem 'tucana', '0.0.11' gem 'code0-identities', '~> 0.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index d96a13d9..cc1bba33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -328,7 +328,7 @@ GEM test-prof (1.4.2) thor (1.3.2) timeout (0.4.2) - tucana (0.0.8) + tucana (0.0.11) grpc (~> 1.64) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -378,7 +378,7 @@ DEPENDENCIES simplecov (~> 0.22.0) simplecov-cobertura (~> 2.1) test-prof (~> 1.0) - tucana (= 0.0.8) + tucana (= 0.0.11) tzinfo-data RUBY VERSION diff --git a/app/grpc/ping_handler.rb b/app/grpc/ping_handler.rb index 796b9120..d8453860 100644 --- a/app/grpc/ping_handler.rb +++ b/app/grpc/ping_handler.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true -class PingHandler < Tucana::Internal::PingService::Service +class PingHandler < Tucana::Sagittarius::PingService::Service include GrpcHandler def ping(request, _call) - Tucana::Internal::PingMessage.new(ping_id: request.ping_id) + Tucana::Sagittarius::PingMessage.new(ping_id: request.ping_id) end end diff --git a/config/initializers/tucana.rb b/config/initializers/tucana.rb index 8d8e7ade..d545a05d 100644 --- a/config/initializers/tucana.rb +++ b/config/initializers/tucana.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true Rails.application.config.to_prepare do - Tucana.load_protocol(:internal) + Tucana.load_protocol(:sagittarius) end diff --git a/spec/grpc/ping_handler_spec.rb b/spec/grpc/ping_handler_spec.rb index 03573504..1feb85d8 100644 --- a/spec/grpc/ping_handler_spec.rb +++ b/spec/grpc/ping_handler_spec.rb @@ -6,7 +6,7 @@ subject(:handler) { described_class.new } describe '.ping' do - let(:message) { Tucana::Internal::PingMessage.new(ping_id: 1) } + let(:message) { Tucana::Sagittarius::PingMessage.new(ping_id: 1) } it 'returns message with same id' do expect(handler.ping(message, nil).ping_id).to eq(message.ping_id) diff --git a/spec/requests/grpc/internal/ping_service_spec.rb b/spec/requests/grpc/internal/ping_service_spec.rb index 33b5e499..2dc5f522 100644 --- a/spec/requests/grpc/internal/ping_service_spec.rb +++ b/spec/requests/grpc/internal/ping_service_spec.rb @@ -1,13 +1,13 @@ # frozen_string_literal: true -RSpec.describe 'internal.PingService', :need_grpc_server do +RSpec.describe 'sagittarius.PingService', :need_grpc_server do include GrpcHelpers - let(:stub) { create_stub Tucana::Internal::PingService } + let(:stub) { create_stub Tucana::Sagittarius::PingService } describe 'Ping' do it 'returns the same ping id' do - message = Tucana::Internal::PingMessage.new(ping_id: 42) + message = Tucana::Sagittarius::PingMessage.new(ping_id: 42) expect(stub.ping(message, authorization).ping_id).to eq(message.ping_id) end end