Sha256: d745e7f65b4f6f08521483652d839ea2e50402afbf1cc891dc546274f40d5273

Contents?: true

Size: 625 Bytes

Versions: 24

Compression:

Stored size: 625 Bytes

Contents

require ::File.expand_path('../resource.pb', __FILE__)

module Test
  class ResourceService

    # request -> Test::ResourceFindRequest
    # response -> Test::Resource
    def find
      response.name = request.name
      response.status = request.active ? 1 : 0
    end

    # request -> Test::ResourceSleepRequest
    # response -> Test::Resource
    def find_with_sleep
      sleep (request.sleep || 1)
      response.name = 'Request should have timed out'
    end

    # request -> Test::ResourceFindRequest
    # response -> Test::Resource
    def find_with_rpc_failed
      rpc_failed('Find failed')
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
protobuffy-3.6.0 spec/support/test/resource_service.rb
protobuffy-3.5.1 spec/support/test/resource_service.rb
protobuffy-3.4.0 spec/support/test/resource_service.rb
protobuffy-3.3.0 spec/support/test/resource_service.rb
protobuffy-3.2.0 spec/support/test/resource_service.rb
protobuffy-3.1.0 spec/support/test/resource_service.rb
protobuf-3.3.6 spec/support/test/resource_service.rb
protobuf-3.3.5 spec/support/test/resource_service.rb
protobuf-3.3.4 spec/support/test/resource_service.rb
protobuf-3.3.3 spec/support/test/resource_service.rb
protobuf-3.3.2 spec/support/test/resource_service.rb
protobuf-3.3.1 spec/support/test/resource_service.rb
protobuf-3.3.0 spec/support/test/resource_service.rb
protobuf-3.2.1 spec/support/test/resource_service.rb
protobuf-3.2.0 spec/support/test/resource_service.rb
protobuf-3.1.0 spec/support/test/resource_service.rb
protobuf-3.0.5 spec/support/test/resource_service.rb
protobuf-3.0.4 spec/support/test/resource_service.rb
protobuf-3.0.3 spec/support/test/resource_service.rb
protobuf-3.0.2 spec/support/test/resource_service.rb