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