protobuf 2.4.4-java → 2.4.5-java

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.
@@ -51,6 +51,7 @@ module Protobuf
51
51
  # Private Instance Methods
52
52
  #
53
53
  def normalize(value)
54
+ value = value.to_proto if value.respond_to?(:to_proto)
54
55
  raise TypeError unless @field.acceptable?(value)
55
56
 
56
57
  if @field.is_a?(::Protobuf::Field::EnumField)
@@ -44,6 +44,8 @@ module Protobuf
44
44
  @values.delete(field.name)
45
45
  when val.is_a?(field.type) then
46
46
  @values[field.name] = val
47
+ when val.respond_to?(:to_proto) then
48
+ @values[field.name] = val.to_proto
47
49
  when val.respond_to?(:to_hash) then
48
50
  @values[field.name] = field.type.new(val.to_hash)
49
51
  else
@@ -11,8 +11,8 @@ module Protobuf
11
11
  RpcMethod = Struct.new("RpcMethod", :method, :request_type, :response_type)
12
12
 
13
13
  class Service
14
- include Protobuf::Rpc::ServiceFilters
15
- include Protobuf::Logger::LogMethods
14
+ include ::Protobuf::Rpc::ServiceFilters
15
+ include ::Protobuf::Logger::LogMethods
16
16
 
17
17
 
18
18
  attr_reader :response, :rpc
@@ -98,7 +98,6 @@ module Protobuf
98
98
  rpcs.key?(name)
99
99
  end
100
100
 
101
-
102
101
  ##
103
102
  # Instance Methods
104
103
  #
@@ -1,4 +1,4 @@
1
1
  module Protobuf
2
- VERSION = '2.4.4'
2
+ VERSION = '2.4.5'
3
3
  PROTOC_VERSION = '2.4.1'
4
4
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: protobuf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.4.4
5
+ version: 2.4.5
6
6
  platform: java
7
7
  authors:
8
8
  - BJ Neilsen